web-console: Move duplicate action into editor menu#6562
Conversation
mythical-fred
left a comment
There was a problem hiding this comment.
LGTM — cleanly co-locates Duplicate next to Delete in the editor's three-dot menu, where pipeline-level destructive/structural actions belong. The _duplicate snippet removal and the inlined button keep the disabled/title semantics intact.
One tiny nit (non-blocking): the squash-commit body is empty; the PR description is good context and would be worth keeping as the commit body so it survives in git log.
Karakatiza666
left a comment
There was a problem hiding this comment.
This is the correct clean fix, the UI now behaves as expected, thank you.
The one fix needed: instead of using title= on the Duplicate and Delete buttons please use
{#if editConfigDisabled}
<Tooltip class="whitespace-nowrap" placement="top">Stop the pipeline to delete it</Tooltip>
{/if}
and
<Tooltip placement="top">
{#if unsavedChanges}
Save the program before duplicating.
{:else}
{duplicatePipelineTooltip}
{/if}
</Tooltip>
(note that they are placed directly under trigger elements), and remove disabled:pointer-events-none and make sure the tooltip shows up.
4c197a2 to
6c29fbd
Compare
fixes #6110
the pipeline editor was still showing duplicate as a standalone icon after #6520. having duplicate visible while delete was hidden in the three-dot menu felt odd, and it also drifted from the ui in the original video.
this puts duplicate back in that menu and leaves the table action alone. duplicate and delete are both pipeline-level options on the editor page, so keeping them together matches the expected ui.
cc/ @snkas @Karakatiza666