Skip to content

style(web): mode toggle uses bottom-border (sub-tab convention) (#582)#589

Merged
memtomem merged 1 commit intomainfrom
feat/582-mode-toggle-hierarchy
Apr 30, 2026
Merged

style(web): mode toggle uses bottom-border (sub-tab convention) (#582)#589
memtomem merged 1 commit intomainfrom
feat/582-mode-toggle-hierarchy

Conversation

@memtomem
Copy link
Copy Markdown
Owner

Summary

  • The Index tab's mode toggle (folder / upload / compose) used the global .btn-ghost.btn-active outline (border on all four sides), while the main .tab-nav above already uses bottom-border for its active tab. Both rendered as a blue highlight with different decoration, which weakened the parent/child hierarchy between main tabs and sub-tabs.
  • Switch the mode toggle's active state to the same bottom-border convention used by .sources-vendor-tab. Both rows now read as tabs at different scales — main tabs stay larger/prominent, the mode toggle reads as subordinate.
  • Updates the (now-stale) comment that referenced the non-existent .sources-mode-toggle selector to point at the live .sources-vendor-tab precedent.

Scope

  • One file: packages/memtomem/src/memtomem/web/static/style.css.
  • Replaces the single .index-mode-toggle .btn-ghost { font-size: 0.82rem; padding: 4px 12px; } rule with a fuller block (background/border reset + inactive/hover/active states), plus an updated header comment. +15 / -3 lines.
  • No HTML, JS, or i18n changes. The active-state JS toggle (btn.classList.toggle('btn-active', active) in app.js:2983) keeps working unchanged — only the CSS interpretation of btn-active inside .index-mode-toggle is rewritten.
  • Specificity isolation: .index-mode-toggle .btn-ghost.btn-active (0,0,3,0) overrides the global .btn-ghost.btn-active (0,0,2,0). Other consumers of btn-active (filter-toggle, adv-toggle, group-toggle, tags-cloud-btn, tags-list-btn, tags-sort-btn) are unaffected.

Refs

Test plan

  • uv run ruff check packages/memtomem/src && uv run ruff format --check packages/memtomem/src
  • Visual check via Playwright at viewport 1280×800: navigated to Index tab, screenshotted both 파일 업로드 (Upload) active and 폴더 인덱싱 (Folder) active. Active mode reads as a clean bottom-border tab; inactive modes show muted text with no border. Main .tab-nav row keeps its existing bottom-border style — hierarchy is now layered (large main tabs → smaller mode toggle, both bottom-border). Confirmed PR style(web): cap upload dropzone width and center it (#582) #588's centered dropzone still renders correctly under the new mode-toggle row.
  • Side-effects: confirmed via grep that no other .btn-active consumers (filter-toggle, adv-toggle, group-toggle, tags-*) inherit any of the new scoped declarations.

🤖 Generated with Claude Code

The Index tab's mode toggle (folder / upload / compose) used the global
.btn-ghost.btn-active outline, while the main .tab-nav above already
uses a bottom-border for its active tab. Both rendering as a blue
highlight with different decoration (outline vs underline) weakens the
parent/child hierarchy between main tabs and sub-tabs.

Switch the mode toggle's active state to the same bottom-border
convention used by .sources-vendor-tab so both rows read as tabs but at
different scales — main tabs stay larger and prominent, the mode toggle
reads as subordinate.

Refs #582 (Prev #4).

Co-Authored-By: Claude <[email protected]>
@memtomem memtomem merged commit e8602a6 into main Apr 30, 2026
7 checks passed
@memtomem memtomem deleted the feat/582-mode-toggle-hierarchy branch April 30, 2026 03:41
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants