feat: Command click navigation via code
Description
Navigate to different entities in Appsmith with CMD + Click just like a text editor.
Resolves #15652 Resolves #18663
https://www.loom.com/share/0a286a0a945146cbbf6727ae2268d483
Type of change
- New Feature
How Has This Been Tested?
- Manual
- Jest
- Cypress
Test Plan
https://github.com/appsmithorg/TestSmith/issues/2092
Issues raised during DP testing
- [ ] https://github.com/appsmithorg/appsmith/pull/18326#issuecomment-1323433183
- [ ] Blocker issue: https://github.com/appsmithorg/appsmith/pull/18326#issuecomment-1334963239
- [ ] https://github.com/appsmithorg/appsmith/pull/18326#issuecomment-1335157455
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
- [x] 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
- [ ] 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
Unable to find test scripts. Please add necessary tests to the PR.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| appsmith | ✅ Ready (Inspect) | Visit Preview | Dec 8, 2022 at 9:58AM (UTC) |
/ok-to-test
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3520503778.
Workflow: Appsmith External Integration Test Workflow.
Commit: ``.
PR: 18326.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=18326&runId=3520503778_1
- [x] Reword text since it's a bit ambigious now. Something like "Press down on Ctrl/Cmd keys to navigate on click"
- [ ] Navigation shows up only for JS object name, not function name
- [x] Navigation does not show up for Appsmith framework functions, like for example, inside a
showModal("modalName"),closeModal("modalName"),resetWidget('WidgetName') - [x] Navigation does not show up when using
this.functionNameon a JS object (tracked as part of phase 2 #18585) - [x] Dynamic binding of a widget in an API URL param is not recognized for click navigation
- [ ] If there's a reference with the same name, for example a store value as
helloWorldand a widget calledhelloWorldthenappsmith.store.helloWorldnavigates to the widget.removeValue('helloWorld')andsetInterval,clearIntervalandsetTimeoutall have this problem - [x] References such as the one seen below does not show navigation (removing single quotes fixes the issue)
- [x] Query reference stays even after deletion but widget reference is removed so cursor turns into a click icon when hovered over such a binding - this behaviour is normalized as with widget reference once page is refreshed (cannot reproduce anymore)
- [x] If a modal is open and a widget reference is clicked, then control navigates to the clicked widget but modal does not close
- [x] Contrary of the above scenario is also true, modals don't open on navigation
Unable to find test scripts. Please add necessary tests to the PR.
Unable to find test scripts. Please add necessary tests to the PR.
/ok-to-test
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3525243126.
Workflow: Appsmith External Integration Test Workflow.
Commit: ``.
PR: 18326.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=18326&runId=3525243126_1
Unable to find test scripts. Please add necessary tests to the PR.
Unable to find test scripts. Please add necessary tests to the PR.
/ok-to-test sha=6cda633
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3583303002.
Workflow: Appsmith External Integration Test Workflow.
Commit: 6cda633.
PR: 18326.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=18326&runId=3583303002_1
Also think we could avoid/remove/modify some code here handling the modal widget since widget selection can take care of it in the middle ware. https://github.com/appsmithorg/appsmith/blob/release/app/client/src/pages/Editor/Explorer/Widgets/useNavigateToWidget.ts
/ok-to-test sha=8565f75
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3594413605.
Workflow: Appsmith External Integration Test Workflow.
Commit: 8565f75.
PR: 18326.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=18326&runId=3594413605_1
Unable to find test scripts. Please add necessary tests to the PR.
are tests being added?
- [x] Blocker issue: object body is replaced when going back on the browser https://www.loom.com/share/de4865bb8dea47ef9c144716610fcf31 Steps:
- Navigate from
JSObj1toJSObj2and back - Use browser or mousepad shortcut to go back to
JSObj1fromJSObj2 - Observe the object body of
JSObj1is replaced withJSObj2 - Refreshing the page reverts the temporary object body replacement - BUT, interacting with the object replaces the text and user looses their code
Can be tracked at #18663
Unable to find test scripts. Please add necessary tests to the PR.
Unable to find test scripts. Please add necessary tests to the PR.
/ok-to-test sha=14ff4ce
- [x] Object reference is retained even after modification https://www.loom.com/share/443cc3b0f84f41739ee2d2ba3865ce43
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3601937492.
Workflow: Appsmith External Integration Test Workflow.
Commit: 14ff4ce.
PR: 18326.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=18326&runId=3601937492_1
/ok-to-test sha=3bd89a6
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3620619131.
Workflow: Appsmith External Integration Test Workflow.
Commit: 3bd89a6.
PR: 18326.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=18326&runId=3620619131_1
/ok-to-test sha=4374258
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3621647443.
Workflow: Appsmith External Integration Test Workflow.
Commit: 4374258.
PR: 18326.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=18326&runId=3621647443_1
/ok-to-test sha=11f0d7b
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3627348401.
Workflow: Appsmith External Integration Test Workflow.
Commit: 11f0d7b.
PR: 18326.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=18326&runId=3627348401_1