feat: move theme toggle from sidebar to user profile dropdown#34
Merged
anilcancakir merged 2 commits intomainfrom Apr 8, 2026
Merged
feat: move theme toggle from sidebar to user profile dropdown#34anilcancakir merged 2 commits intomainfrom
anilcancakir merged 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
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
MagicStarterUserProfileDropdownthat 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]. |
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.
86e516f to
321663b
Compare
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.
Summary
Closes #30
Test plan
shows theme toggle in dropdown menu— verifies toggle label and icon visible