Enhance the behaviour of the artboards list on view mode

This commit is contained in:
Pablo Alba 2022-02-02 18:55:33 +01:00 committed by Andrés Moya
parent 1797c702a7
commit 105cb6fa13
5 changed files with 22 additions and 5 deletions

View file

@ -8,6 +8,7 @@
- On user settings, hide the theme selector as long as we only have one theme [Taiga #2610](https://tree.taiga.io/project/penpot/us/2610) - On user settings, hide the theme selector as long as we only have one theme [Taiga #2610](https://tree.taiga.io/project/penpot/us/2610)
- Automatically open comments from dashboard notifications [Taiga #2605](https://tree.taiga.io/project/penpot/us/2605) - Automatically open comments from dashboard notifications [Taiga #2605](https://tree.taiga.io/project/penpot/us/2605)
- Enhance the behaviour of the artboards list on view mode [Taiga #2634](https://tree.taiga.io/project/penpot/us/2634)
- Add recent used fonts in font selection widget [Taiga #1381](https://tree.taiga.io/project/penpot/us/1381) - Add recent used fonts in font selection widget [Taiga #1381](https://tree.taiga.io/project/penpot/us/1381)
- Allow to align items relative to groups [Taiga #2533](https://tree.taiga.io/project/penpot/us/2533) - Allow to align items relative to groups [Taiga #2533](https://tree.taiga.io/project/penpot/us/2533)
- Scroll bars [Taiga #2550](https://tree.taiga.io/project/penpot/task/2550) - Scroll bars [Taiga #2550](https://tree.taiga.io/project/penpot/task/2550)

View file

@ -6,7 +6,7 @@
overflow: hidden; overflow: hidden;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
z-index: 10; z-index: 11;
&.invisible { &.invisible {
visibility: hidden; visibility: hidden;
@ -179,3 +179,14 @@
} }
} }
} }
.thumbnail-close {
grid-row: 1 / span 2;
grid-column: 1 / span 1;
z-index: 11;
}
.thumbnail-close.invisible {
visibility: hidden;
pointer-events: none;
}

View file

@ -230,6 +230,8 @@
:section section}] :section section}]
[:div.viewer-content [:div.viewer-content
[:div.thumbnail-close {:on-click #(st/emit! dv/close-thumbnails-panel)
:class (dom/classnames :invisible (not (:show-thumbnails local false)))}]
[:& thumbnails-panel {:frames frames [:& thumbnails-panel {:frames frames
:show? (:show-thumbnails local false) :show? (:show-thumbnails local false)
:page page :page page

View file

@ -172,6 +172,10 @@
(let [go-to-dashboard (let [go-to-dashboard
(st/emitf (dv/go-to-dashboard)) (st/emitf (dv/go-to-dashboard))
go-to-handoff
(fn []
(st/emit! dv/close-thumbnails-panel (dv/go-to-section :handoff)))
navigate navigate
(fn [section] (fn [section]
(st/emit! (dv/go-to-section section)))] (st/emit! (dv/go-to-section section)))]
@ -203,7 +207,7 @@
(and (= (:type permissions) :share-link) (and (= (:type permissions) :share-link)
(contains? (:flags permissions) :section-handoff))) (contains? (:flags permissions) :section-handoff)))
[:button.mode-zone-button.tooltip.tooltip-bottom [:button.mode-zone-button.tooltip.tooltip-bottom
{:on-click #(navigate :handoff) {:on-click go-to-handoff
:class (dom/classnames :active (= section :handoff)) :class (dom/classnames :active (= section :handoff))
:alt (tr "viewer.header.handoff-section" (sc/get-tooltip :open-handoff))} :alt (tr "viewer.header.handoff-section" (sc/get-tooltip :open-handoff))}
i/code])] i/code])]

View file

@ -104,8 +104,7 @@
{:class (dom/classnames :expanded @expanded? {:class (dom/classnames :expanded @expanded?
:invisible (not show?)) :invisible (not show?))
:ref container :ref container}
}
[:& thumbnails-summary {:on-toggle-expand #(swap! expanded? not) [:& thumbnails-summary {:on-toggle-expand #(swap! expanded? not)
:on-close on-close :on-close on-close