appsmith
appsmith copied to clipboard
feat: update property name automatically when custom column name is changed
Description
This feature is only for custom columns. Users needed to change property name of custom columns every-time they changed the column name. Column name can be updated from 2 places
- Table widget property pane > Columns
- Column settings > title edit
This PR uses updateHook to change column alias of a custom column whenever the column label (column name) is changed.
Fixes #17142
Type of change
- New feature (non-breaking change which adds functionality)
How Has This Been Tested?
- Cypress tests
- Jest tests
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
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] 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:
- [x] Test plan has been approved by relevant developers
- [x] 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 | Nov 30, 2022 at 6:27AM (UTC) |
/ok-to-test sha=7a502ff
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3376898337.
Workflow: Appsmith External Integration Test Workflow.
Commit: 7a502ff.
PR: 18048.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=18048&runId=3376898337_1
/ok-to-test sha=7a502ff
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3383739278.
Workflow: Appsmith External Integration Test Workflow.
Commit: 7a502ff.
PR: 18048.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=18048&runId=3383739278_1
This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.
/ok-to-test sha=2c1772d
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3540678374.
Workflow: Appsmith External Integration Test Workflow.
Commit: 2c1772d.
PR: 18048.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=18048&runId=3540678374_1
Deployment failed with the following error:
Resource is limited - try again in 17 minutes (more than 100, code: "api-deployments-free-per-day").
/ok-to-test sha=d3d1968
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3545625936.
Workflow: Appsmith External Integration Test Workflow.
Commit: d3d1968.
PR: 18048.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=18048&runId=3545625936_1
/ok-to-test sha=d3d1968
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3573264011.
Workflow: Appsmith External Integration Test Workflow.
Commit: d3d1968.
PR: 18048.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=18048&runId=3573264011_1
/ok-to-test sha=9175e20
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3581507016.
Workflow: Appsmith External Integration Test Workflow.
Commit: 9175e20.
PR: 18048.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=18048&runId=3581507016_1
@dilippitchika About updating other widget bindings when we change the name of a custom column; we should create a separate issue to work on that.
As far as I understand the logic here has to be very much similar to what is happening to bindings when we update the name of a widget. e.g. when we update the name of a table from Table1 to Table12 all the dependencies that had Table1 in them get updated to Table12.
But we will need careful planning before going about this. I will create a separate issue and tag it here soon
Test Plan for this PR: https://github.com/appsmithorg/TestSmith/issues/2095
/ok-to-test sha=9175e20
Observation: @souma-ghosh
-
Unable to retain same name as before of custom column https://bthrujcsw8.vmaker.com/record/fLK5yGK4KrUBDsCU
-
On making duplicate custom column names, the populated data in Table is of the last column instead of the 1st custom column. What should be the correct behavior here? https://bthrujcsw8.vmaker.com/record/g7AtuERxBkfKe3rQ
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3599569365.
Workflow: Appsmith External Integration Test Workflow.
Commit: 9175e20.
PR: 18048.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=18048&runId=3599569365_1
Observation: @souma-ghosh
- Unable to retain same name as before of custom column https://bthrujcsw8.vmaker.com/record/fLK5yGK4KrUBDsCU
- On making duplicate custom column names, the populated data in Table is of the last column instead of the 1st custom column. What should be the correct behavior here? https://bthrujcsw8.vmaker.com/record/g7AtuERxBkfKe3rQ
- For the first one, the issue already existed before and is not as a result of this PR. We should create an issue for this.
- For the second one, @sbalaji1192 @dilippitchika could you comment on the expected behaviour for this scenario. According to my understanding since there is a duplicate column label the table should not be able to identify which column to pick up and show in the table or in
TableName.selectedRow. We are maintaining separate ids for each column but we are using columnlabelto identify and make the columns unique. We show an error when non unique columns are encountered. Should this behaviour be sufficient?
For 1, I didn't understand how this is an existing issue @souma-ghosh. What are the steps to reproduce?
For 2, It's expected behavior to show the key which matches at the end. So not an issue.
For 1, I didn't understand how this is an existing issue @souma-ghosh. What are the steps to reproduce?
For 2, It's expected behavior to show the key which matches at the end. So not an issue.
The issue mentioned in point 1 happens for any column Steps to reproduce 1
- Go into the column settings of any column
- Click on column title to edit it
- Delete the last character and type back the deleted letter again, e.g. backspace on
statusso it becomesstatuthen type back thesagain (don't save the column title anywhere in between this step) - Now save the title and come outside to the main property pane and observe that the column name is still
statuand notstatus
@chandannkumar Both the above mentioned issues are already happening in prod. We can move ahead
/ok-to-test sha=9175e20
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3636461385.
Workflow: Appsmith External Integration Test Workflow.
Commit: 9175e20.
PR: 18048.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=18048&runId=3636461385_1
Tested this PR and working as expected