[PR #135·138] Admin Web Follow-Up 2: Applying the Design Mockup and Re-Matching the Login Screen
This post continues the previous one (PR #133·134). It covers the last of the three gaps in the admin web: visual styling. The admin web only had placeholder values, so its menu was a plain list of links. It got the look of the mockup (a design reference that shows how the screens should look) in PR #135, and after merging I saw that the login screen differed from the mockup the most, so it was matched once more in PR #138.
At a glance
| PR | Scope | What was done | Not done |
|---|---|---|---|
| #135 | Whole admin web | Mockup colors, font, and spacing; menu bar and top bar; per-page layouts; status badges and danger buttons | Icons, logo artwork, narrow screens, dark mode |
| #138 | Login and screens after login | Two-column login; menu, top bar, and page title rows; customer list table styling | Search magnifier, tab counts, a Details button in rows, narrow screens |
PR #135: Styling for the whole admin web
- What I decided: Use the mockup’s font, match only desktop widths (1024px and up), and follow the color guide (
#08BAEDmain,#0CAB7Caccent,#404152dark gray,#F3F3F3light gray). - What was done: Claude applied the look in two commits.
- Styling foundation: the color and spacing values file (
tokens.css) was replaced with the mockup’s values, and the font file embedded in the mockup (about 60 KB) was extracted. Claude built the default look for buttons, inputs, tables, dialogs, tabs, badges, empty states, and errors, plus the frame: a white left menu bar (228px wide), a top bar (79px), and the content area. The selected menu item is styled light blue by CSS, which recognizes thearia-current="page"attribute (a marker meaning “current page”) thatNavLinkadds. - Styling finish: per-page layouts. Lists are a tab, a search row, a table, and page numbers inside a card; customer detail is a title row, tabs, and two columns of information; modules are a two-column card grid; the summary is four number cards; login is a centered card.
- Status badges use color and text together. Risky buttons, such as suspend, revoke an invite code, and end a session, got a separate danger style.
- Styling foundation: the color and spacing values file (
- Chosen approach and dropped options:
- Plain CSS files, the elements’ own default look, and
classNameonly where layout needs it. CSS Modules (renaming class names per file) would have meant editing almost every file, and Tailwind or a component library would have added dependencies (external parts the project uses). - Existing variable names (
--color-*,--space-*) stayed; only the values were replaced with the mockup’s. - The current-location text was not put in the top bar. If the same text appears twice on one screen, the e2e text lookup can break.
- Icons, logo artwork, narrow screens, and dark mode were left out of this scope.
- Although the change touches about 25 files, most of them only gained one or two
classNames, and text, structure, and names stayed the same, so it stayed as one PR. - The places tests look for (headings, button, dialog, and row names, table structure) were not changed. The visible “Search” label on the search field is hidden on screen but kept for screen readers.
- Plain CSS files, the elements’ own default look, and
PR #138: Re-matching the login screen and the screens after login
After merging #135, the login screen turned out to be the place that differed most from the mockup. The mockup has two columns, a dark navy intro panel on the left and a login card on the right, but only a small centered card had been built. I asked for the login screen and the screens after login to be matched to the mockup more closely.
- Login: It became a two-column screen. The left side has the brand, intro text, and a security note; the right side has
Admin loginand the login button slot. The mockup’s email and password inputs were not added, because this system’s sign-in method has no such inputs. - After login: The left menu got a console caption, menu labels, line icons, a notice box, and a footer. The top bar got a path, a label marking internal use, an email circle, and a logout icon button. A page title row (title, a one-line description, and page-wide buttons on the right) was added too. The customer list has “Download CSV” and “Register customer”, history has CSV, and modules has “Add facility” and “Add module” on the right.
- Customer list table: A circle with the first letter sits before each name, and modules appear as chips. The only way to start registering a customer used to be the button shown on an empty list; now it is always visible in the title row.
- Chosen approach and dropped options:
- I ran the mockup on a temporary local server, opened its after-login screens, and compared them side by side with ours (the server was shut down afterwards). The mockup’s wording lives in the same file as the other wording (
copy/ko.ts). - Menu names (
Summary,Customers, and so on) differ from the mockup but were kept.Summaryis the heading the e2e tests wait for, and the same text appearing twice on one screen can break tests. The path text in the top bar is plain text, not a heading. - When “Register customer” went into the title row, the same-named button on the empty list was removed, because two buttons with the same name cannot be found by the tests.
- Not done: the magnifier icon inside the search field, counts on the tabs, a
Detailsbutton in table rows, and narrow screens.
- I ran the mockup on a temporary local server, opened its after-login screens, and compared them side by side with ours (the server was shut down afterwards). The mockup’s wording lives in the same file as the other wording (
Checking
- Automated tests: 167 admin web tests passed, along with the type check and lint. For #135, new tests keep these promises: five menu links, only the link for the current address has
aria-current="page", and the top bar has no heading. They are “guard tests” that already pass on the structure before the change; they exist so restyling cannot break those promises. - By eye: Claude started a temporary fake server and a dev server and compared the customer list, detail, module overview, summary, invitations, login, and the suspend dialog against the mockup at desktop width, then shut all the servers down. Side-by-side screenshots could not be attached to the PR.
- Not checked: On my Windows computer I could not run the e2e tests, so I planned to rely on GitHub CI. For #138 the container program was off on that computer, so the full
npm run verifycould not run either. The license of the mockup’s font was not checked.
What I learned
- After applying a design, re-check the screen that looks most different from the mockup first. I thought every screen had been matched in one pass, but the login screen, which sets the first impression, differed the most.
- Keep the names the tests look for, even in styling work. If you only add
classNames and CSS without touching headings, button names, or table structure, the existing tests stay trustworthy while the look changes. - If the main folder holds old code, the new styling will not show. Look after pulling the latest (
git pull), and note that pulling is blocked when there are unsaved changes.