8000 feat(ui): adopt outlined input boxes with primary resource label and inline tooltip by janzak-dev · Pull Request #684 · google/xmc · GitHub
[go: up one dir, main page]

Skip to content

feat(ui): adopt outlined input boxes with primary resource label and inline tooltip - #684

Merged
janzak-dev merged 5 commits into
mainfrom
feat/ui-primary-resource-input-boxes
Aug 31, 2026
Merged

janzak-dev merged 5 commits into
mainfrom
feat/ui-primary-resource-input-boxes

Conversation

@janzak-dev
@janzak-dev janzak-dev commented Aug 31, 2026 •
Copy link
Copy Markdown
Collaborator

Summary

Redesigns the Resource Observability Dashboard (ROD) Smart Resource Finder inputs to use outlined container boxes with integrated floating legend labels and right-aligned helper tooltip:

  1. "Amount *" and "Primary resource *" / "Resource type *" labels are embedded into the top border notch of each input box.
  2. The first resource selector is labeled Primary resource * with the inline info tooltip on the far right inside the selector box.
  3. Subsequent resource rows are labeled Resource type *.

This was driven by the conversation with our UX Designer.

Motivation & Context

Aligns the Smart Resource Finder UI with modern Material outlined form fields, cleanly displaying labels across multiple resource rows while making the "Primary resource" role and its associated velocity tooltip immediately intuitive.

Key Changes

  • Component Template (cmd/ui/app/resource_dashboard/components/smart_resource_finder/smart_resource_finder.ng.html):
    • Replaced unstructured <label> and <input> groups with semantic <fieldset class="outlined-box"> and <legend class="box-legend">.
    • Dynamically renders Primary resource * on index 0 and Resource type * on index > 0.
    • Placed the help icon with [matTooltip] inside the primary resource selector box on the right.
  • Styling (cmd/ui/app/resource_dashboard/components/smart_resource_finder/smart_resource_finder.scss):
    • Added outlined border, legend notch styling, and focus-within states.
  • Harness & Tests (smart_resource_finder_harness.ts, smart_resource_finder_test.ts):
    • Updated test harness to locate box legends and primary resource help icon.
    • Added unit test coverage for initial state, dynamic label promotion upon row removal, and tooltip display.

Verification & Testing

  • Bazel Unit Tests: bazel test //cmd/ui:ui_unit_tests (PASSED in 40.1s).
  • Playwright Visual Tests: npx playwright test (3/3 screenshot tests passed).
  • Pre-commit Hooks: Prettier, ESLint, Buildifier, and addlicense all passed.

Screenshots

image image

TAG=agy
CONV=acf882de-1561-404c-ba2e-ae0940451165

@gemini-code-assist gemini-code-assist Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the smart resource finder UI to use a fieldset-legend outlined box design for the amount input and resource type select dropdowns, while renaming the 'Dominant' resource label to 'Primary resource'. Feedback focuses on critical accessibility improvements, such as restoring programmatic label associations for screen readers using ARIA attributes and making the help icon keyboard-focusable. Additionally, CSS adjustments are suggested to prevent layout overflow and ensure cross-browser rendering consistency.

@janzak-dev
janzak-dev marked this pull request as ready for review August 31, 2026 14:12
@github-actions
github-actions Bot requested a review from VLukiantsev August 31, 2026 14:12
@VLukiantsev VLukiantsev left a comment
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Verified the outlined fieldset notch styling, keyboard accessibility/tooltips, and updated CDK test harness coverage. All unit and visual screenshot tests pass cleanly.

@janzak-dev
janzak-dev added this pull request to the merge queue Aug 31, 2026
Merged via the queue into main with commit 9a72e09 Aug 31, 2026
12 checks passed
@janzak-dev
janzak-dev deleted the feat/ui-primary-resource-input-boxes branch August 31, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0