Skip to content

Commit

Permalink
IDE(preview-panel): link to see preview in a new tab
Browse files Browse the repository at this point in the history
Add a link that allows to open the preview in a new tab. This also works
in safari btw ;)
  • Loading branch information
siddhantk232 authored and amitu committed Oct 2, 2024
1 parent c70ab12 commit bd5a448
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions components/editor/panels/preview.ftd
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ padding-vertical.px: 6
spacing.fixed.px: 5
align-content: center

-- preview-url:
hover: $preview-header.hover
$show-panel: $preview-header.toggle-visibility-flag

-- toggle-width:
hover: $preview-header.hover
$flag: $preview-header.preview-maximized
Expand All @@ -91,7 +95,23 @@ padding-vertical.px: 6

-- end: preview-header

-- component preview-url:
boolean hover:
boolean $show-panel:

-- ftd.column:
classes if { !preview-url.hover }: hidden
;; hide the preview panel since the user is relying on an external browser tab
$on-click$: $ftd.toggle($a = $preview-url.show-panel)
link: $vars.preview-url
open-in-new-tab: true

-- phosphor.light: arrow-square-out
size: 14

-- end: ftd.column

-- end: preview-url

-- component toggle-width:
boolean $flag: false
Expand Down

0 comments on commit bd5a448

Please sign in to comment.