chore(release): v1.0.3 — Actions dropdown polish + sidebar identity refactor (#574 #575 #578)#579
Merged
Merged
Conversation
…efactor Three SPA bugs / refactors against v1.0.2, addressed in one PR because they all converge on the shared Popover primitive in @dar/ui. #574 + #575 — list-page Actions dropdown (width + outside-click) ----------------------------------------------------------------- The Actions dropdown opened at a fixed narrow width (~200px) regardless of label length — long admin.action descriptions wrapped to 3+ lines. Clicking outside the menu did NOT close it; only clicking the trigger or selecting an item did. Fix: replace the hand-rolled inline menu with the shared Popover primitive, which already handles outside-click + Escape (and is verified by ListPage's filter dropdowns and DetailPage's CustomViewsMenu). Apply min-w-56 max-w-md to the panel and truncate whitespace-nowrap to the items — labels track their content length up to a sane bound, longer-than-bound labels truncate with the full text reachable via the existing title= tooltip. #578 — sidebar identity area (email dropdown over modal) -------------------------------------------------------- The sidebar identity area was three stacked elements: 1. email + role text on its own row, 2. a standalone Settings button, 3. a Settings modal containing the theme toggle + Sign out. A modal-around-two-controls is heavier than warranted, and the inline role label (· superuser) was noise for day-to-day users. Fix: replace all three with a single email-with-caret button that opens a dropdown via the shared Popover. The dropdown holds the same theme toggle + Sign out, plus an optional Signed in as ... · role caption inside the panel for users who want the info. SettingsModal deleted (no other mount sites); new AccountMenu component in @dar/settings is the panel body, consumed inside the Popover by @dar/sidebar. Long emails truncate with title= tooltip. Side effects: - @dar/sidebar gains a workspace dep on @dar/ui (Popover) — already used transitively everywhere else. - @dar/settings exports AccountMenu instead of SettingsModal. - Bundle changes: 262.07 → 262.12 kB JS (+50 bytes), 28.16 → 28.23 kB CSS (+70 bytes). Net neutral despite gaining one more dropdown surface — the deleted SettingsModal + Settings cog import roughly offset the new AccountMenu. Closes #574, Closes #575, Closes #578. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v1.0.3 — Actions dropdown polish + sidebar identity refactor
Three issues converged on the shared
Popoverprimitive in@dar/ui— addressed together.#574 — Actions dropdown width tracks label length
The list-page Actions dropdown opened at a fixed narrow width (~200px). Long
@admin.action(description="...")labels wrapped to 2-3 lines each, making 5-item menus a tall block.Fix:
panelClassName="min-w-56 max-w-md py-1"— width tracks the longest label between 14rem and 28rem. Items aretruncate whitespace-nowrap; longer-than-max labels get…with the full text reachable via the existingtitle=tooltip.#575 — Actions dropdown closes on outside click
The hand-rolled menu had no outside-click handler; only the trigger button or an item click dismissed it. Acted like a modal without being one.
Fix: replace the hand-rolled
<div className="relative">+ open-state-toggle with the shared<Popover>primitive, which already inherits outside-click + Escape close from the same component the filter dropdowns andCustomViewsMenuuse. Zero new code — pure refactor onto the right primitive.#578 — Sidebar identity dropdown over modal
Three things in the sidebar identity area were doing one job:
<email> · superusertext on its own row (the role label was noise for day-to-day users)<SettingsModal>containing theme toggle + Sign outA modal around two controls is heavy primitive choice; the theme + logout pair is the canonical "profile dropdown" shape.
Fix:
<AccountMenu>component in@dar/settingsis the panel body (theme + Sign out + optionalSigned in as <email> · <role>caption).<Popover>anchored to an email-with-caret trigger button.<SettingsModal>deleted (no other mount sites).title=tooltip.Diff summary
frontend/packages/settings/src/SettingsModal.tsxfrontend/packages/settings/src/AccountMenu.tsxfrontend/packages/settings/src/index.tsAccountMenuinstead ofSettingsModalfrontend/packages/settings/README.mdfrontend/packages/sidebar/src/Sidebar.tsxfrontend/packages/sidebar/package.json@dar/uiadded as workspace depfrontend/apps/web/src/pages/ListPage.tsxfrontend/pnpm-lock.yamlpyproject.tomlTest plan
poetry run pytest -q→ 45 passed, 88% coverage.pnpm -w test→ 145 tests passed, 22 files (FilterBar's 11 tests still green).pnpm -r typecheck→ clean across all 11 packages.pnpm -w build→ clean. JS bundle 262.07 → 262.12 kB (+50 B), CSS 28.16 → 28.23 kB (+70 B). Net neutral — deleted SettingsModal offsets new AccountMenu.Publish plan
Same as 1.0.1/1.0.2 — manual
set -a; . ./.env; set +a && poetry publishusingPOETRY_PYPI_TOKEN_PYPIfrom.env. Tagv1.0.3+ GitHub Release after. Therelease.ymlidempotency guard (PR #569) will detect the version is already on PyPI and short-circuit the upload, so thepypiDeployment lights up green automatically.Closes
🤖 Generated with Claude Code