Skip to content

feat(ui): migrate unauthenticated screens to core-components - #33575

Open
chirag-madlani wants to merge 5 commits into
mainfrom
update-login-screens-to-core-components
Open

chirag-madlani wants to merge 5 commits into
mainfrom
update-login-screens-to-core-components

Conversation

@chirag-madlani

@chirag-madlani chirag-madlani commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

Migrate all unauthenticated login/onboarding screens from Ant Design + Less to @openmetadata/ui-core-components (UntitledUI + Tailwind). Forms adopt the modern react-hook-form + FieldProp/FormFields stack; layout uses Card, Typography and design tokens; legacy .less files removed.

Screens migrated

  • /signin (SignInPage) — email/password + SSO branch
  • /register (BasicSignup) — first/last name/email/password/confirm
  • /forgot-password
  • /users/password/reset
  • /users/registrationConfirmation (AccountActivationConfirmation)
  • /users/signup (post-signup SignUpPage — profile + team select)
  • PageNotFound (/404)

Shared helpers updated

  • CarouselLayout — antd Layout/Row/Col/Grid → pure Tailwind split
  • LoginButton — antd Button → core-components Button

Library changes (openmetadata-ui-core-components)

  • render-field-element.tsx — forward size prop through to Input so FieldProp.props.size = 'md' actually applies (previously silently stripped).
  • input.tsx — expose a proper md size that the login forms use.
  • select-native.tsx — matching size wiring.

Deletions — 7 .less files (login.style.less, forgot-password.styles.less, reset-password.style.less, basic-signup.style.less, page-not-found.less, carousel-layout.less, login-button.style.less) and one unused forgot-password.png bg image.

Test plan

  • Jest — all 31 tests across the 6 affected page suites pass (SignInPage, ForgotPassword, ResetPassword, SignUp, LoginCarousel, PageNotFound)
  • ESLint clean on all touched files
  • yarn tw-guard — no new antd imports
  • yarn i18n — locale files in sync
  • Type-check clean on touched files (existing repo-wide errors on ExploreSearchInput.tsx and DateValue on main are unrelated)
  • Manual UI verification against live backend on all 5 unauthenticated routes — see screenshots below

Screenshots

  • SignIn — form column now sits in a Card, "Welcome to OpenMetadata" fits on one line
  • Register — same Card treatment, five fields via FormFields
  • Forgot Password — Card + Typography, single email field via HookForm
  • Reset Password — Card + Typography + cross-field password validation
  • Registration Confirmation — Card + Alert (success/error variants)
screenshot-1789725501345-0 screenshot-1789725501345-1 screenshot-1789725501346-2 screenshot-1789725520747-3 screenshot-1789725520749-4 image

Notes

  • Follow-up: fontSize on inputs is still sm (14px) — bumping it to md needs the same library-forward pattern as size.
  • Follow-up: PageNotFound isn't reachable while logged out (router redirects invalid paths to /signin); manual verification requires a logged-in session.

🤖 Generated with Claude Code

RetriggerConfidence Score: 3/5

The PR is not yet safe to merge because registration still accepts whitespace-only first and last names.

Findings

  1. P1 Whitespace names pass validation
  2. P2 Heading overflows narrow screens
Summary

Migrates unauthenticated authentication, onboarding, and error screens from Ant Design/Less to the shared core-component form and layout system.

  • Rebuilds sign-in, registration, password recovery, account activation, and not-found screens with core components and Tailwind.
  • Updates shared login layout, buttons, input sizing, placeholder tokens, and Playwright selectors.
  • Removes obsolete Less styles and the forgot-password background asset.
  • Changes since the previous review only reformat Playwright assertions and locators.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  User[Unauthenticated user] --> Layout[CarouselLayout]
  Layout --> AuthScreens[Authentication and onboarding screens]
  AuthScreens --> CoreForms[HookForm and FormFields]
  CoreForms --> CoreInputs[Core Input and NativeSelect]
  AuthScreens --> AuthAPI[Authentication and user APIs]
Loading

Reviews (4) · Last reviewed commit: "chore(ui): prettier fix on Login.spec.ts"

Rewrite SignIn, Register (BasicSignup), ForgotPassword, ResetPassword,
account activation, PageNotFound, post-signup profile (SignUpPage), plus
the shared CarouselLayout and LoginButton to use
@openmetadata/ui-core-components instead of antd. Forms adopt the
react-hook-form + FieldProp/FormFields stack; layout uses Card,
Typography, and Tailwind tokens; legacy .less files removed.

Library changes:
- render-field-element: forward `size` prop through to Input so
  `FieldProp.props.size` actually applies.
- input: expose an `md` size that the login forms use.
- select-native: matching size wiring.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Sep 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Playwright impact map auto-refreshed

This PR touched specs or UI source that changed the source→spec routing map. I regenerated .github/playwright/impact-map.generated.json and pushed the diff to this branch.

- source entries: 775 → 773
- 0 added, 2 removed, 2 changed spec-list

Removed source→spec entries:
  openmetadata-ui/src/main/resources/ui/src/pages/AddCustomMetricPage/AddCustomMetricPage.tsx
  openmetadata-ui/src/main/resources/ui/src/pages/ResetPassword/ResetPassword.component.tsx

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityExportModalProvider/EntityExportModal.component.tsx
  openmetadata-ui/src/main/resources/ui/src/pages/LoginPage/SignInPage.tsx

What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing getByTestId strings. Hand-authored routing in impact-map.json always wins on conflict.

What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit:

python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit  # or a separate commit

Comment on lines +99 to +105
<div
className={classNames(
DEFAULT_MEDIA_COLUMN_CLASSES,
carouselClassName
)}>
<LoginCarousel />
</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Performance: LoginCarousel now mounts on all viewports

In the no-video branch, the previous code rendered the carousel column only when the xl breakpoint matched (const mediaColumn = xl && (...)), so on smaller screens LoginCarousel was never mounted. The refactor always renders <LoginCarousel /> inside a column that is merely CSS-hidden below xl (tw:hidden tw:xl:flex). Because LoginCarousel is a React.lazy heavy widget, its chunk now downloads and its component mounts (running any autoplay/timer effects) even on mobile/tablet where it is invisible. Consider gating the mount on the breakpoint (e.g. keep a useBreakpoint/media-query check) so the lazy chunk and effects are avoided when the media column is not shown.

Mount LoginCarousel only when the xl breakpoint is active to avoid loading the lazy chunk on small screens.:

<div
  className={classNames(
    DEFAULT_MEDIA_COLUMN_CLASSES,
    carouselClassName
  )}>
  {/* Only mount when the xl media column is actually visible */}
  {isXl && <LoginCarousel />}
</div>
  • Apply fix

Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎

Comment on lines +91 to +96
required: true,
rules: {
required: t('message.field-text-is-required', {
fieldText: t('label.first-name'),
}),
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Whitespace names pass validation

The new first- and last-name rules only check whether the value is nonempty. If the user submits with Enter while a field containing only spaces is still focused, the blur-time trimming does not run, so registration accepts the value and the server persists a blank-looking display name. Please preserve the previous whitespace validation for both name fields.

<BrandImage isMonoGram height={50} width={50} />
<Typography
as="h1"
className="tw:whitespace-nowrap tw:text-center"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Heading overflows narrow screens

Forcing the welcome heading onto one line makes it overflow the card on narrow viewports and with longer translated brand names. At a 320px viewport, the surrounding and card padding leave roughly 192px for a display-size heading, which is too narrow for “Welcome to OpenMetadata.” Allow the heading to wrap, or apply nowrap only when enough width is available. The registration screen has the same pattern.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit c9f8f26417396247172658e74c9942b5072c1004 in Playwright run 35345511718, attempt 1.

✅ 4491 passed · ❌ 0 failed · 🟡 5 flaky · ⏭️ 1 skipped · 🧰 0 lifecycle flaky

Performance

Blocking targets: ✅ met · Optimization targets: 🟡 in progress

Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting.

🕒 Full workflow signal wall (to summary) 45m 33s

⏱️ Max setup 4m 33s · max shard execution 19m 16s · max shard-job elapsed before upload 23m 23s · reporting 19s

🌐 220.40 requests/attempt · 2.23 app boots/UI scenario · 38.24% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 38.24% (convergence target: at most 15%).
  • Browser traffic was 220.4 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.23 per UI scenario (10670 boots / 4780 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard advanced-search-01 66 0 0 0 0 0
✅ Shard advanced-search-02 64 0 0 0 0 0
✅ Shard chromium-01 113 0 0 0 0 0
✅ Shard chromium-02 139 0 0 0 0 0
🟡 Shard chromium-03 162 0 1 0 0 0
✅ Shard chromium-04 157 0 0 0 0 0
✅ Shard chromium-05 140 0 0 0 0 0
🟡 Shard chromium-06 133 0 1 0 0 0
✅ Shard chromium-07 201 0 0 0 0 0
✅ Shard chromium-08 170 0 0 0 0 0
✅ Shard chromium-09 135 0 0 0 0 0
✅ Shard chromium-10 163 0 0 0 0 0
✅ Shard chromium-11 157 0 0 0 0 0
🟡 Shard chromium-12 167 0 1 0 0 0
✅ Shard chromium-13 155 0 0 0 0 0
✅ Shard chromium-14 180 0 0 0 0 0
✅ Shard chromium-15 145 0 0 0 0 0
✅ Shard chromium-16 165 0 0 0 0 0
✅ Shard chromium-17 165 0 0 0 0 0
✅ Shard chromium-18 160 0 0 0 0 0
✅ Shard chromium-19 177 0 0 0 0 0
✅ Shard chromium-20 133 0 0 1 0 0
✅ Shard chromium-21 154 0 0 0 0 0
✅ Shard chromium-22 163 0 0 0 0 0
✅ Shard chromium-23 164 0 0 0 0 0
🟡 Shard chromium-24 174 0 2 0 0 0
✅ Shard chromium-25 157 0 0 0 0 0
✅ Shard data-asset-rules-01 65 0 0 0 0 0
✅ Shard domain-isolation-01 16 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard import-export-01 100 0 0 0 0 0
✅ Shard import-export-02 33 0 0 0 0 0
✅ Shard import-export-03 17 0 0 0 0 0
✅ Shard ingestion-01 49 0 0 0 0 0
✅ Shard ingestion-02 49 0 0 0 0 0
✅ Shard reindex-01 28 0 0 0 0 0
✅ Shard search-01 12 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0
🟡 5 flaky test(s) (passed on retry)
  • Pages/Lineage/LineageFilters.spec.tsVerify lineage database filter selection (shard chromium-03, 1 retry)
  • Pages/CustomProperties.spec.tsString (shard chromium-06, 1 retry)
  • Pages/InputOutputPorts.spec.tsInput port drawer shows assets from outside data product (shard chromium-12, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.tsShould remove user owner for knowledgeCenter (shard chromium-24, 1 retry)
  • Pages/Users.spec.tsAdmin soft & hard delete and restore user from profile page (shard chromium-24, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants