forked from quarck/CalendarNotification
-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: main activity UI split #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
williscool
wants to merge
3
commits into
master
Choose a base branch
from
cursor/main-activity-ui-split-560a
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+1,491
−1,005
Conversation
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
|
Cursor Agent can help with this pull request. Just |
…vities - Create MainActivityBase with shared functionality (permissions, lifecycle, common menu items) - Create MainActivityLegacy for the original monolithic UI with single RecyclerView - Create MainActivityModern for fragment-based navigation with bottom tabs - Simplify MainActivity to be a router that delegates to the appropriate activity - Update AndroidManifest to declare new activities - Update NavigationSettingsFragmentX to launch activities directly - Update test fixtures to launch MainActivityLegacy directly for legacy UI tests - Add launchMainActivityModern() to UITestFixture for modern UI tests This refactoring separates the two distinct UI implementations that were previously controlled by a runtime flag (useNewNavigationUI). Each activity now has clear responsibility, making the code easier to maintain and test. The backward compatibility aliases in MainActivity.companion ensure existing code referencing storage providers continues to work. Co-authored-by: wharris <wharris@upscalews.com>
Co-authored-by: wharris <wharris@upscalews.com>
be4054a to
04ff9ef
Compare
Code Coverage Report
Files
|
📊 Code Coverage Summary
|
📊 Code Coverage Summary
|
- Extend SearchableFragment interface with mute/dismiss all support methods - Implement new methods in ActiveEventsFragment - Show Mute All and Dismiss All menu items only on Active Events tab - Handle menu item clicks with confirmation dialogs - Notify fragment to reload data after bulk actions Quiet hours is deprecated so remains hidden in modern UI. Co-authored-by: wharris <wharris@upscalews.com>
📊 Code Coverage Summary
|
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.
fast follow p4
Splits
MainActivityinto a router and dedicatedMainActivityLegacyandMainActivityModernactivities to separate dual UI implementations.The original
MainActivitycontained intertwined logic for both a legacy RecyclerView UI and a newer fragment-based navigation UI, leading to significant code duplication and conditional branching. This refactoring isolates each UI into its own activity, improving maintainability, testability, and preparing the modern UI for future enhancements.Note
Separates dual UIs and centralizes shared behavior for clarity and testability.
MainActivityBasefor shared lifecycle, permissions, and utilities (incl. storage providers andcleanupOrphanedEvents)MainActivityas a router that forwards toMainActivityLegacyorMainActivityModernbased onSettings.useNewNavigationUI(preserves intent extras)MainActivityLegacy(original RecyclerView UI) andMainActivityModern(fragment + bottom nav) with dedicated menu/search handlingMainActivity.companiondelegating toMainActivityBaseAndroidManifest.xmlto declareMainActivityLegacy/MainActivityModernand keepMainActivityas launcherNavigationSettingsFragmentXto launch the specific activity after toggling the UI settingMainActivityLegacy/MainActivityModerndirectly; adds instrumentation test for Dismissed tab; minor test cleanup and dialog handlingdocs/dev_todo/main_activity_split.mdoutlining the refactorWritten by Cursor Bugbot for commit be4054a. This will update automatically on new commits. Configure here.