-
-
Notifications
You must be signed in to change notification settings - Fork 45
Fix sync buttons in learn and delivery progress pages #2985
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
Conversation
…e refresh menu option.
📝 WalkthroughWalkthroughThe pull request modifies three fragments to update the way menu item selection events are handled. In both the ConnectDeliveryProgressFragment and ConnectLearningProgressFragment classes, a new implementation of the Sequence Diagram(s)sequenceDiagram
participant User
participant Fragment
participant Superclass
User->>Fragment: Select MenuItem
Fragment->>Fragment: onOptionsItemSelected(MenuItem)
alt MenuItem is 'action_sync'
Fragment->>Fragment: refreshData()
Fragment-->>User: return true
else Other MenuItem
Fragment->>Superclass: onOptionsItemSelected(MenuItem)
Superclass-->>Fragment: handle selection
Fragment-->>User: return result
end
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🔇 Additional comments (3)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
…tton in toolbar from each relevant fragment
|
Per Jignesh's suggestion: Fragment.onOptionsItemSelected is deprecated, and the modern approach is for fragments to add a MenuProvider to handle custom actions. Change made in 7624441, including updating the Connect home page to use the modern approach. |
https://dimagi.atlassian.net/browse/CCCT-839
cross-request: dimagi/commcare-core#1455
Product Description
Sync button in top-right corner now functional in Learn Progress and Delivery Progress pages.
Technical Summary
The two fragments needed to override the onMenuItemSelected function and, when the sync action was selected by the user, initiate a data refresh.
Feature Flag
Connect
Safety Assurance
Safety story
The added code is similar to what's already in the opportunity list page to do a refresh there.
Automated test coverage
No automated tests for Connect yet.
QA Plan
To add to the test plan if not already there:
Labels and Review