lizhimins opened a new pull request, #7355:
URL: https://github.com/apache/rocketmq-dashboard/pull/7355

   ### Which Issue(s) This PR Fixes
   
   No tracking issue. Follow-up on the create-form rule modal from the previous 
PR.
   
   ### Brief Description
   
   The standalone resource model page duplicated what the create forms already 
explain, and a reader only
   meets the rule when they are about to create something. This folds the page 
into the modal:
   
   - **Removed**: the `/studio/resource-model` route (`App.tsx`), its menu 
entry and breadcrumb mapping
     (`MainLayout.tsx`), and `pages/studio/ResourceModel.tsx` with its test. 
The old URL now hits the
     `App.tsx` catch-all and falls back to the home page.
   - **Moved**: the ownership topology SVG becomes the presentational component
     `components/ResourceOwnershipTopology.tsx` (palette and the three drawing 
helpers move with it,
     `data-testid` becomes `resource-ownership-topology`) and renders inside 
the question-mark modal on
     the create instance, topic and group forms.
   - **Modal**: widened to 860px with `maxHeight: calc(100vh - 260px)` and 
`overflow-y: auto` on the body,
     so the topology plus the rules fit without squeezing the SVG labels. 
Content order is the uniqueness
     boundary → topology → the four ownership rules. The title becomes the rule 
name and the trigger
     tooltip reuses the aria label, so the two stay distinguishable to 
assistive tech instead of both
     announcing the same string.
   - **Dropped the three-outcome list**: rule 1 already says a foreign owner is 
reported and the create is
     rejected, so the list only restated it. The modal now ends with the four 
ownership rules.
   - **i18n**: `nav.resourceModel`, `resourceModel.title` / `banner` / 
`archTitle` / `helpTooltip` and the
     `resourceModel.outcome*` keys are gone; the remaining `resourceModel.*` 
directory (36 entries) stays
     bilingual and the directory-completeness guard keeps covering the modal 
copy.
   
   ### How Did You Test This Change?
   
   ```
   cd web && npm run lint && npm test && npm run build
   npm run lint
     ✖ 10 problems (0 errors, 10 warnings)   # all pre-existing, none in a file 
this PR touches
     exit 0
   
   npm test   (vitest run)
     Test Files  163 passed (163)
          Tests  1859 passed (1859)
       Duration  233.08s
   
   npm run build
     ✓ built in 14.43s
     web license check passed: 132 actual components, 139 license files
   
   npm run license:test
     # pass 5
     # fail 0
   ```
   
   The guards from `ResourceModel.test.tsx` moved into 
`ResourceRuleHelp.test.tsx` (topology renders inside
   the modal, the four rules are present, the i18n directory stays bilingual, 
and every one of the 18 SVG
   labels fits its rect width budget); the modal-title assertions in the three 
page guard tests were updated
   to the new title.
   
   Browser check on the test machine (playwright, read-only — modals opened and 
dismissed with Escape,
   nothing submitted): the old route falls back to the home page, the sidebar 
no longer lists the resource
   model page, the three question-mark triggers still render exactly once each, 
the modal measures 860px
   wide with a scrollable body, the smallest rendered font is 14px, no SVG 
label overflows its rect, and
   clicking a trigger does not open the NameServer dropdown. Zero console 
errors and zero page errors.
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits (`feat:` / `fix:` / 
`refactor:` / `chore:` / `docs:` / `perf:`)
   - [x] Tests added or updated for non-trivial changes, test methods named 
`...Test`
   - [x] New UI text has both Chinese and English entries under `web/src/i18n/`
   - [x] Architecture constraints stay green (`mvn test` runs the ArchUnit 
checks) — no backend change here
   - [x] New source files carry the ASF license header (frontend sources are 
not header-bearing in this repo)
   - [x] Documentation touched where behaviour changed (README / `docs/` / 
in-app help)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to