appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

feat: update property name automatically when custom column name is changed

Open souma-ghosh opened this issue 3 years ago • 23 comments
trafficstars

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

  1. Table widget property pane > Columns
  2. 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

souma-ghosh avatar Nov 02 '22 09:11 souma-ghosh

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)

vercel[bot] avatar Nov 02 '22 09:11 vercel[bot]

/ok-to-test sha=7a502ff

souma-ghosh avatar Nov 02 '22 10:11 souma-ghosh

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

github-actions[bot] avatar Nov 02 '22 11:11 github-actions[bot]

/ok-to-test sha=7a502ff

souma-ghosh avatar Nov 03 '22 07:11 souma-ghosh

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

github-actions[bot] avatar Nov 03 '22 07:11 github-actions[bot]

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

github-actions[bot] avatar Nov 14 '22 16:11 github-actions[bot]

/ok-to-test sha=2c1772d

souma-ghosh avatar Nov 24 '22 12:11 souma-ghosh

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

github-actions[bot] avatar Nov 24 '22 12:11 github-actions[bot]

Deployment failed with the following error:

Resource is limited - try again in 17 minutes (more than 100, code: "api-deployments-free-per-day").

vercel[bot] avatar Nov 25 '22 04:11 vercel[bot]

/ok-to-test sha=d3d1968

souma-ghosh avatar Nov 25 '22 04:11 souma-ghosh

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

github-actions[bot] avatar Nov 25 '22 06:11 github-actions[bot]

/ok-to-test sha=d3d1968

souma-ghosh avatar Nov 29 '22 10:11 souma-ghosh

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

github-actions[bot] avatar Nov 29 '22 10:11 github-actions[bot]

/ok-to-test sha=9175e20

souma-ghosh avatar Nov 30 '22 07:11 souma-ghosh

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

github-actions[bot] avatar Nov 30 '22 08:11 github-actions[bot]

@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

souma-ghosh avatar Dec 01 '22 07:12 souma-ghosh

Test Plan for this PR: https://github.com/appsmithorg/TestSmith/issues/2095

chandannkumar avatar Dec 02 '22 06:12 chandannkumar

/ok-to-test sha=9175e20

souma-ghosh avatar Dec 02 '22 06:12 souma-ghosh

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

chandannkumar avatar Dec 02 '22 08:12 chandannkumar

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

github-actions[bot] avatar Dec 02 '22 08:12 github-actions[bot]

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
  1. 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.
  2. 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 column label to identify and make the columns unique. We show an error when non unique columns are encountered. Should this behaviour be sufficient?

souma-ghosh avatar Dec 02 '22 11:12 souma-ghosh

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.

dilippitchika avatar Dec 05 '22 11:12 dilippitchika

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 status so it becomes statu then type back the s again (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 statu and not status

souma-ghosh avatar Dec 05 '22 12:12 souma-ghosh

@chandannkumar Both the above mentioned issues are already happening in prod. We can move ahead

souma-ghosh avatar Dec 07 '22 06:12 souma-ghosh

/ok-to-test sha=9175e20

souma-ghosh avatar Dec 07 '22 06:12 souma-ghosh

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

github-actions[bot] avatar Dec 07 '22 06:12 github-actions[bot]

Tested this PR and working as expected

chandannkumar avatar Dec 07 '22 07:12 chandannkumar