0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-10 06:41:40 -05:00

🐛 Fix message popup remains open when exiting workspace

This commit is contained in:
Andrés Moya 2023-08-31 09:49:46 +02:00 committed by Alejandro Alonso
parent ad4e489312
commit 288030888a
3 changed files with 7 additions and 10 deletions

View file

@ -5,6 +5,7 @@
### :bug: Bugs fixed ### :bug: Bugs fixed
- List view is discarded on tab change on Workspace Assets Sidebar tab [Github #3547](https://github.com/penpot/penpot/issues/3547) - List view is discarded on tab change on Workspace Assets Sidebar tab [Github #3547](https://github.com/penpot/penpot/issues/3547)
- Fix message popup remains open when exiting workspace with browser back button [Taiga #5747](https://tree.taiga.io/project/penpot/issue/5747)
## 1.19.2 ## 1.19.2

View file

@ -8,8 +8,10 @@
(:require-macros [app.main.style :refer [css]]) (:require-macros [app.main.style :refer [css]])
(:require (:require
[app.common.data.macros :as dm] [app.common.data.macros :as dm]
[app.main.data.messages :as msg]
[app.main.data.modal :as modal] [app.main.data.modal :as modal]
[app.main.data.workspace :as dw] [app.main.data.workspace :as dw]
[app.main.data.workspace.colors :as dc]
[app.main.data.workspace.persistence :as dwp] [app.main.data.workspace.persistence :as dwp]
[app.main.features :as features] [app.main.features :as features]
[app.main.refs :as refs] [app.main.refs :as refs]
@ -185,6 +187,9 @@
(st/emit! (dw/initialize-file project-id file-id)) (st/emit! (dw/initialize-file project-id file-id))
(fn [] (fn []
(st/emit! ::dwp/force-persist (st/emit! ::dwp/force-persist
(dc/stop-picker)
(modal/hide)
msg/hide
(dw/finalize-file project-id file-id)))) (dw/finalize-file project-id file-id))))
[:& (mf/provider ctx/current-file-id) {:value file-id} [:& (mf/provider ctx/current-file-id) {:value file-id}

View file

@ -13,7 +13,6 @@
[app.main.data.exports :as de] [app.main.data.exports :as de]
[app.main.data.modal :as modal] [app.main.data.modal :as modal]
[app.main.data.workspace :as dw] [app.main.data.workspace :as dw]
[app.main.data.workspace.colors :as dc]
[app.main.data.workspace.common :as dwc] [app.main.data.workspace.common :as dwc]
[app.main.data.workspace.libraries :as dwl] [app.main.data.workspace.libraries :as dwl]
[app.main.data.workspace.shortcuts :as sc] [app.main.data.workspace.shortcuts :as sc]
@ -162,9 +161,7 @@
(st/emit! (ptk/event ::ev/event {::ev/name "show-release-notes" :version version})) (st/emit! (ptk/event ::ev/event {::ev/name "show-release-notes" :version version}))
(if (and (kbd/alt? event) (kbd/mod? event)) (if (and (kbd/alt? event) (kbd/mod? event))
(st/emit! (modal/show {:type :onboarding})) (st/emit! (modal/show {:type :onboarding}))
(st/emit! (modal/show {:type :release-notes :version version})))))) (st/emit! (modal/show {:type :release-notes :version version}))))))]
]
[:& dropdown {:show true :on-close on-close} [:& dropdown {:show true :on-close on-close}
[:ul.sub-menu.help-info [:ul.sub-menu.help-info
@ -582,16 +579,10 @@
(dom/prevent-default event) (dom/prevent-default event)
(reset! editing* true))) (reset! editing* true)))
close-modals
(mf/use-fn
#(st/emit! (dc/stop-picker)
(modal/hide)))
go-back go-back
(mf/use-fn (mf/use-fn
(mf/deps project) (mf/deps project)
(fn [] (fn []
(close-modals)
(st/emit! (dw/go-to-dashboard project)))) (st/emit! (dw/go-to-dashboard project))))
nav-to-viewer nav-to-viewer