Skip to content

feat: move theme toggle from sidebar to user profile dropdown#34

Merged
anilcancakir merged 2 commits intomainfrom
feat/theme-toggle-to-dropdown
Apr 8, 2026
Merged

feat: move theme toggle from sidebar to user profile dropdown#34
anilcancakir merged 2 commits intomainfrom
feat/theme-toggle-to-dropdown

Conversation

@anilcancakir
Copy link
Copy Markdown
Contributor

Summary

  • Removed theme toggle button from sidebar bottom bar (was next to notification bell)
  • Added theme toggle as a menu item inside user profile dropdown — tapping toggles light/dark without closing the dropdown
  • Sidebar bottom bar now cleaner: avatar + name + notification bell only

Closes #30

Test plan

  • New test: shows theme toggle in dropdown menu — verifies toggle label and icon visible
  • All dropdown tests pass (10 total)
  • Full suite: 585 tests pass
  • Analyzer: 0 issues
  • Format: 0 changes

Copilot AI review requested due to automatic review settings April 8, 2026 20:30
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Moves the light/dark theme toggle out of the always-visible sidebar footer and into the user profile dropdown, aligning with the navigation UI’s “rarely-used actions go in menus” approach (Issue #30).

Changes:

  • Removed the standalone theme toggle icon from the sidebar bottom bar in MagicStarterAppLayout.
  • Added a “toggle theme” row to MagicStarterUserProfileDropdown that toggles theme without invoking the dropdown close callback.
  • Added a widget test to verify the toggle label/icon appears in the dropdown.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
lib/src/ui/widgets/magic_starter_user_profile_dropdown.dart Adds a theme toggle row to the dropdown menu.
lib/src/ui/layouts/magic_starter_app_layout.dart Removes the sidebar footer theme toggle button.
test/ui/widgets/magic_starter_user_profile_dropdown_test.dart Adds coverage that the theme toggle is rendered in the dropdown.
CHANGELOG.md Documents the feature under [Unreleased].

@sentry
Copy link
Copy Markdown

sentry bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Replace dedicated _buildThemeToggle() with _buildMenuItem() call to
eliminate duplicated menu item structure. Wrap label text in flex-1
min-w-0 container with truncate to prevent RenderFlex overflow on
long labels. Add test verifying toggle switches icon and keeps
dropdown open.
@anilcancakir anilcancakir force-pushed the feat/theme-toggle-to-dropdown branch from 86e516f to 321663b Compare April 8, 2026 21:02
@anilcancakir anilcancakir merged commit 520c163 into main Apr 8, 2026
1 check passed
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.

feat: move theme toggle from sidebar bottom to user dropdown

2 participants