Add editor v2 welcome spotlight and default path routing#2473
Conversation
🎩 PreviewA preview build has been created at: |
a79b994 to
65b2b39
Compare
camielvs
left a comment
There was a problem hiding this comment.
I like the idea. But I also feel it's a bit of a bandaid. We can also fix this by just making v2 editor the default and mounting it on the /editor basepath. The old legacy editor, if we want to keep it around for a bit longer, can go on a different path.
tl;dr let's move v2 editor out of beta and this PR is basically no longer needed.
65b2b39 to
321bedc
Compare
I agree that making Editor V2 the default and eventually mounting it at /editor is the right end state. I’d like to keep this PR This PR is not meant to remove the beta flag or rename routes yet. It is just turning the existing V2 editor flag on by default, Once we are fully ready to replace the legacy editor, we can do the larger cleanup: remove the beta flag, move V2 to /editor, and |

Description
Introduces a
getDefaultEditorPathhelper in a newsrc/routes/editorRoutes.tsmodule that resolves the correct editor path based on whether thev2_editorfeature flag is enabled. When the flag is on, navigation targets/editor-v2/<pipelineName>; otherwise it falls back to/editor/<pipelineName>. All hardcoded editor path constructions across the codebase have been replaced with this helper.Additionally, the
editorV2RouteandeditorV2PipelineRouteroutes now include abeforeLoadguard that redirects users to the legacy editor (or pipelines dashboard) if thev2_editorflag is disabled, preventing direct access to the v2 editor without the flag.A first-time welcome spotlight (
EditorV2WelcomeSpotlight) has been added. When a user lands on the v2 editor for the first time, a spotlight overlay highlights the editor version toggle button with a brief explanatory card. Dismissal is persisted to local storage so the spotlight is only shown once.The
component_searchfeature flag default has been changed fromfalsetotrue, enabling the experimental component search by default.Related Issue and Pull requests
Type of Change
Checklist
Screenshots (if applicable)
Test Instructions
v2_editorfeature flag and verify that all navigation entry points (pipeline row clicks, new pipeline button, import, run toolbar, favorites, recently viewed) route to/editor-v2/<name>.v2_editorflag and confirm all the same entry points route to/editor/<name>and that direct navigation to/editor-v2/<name>redirects appropriately.v2_editorflag enabled, open the v2 editor for the first time and confirm the welcome spotlight appears over the version toggle button, can be dismissed via the "Got it" button, Escape key, or clicking outside, and does not reappear after dismissal.Additional Comments
The
getDefaultEditorPathutility centralises all editor URL construction, making future editor version routing changes a single-file update.