Skip to content

[ZEPPELIN-6586] Make the login page responsive on narrow viewports - #5400

Open
yuminnnnni wants to merge 1 commit into
apache:masterfrom
yuminnnnni:ZEPPELIN-6586-responsive-login
Open

[ZEPPELIN-6586] Make the login page responsive on narrow viewports#5400
yuminnnnni wants to merge 1 commit into
apache:masterfrom
yuminnnnni:ZEPPELIN-6586-responsive-login

Conversation

@yuminnnnni

@yuminnnnni yuminnnnni commented Aug 9, 2026

Copy link
Copy Markdown

What is this PR for?

The New UI login page centers a fixed 800px panel (500px form + 300px sidebar, absolutely positioned), so at narrow viewports such as 375x812 the panel overflows both sides of the screen: part of the form is unreachable off the left edge and the welcome sidebar is clipped on the right.

This PR lays the panel out with flexbox instead. The desktop two-column presentation is pixel-identical (500px form + 300px sidebar at the same 800px width), while the panel now shrinks with the viewport and stacks the sidebar below the form at @screen-sm-max (767px), following the existing theme tokens. On short viewports (e.g. landscape phones) the stacked panel is capped to the viewport height and scrolls internally, so the form always stays reachable. No new dependency is introduced.

Narrow-viewport Playwright coverage is added to the existing login suite for both light and dark themes: it asserts no document-level horizontal overflow at 375px and that the username field, password field, and login button stay fully visible and usable.

What type of PR is it?

Bug Fix

Todos

  • - Responsive layout for the login panel
  • - Playwright coverage for the narrow viewport (light and dark themes)

What is the Jira issue?

How should this be tested?

  • Run the focused login spec: cd zeppelin-web-angular && npx playwright test tests/login/login.spec.ts --project=chromium (requires conf/shiro.ini so the login page is shown)
  • Open /#/login at 375x812 and confirm the form is fully visible with no horizontal overflow; repeat in light and dark themes
  • Confirm the desktop two-column layout is unchanged at >=832px
  • cd zeppelin-web-angular && npm run lint

Screenshots (if appropriate)

Before (375x812) After light (375x812) After dark (375x812)
before, panel overflows the viewport after, light theme after, dark theme

Desktop (1280px) is unchanged:

after, desktop two-column layout unchanged

Questions:

  • Does the license files need to update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

🤖 Generated with Claude Code

The login panel was a fixed 800px with absolutely positioned columns,
so at a 375px viewport it overflowed both sides of the screen.

Lay the panel out with flexbox instead: the desktop two-column
presentation is unchanged (500px form + 300px sidebar), while the
panel now shrinks with the viewport and stacks the sidebar below the
form at @screen-sm-max. On short viewports the panel is capped to the
viewport height and scrolls internally.

Add narrow-viewport Playwright coverage to the login suite for both
light and dark themes: no document-level horizontal overflow and the
login controls stay fully visible and usable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@voidmatcha voidmatcha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

expect(overflow).toBe(0) passes on master too, so this assertion cannot fail. In Chromium, overflow from an absolutely positioned element never reaches documentElement.scrollWidth. At 375px the panel measurably spans -212 to 588, yet that value stays at the viewport width of 375. body.scrollWidth reports 587 for the same page, so reading body makes the assertion 212 on master and 0 here, which is what this step is trying to express.

Suggestion inline. The toBeInViewport checks below do fail on master, so the test still catches the regression.


await test.step('Then the document should not overflow horizontally', async () => {
const overflow = await page.evaluate(
() => document.documentElement.scrollWidth - document.documentElement.clientWidth

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
() => document.documentElement.scrollWidth - document.documentElement.clientWidth
() => document.body.scrollWidth - document.documentElement.clientWidth

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