Skip to content

feat(swa): add sidebar navigation to group sections#60

Merged
github-actions[bot] merged 1 commit into
devfrom
feature/swa-sidebar-nav
Jun 17, 2026
Merged

feat(swa): add sidebar navigation to group sections#60
github-actions[bot] merged 1 commit into
devfrom
feature/swa-sidebar-nav

Conversation

@Ryback2501

Copy link
Copy Markdown
Owner

Summary

  • Add a left icon sidebar that organizes the logged-in UI into four sections, showing only the selected section at a time.

Changes

SWA (swa/)

  • index.html — add a left sidebar rail with four buttons, each an inline single-<path> SVG icon (User, Relays, Chats, Feeds), wrapped with <main> in an app-shell. Group the panels into four .section containers: User (Identity + Profile + Following), Relays, Chats (Direct Messages), Feeds (Post + Feed). The Following panel was moved up to sit with the User group.
  • style.css — lay out the sidebar rail beside the content via .app-shell; add .sidebar / .sidebar-btn (hover + active states) and .section styles; main now flexes within the shell.
  • navigation.js — new pure module: section keys, default section, and resolveSection to pick a valid active section (with fallback).
  • navigation.test.js — unit tests for resolveSection and the default-section invariant.
  • app.js — wire icon clicks to show one section and mark its button active; show the sidebar only when logged in and reset to the default section on logout.

Test plan

  • Log in and confirm the left icon rail appears with four icons.
  • Click each icon and confirm only that section's panels show (User shows Identity/Profile/Following; Relays; Chats; Feeds shows Post/Feed) and the icon highlights.
  • Log out and confirm the sidebar disappears; log back in and confirm it returns on the User section.
  • Confirm the icons render as SVG shapes and are keyboard-focusable with accessible labels.

@github-actions github-actions Bot merged commit 2eba458 into dev Jun 17, 2026
13 of 14 checks passed
@github-actions github-actions Bot deleted the feature/swa-sidebar-nav branch June 17, 2026 11:15
@Ryback2501 Ryback2501 mentioned this pull request Jun 17, 2026
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.

1 participant