You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@zeppelin.apache.org by "yuminnnnni (via GitHub)" <gi...@apache.org> on 2026/08/09 07:29:50 UTC
[PR] [ZEPPELIN-6586] Make the login page responsive on narrow viewports [zeppelin]
yuminnnnni opened a new pull request, #5400:
URL: https://github.com/apache/zeppelin/pull/5400
### 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
* [x] - Responsive layout for the login panel
* [x] - Playwright coverage for the narrow viewport (light and dark themes)
### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-6586
### 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: see `mobile-login.png` attached to the Jira issue. After: at 375x812 the form and the stacked welcome sidebar fit within the viewport in both light and dark themes.
### 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](https://claude.com/claude-code)
--
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: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6586] Make the login page responsive on narrow viewports [zeppelin]
Posted by "voidmatcha (via GitHub)" <gi...@apache.org>.
voidmatcha commented on code in PR #5400:
URL: https://github.com/apache/zeppelin/pull/5400#discussion_r3744306899
##########
zeppelin-web-angular/e2e/tests/login/login.spec.ts:
##########
@@ -127,4 +128,32 @@ test.describe('Login Page', () => {
await loginPage.waitForErrorMessage();
});
+
+ for (const theme of ['light', 'dark'] as const) {
+ test(`should fit a narrow viewport without horizontal overflow in ${theme} theme`, async ({ page }) => {
+ await test.step(`Given the ${theme} theme is active on a 375x812 viewport`, async () => {
+ const darkModePage = new DarkModePage(page);
+ await darkModePage.setThemeInLocalStorage(theme);
+ await page.setViewportSize({ width: 375, height: 812 });
+ await page.reload();
+ await expect(loginPage.formContainer).toBeVisible();
+ });
+
+ await test.step('Then the document should not overflow horizontally', async () => {
+ const overflow = await page.evaluate(
+ () => document.documentElement.scrollWidth - document.documentElement.clientWidth
Review Comment:
```suggestion
() => document.body.scrollWidth - document.documentElement.clientWidth
```
--
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: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6586] Make the login page responsive on narrow viewports [zeppelin]
Posted by "yuminnnnni (via GitHub)" <gi...@apache.org>.
yuminnnnni commented on code in PR #5400:
URL: https://github.com/apache/zeppelin/pull/5400#discussion_r4236902822
##########
zeppelin-web-angular/e2e/tests/login/login.spec.ts:
##########
@@ -127,4 +128,32 @@ test.describe('Login Page', () => {
await loginPage.waitForErrorMessage();
});
+
+ for (const theme of ['light', 'dark'] as const) {
+ test(`should fit a narrow viewport without horizontal overflow in ${theme} theme`, async ({ page }) => {
+ await test.step(`Given the ${theme} theme is active on a 375x812 viewport`, async () => {
+ const darkModePage = new DarkModePage(page);
+ await darkModePage.setThemeInLocalStorage(theme);
+ await page.setViewportSize({ width: 375, height: 812 });
+ await page.reload();
+ await expect(loginPage.formContainer).toBeVisible();
+ });
+
+ await test.step('Then the document should not overflow horizontally', async () => {
+ const overflow = await page.evaluate(
+ () => document.documentElement.scrollWidth - document.documentElement.clientWidth
Review Comment:
@voidmatcha Thanks for the review. Applied your suggestion in 054e472d1 (body.scrollWidth - documentElement.clientWidth).
FYI, on my setup (Chromium 140 / Playwright 1.55.1, macOS, shiro-enabled server) I saw the opposite split for master at 375px: documentElement.scrollWidth - clientWidth = 213 and body.scrollWidth - clientWidth = 0. So here the body-based check passes on master and only the toBeInViewport checks fail. It may just be an environment difference on my side. If you see this behave differently in CI, I'm happy to adjust, e.g. taking the max of both.
--
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: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6586] Make the login page responsive on narrow viewports [zeppelin]
Posted by "voidmatcha (via GitHub)" <gi...@apache.org>.
voidmatcha commented on code in PR #5400:
URL: https://github.com/apache/zeppelin/pull/5400#discussion_r4237110811
##########
zeppelin-web-angular/e2e/tests/login/login.spec.ts:
##########
@@ -127,4 +128,32 @@ test.describe('Login Page', () => {
await loginPage.waitForErrorMessage();
});
+
+ for (const theme of ['light', 'dark'] as const) {
+ test(`should fit a narrow viewport without horizontal overflow in ${theme} theme`, async ({ page }) => {
+ await test.step(`Given the ${theme} theme is active on a 375x812 viewport`, async () => {
+ const darkModePage = new DarkModePage(page);
+ await darkModePage.setThemeInLocalStorage(theme);
+ await page.setViewportSize({ width: 375, height: 812 });
+ await page.reload();
+ await expect(loginPage.formContainer).toBeVisible();
+ });
+
+ await test.step('Then the document should not overflow horizontally', async () => {
+ const overflow = await page.evaluate(
+ () => document.documentElement.scrollWidth - document.documentElement.clientWidth
Review Comment:
Thanks for checking this on macOS. You are right: my body-only suggestion can pass on the unfixed master, so it is not a reliable overflow regression check across environments. Could you update the poll to use `Math.max(document.documentElement.scrollWidth, document.body.scrollWidth) - document.documentElement.clientWidth` and keep the existing `toBeInViewport` assertions?
I ran the current login spec locally and all 10 tests passed. #5564 is now merged into master, so rebasing should clear the unrelated Prettier failure and allow CI to run the E2E tests. I will re-review after the assertion is updated and CI runs.
--
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: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org