Make conditional logic dropdown options label/value update with field options#1601
Conversation
WalkthroughThe recent update significantly enhances the management of choice values and labels in a JavaScript file by introducing new helper functions for improved data manipulation. These changes streamline the retrieval of old and new values or labels and include a function to fetch conditional logic options based on field IDs. Overall, these enhancements improve the usability and functionality of the form management interface. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Form as Form Management
participant Helper as Helper Functions
User->>Form: Modify option text
Form->>Helper: Call getChoiceOldAndNewValues
Helper-->>Form: Return old/new values
Form->>Helper: Call getChoiceOldValueAndLabel
Helper-->>Form: Return old label
Form->>Helper: Call getChoiceNewValueAndLabel
Helper-->>Form: Return new label
Form->>Form: Update option if necessary
Form->>User: Reflect changes in UI
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1601 +/- ##
============================================
+ Coverage 29.55% 29.60% +0.05%
- Complexity 7821 7860 +39
============================================
Files 119 121 +2
Lines 25762 25952 +190
============================================
+ Hits 7613 7683 +70
- Misses 18149 18269 +120 ☔ View full report in Codecov by Sentry. |
garretlaxton
left a comment
There was a problem hiding this comment.
This works great! The conditional logic dropdowns show the updated field values.
|
@AbdiTolesa I got 2 problems:
Please see my screen recording: Screen.Recording.2024-04-03.at.20.14.12.mov |
@truongwp Thanks for catching those issues! They are both fixed now if you can check again. @truongwp I have updated this code to handle some edge cases and I believe it could use your review now. Thank you in adavance! |
@Crabcyborg I have fixed the merge conflict now. |
There was a problem hiding this comment.
Thanks @AbdiTolesa @truongwp and @garretlaxton for working on this!
I think this is good to merge now.
🚀
Fix https://github.com/Strategy11/formidable-pro/issues/2911
Requires https://github.com/Strategy11/formidable-pro/pull/4940
Test steps