-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Make external portals open in new tab when clicked #3497
Conversation
Removed vultr server and associated DNS entries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also left this on Trello for full visibility - bit of a design issue here I've just realised.
The default behaviour when right-clicking (opening the context menu) is disabled when clicking on nodes as this is our hidden copy/paste shortcut.
If we enable right-click on a node, we’d need an alternative copy/paste option handled somehow.
Currently I can click on a node and open in-place, or ⌘ + click
to open in a new tab - both options are available. If we just make nodes open in a new tab, the user loses the option to open in-place and is forced to open in new tab.
The PR does exactly as the ticket asks, but on reflection maybe this is not the right approach?
@DafyddLlyr Great feedback! We're definitely on the same wavelength with this, I was tossing and turning over whether it is a simpler flow to Are you suggesting we look rather into a feature to right click and open in a new tab? |
I actually think the right thing to do here is nothing (for now!), until we design and implement an alternative approach to copy/paste which is currently hijacking the right-click interaction. We can discuss with the wider group on Thursday at planning 👍 Any thoughts on this @ianjon3s? |
@RODO94 and I briefly discussed this and our thoughts are — as external portals cannot be cloned, if there is a simple way to allow right-click on only external portals (removing the right-click hijack for only them), then we'll proceed with that. If not, leave as-is for now in favour of moving towards a context menu (or alternative to right-click to clone) for all components. |
Ah that's a very good thought 🙌 There is already error handling for pasting external portals - so it makes sense to not allow them to be copied. If you just remove the |
Converting to Draft as there's still a bit of investigation and code to be added prior to any further review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small thing which has been missed!
editor.planx.uk/src/pages/FlowEditor/components/Flow/components/Portal.tsx
Outdated
Show resolved
Hide resolved
@RODO94 happy to do a final review of this one once that final comment from Daf is accounted for so it can be merged before he's back ! Will check back later today 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for final adjustments here, works exactly as expected for me ✔️
What does this PR do?
This PR adds functionality to open external portals in new tabs when they are clicked in the flow editor.
The work follows this Trello ticket: https://trello.com/c/MJ5VSADN/2960-could-external-portals-open-in-a-new-browser-tab-rather-than-in-window
I did think if it were better to enable right clicking to select what you'd like depending on your brower (new tab, new window etc...) but decided I'd follow the ticket explicitly first and see if more is required.