appsmith
appsmith copied to clipboard
feat: reset meta widgets
Description
With the introduction of metaWidgets there is a need to reset a metaWidget when "reset" is triggered on its parent (and there is a setting to reset children).
This PR introduces the reset functionality for metaWidgets.
Test these changes on List widget V2 in this DP
Fixes #18811
Type of change
- New feature (non-breaking change which adds functionality)
How Has This Been Tested?
- Automated tests will be updated on the List Widget V2 feature PR
Test Plan
Add Testsmith test cases links that relate to this PR
Issues raised during DP testing
Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR)
Checklist:
Dev activity
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag
QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or manual QA
- [ ] Organized project review call with relevant stakeholders after Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| appsmith | ✅ Ready (Inspect) | Visit Preview | Dec 12, 2022 at 8:06AM (UTC) |
- Added a new function getWidgetDescendantToReset which returns all the descendant widgets of given widgetId.
- This is used in resetChildrenMetaSaga to find out metaWidgets whose values have been changed and need to be resetted back to default value, when parent's property changes.
- Also added sortWidgetsMetaByParent utility function for sorting metawidget by their parents id (parentId + "_")
/ok-to-test sha=92ac4a2
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3655165180.
Workflow: Appsmith External Integration Test Workflow.
Commit: 92ac4a2.
PR: 18809.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=18809&runId=3655165180_1
/ok-to-test sha=5840619
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3673782587.
Workflow: Appsmith External Integration Test Workflow.
Commit: 5840619.
PR: 18809.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=18809&runId=3673782587_1
Tested this PR on this DP and LGTM
- Tested reset functionality on List v2
- Tested reset functionality on child and parent widgets
- Tested reset functionality with List inside List widget