From 54c63fef069c97317f730fd68c099b44f13a652c Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Thu, 26 Dec 2024 13:51:11 +0100 Subject: [PATCH 1/4] :bug: Fix create team modal when user is creating account via invitation --- frontend/src/app/main/ui.cljs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/ui.cljs b/frontend/src/app/main/ui.cljs index 418c14ad5..700883883 100644 --- a/frontend/src/app/main/ui.cljs +++ b/frontend/src/app/main/ui.cljs @@ -148,6 +148,7 @@ (let [{:keys [data params]} route props (get profile :props) section (get data :name) + team (mf/deref refs/team) show-question-modal? @@ -165,7 +166,8 @@ (and (contains? cf/flags :onboarding) (not (:onboarding-viewed props)) (not (contains? props :onboarding-team-id)) - (contains? props :newsletter-updates)) + (contains? props :newsletter-updates) + (:is-default team)) show-release-modal? (and (contains? cf/flags :onboarding) From 6bd1f19e36d32a869f20edf503e21c3d729a8908 Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Thu, 26 Dec 2024 15:44:03 +0100 Subject: [PATCH 2/4] :bug: Fix on libraries section, items shouldn't have context menu --- frontend/src/app/main/ui/dashboard/grid.cljs | 58 ++++++++++++-------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/frontend/src/app/main/ui/dashboard/grid.cljs b/frontend/src/app/main/ui/dashboard/grid.cljs index 8bc7fb657..2fee69696 100644 --- a/frontend/src/app/main/ui/dashboard/grid.cljs +++ b/frontend/src/app/main/ui/dashboard/grid.cljs @@ -331,6 +331,15 @@ client-position)] (st/emit! (dd/show-file-menu-with-position file-id position))))) + on-context-menu + (mf/use-fn + (mf/deps is-library-view) + (fn [event] + (dom/stop-propagation event) + (dom/prevent-default event) + (when-not is-library-view + (on-menu-click event)))) + edit (mf/use-fn (mf/deps file) @@ -373,7 +382,7 @@ :on-key-down handle-key-down :on-double-click on-navigate :on-drag-start on-drag-start - :on-context-menu on-menu-click} + :on-context-menu on-context-menu} [:div {:class (stl/css :overlay)}] @@ -392,31 +401,32 @@ [:h3 (:name file)]) [:& grid-item-metadata {:modified-at (:modified-at file)}]] - [:div {:class (stl/css-case :project-th-actions true :force-display (:menu-open dashboard-local))} - [:div - {:class (stl/css :project-th-icon :menu) - :tab-index "0" - :ref menu-ref - :id (str file-id "-action-menu") - :on-click on-menu-click - :on-key-down (fn [event] - (when (kbd/enter? event) - (dom/stop-propagation event) - (on-menu-click event)))} - menu-icon - (when (and selected? file-menu-open?) + (when-not is-library-view + [:div {:class (stl/css-case :project-th-actions true :force-display (:menu-open dashboard-local))} + [:div + {:class (stl/css :project-th-icon :menu) + :tab-index "0" + :ref menu-ref + :id (str file-id "-action-menu") + :on-click on-menu-click + :on-key-down (fn [event] + (when (kbd/enter? event) + (dom/stop-propagation event) + (on-menu-click event)))} + menu-icon + (when (and selected? file-menu-open?) ;; When the menu is open we disable events in the dashboard. We need to force pointer events ;; so the menu can be handled - [:div {:style {:pointer-events "all"}} - [:> file-menu* {:files (vals selected-files) - :left (+ 24 (:x (:menu-pos dashboard-local))) - :top (:y (:menu-pos dashboard-local)) - :can-edit can-edit - :navigate true - :on-edit on-edit - :on-menu-close on-menu-close - :origin origin - :parent-id (dm/str file-id "-action-menu")}]])]]]]])) + [:div {:style {:pointer-events "all"}} + [:> file-menu* {:files (vals selected-files) + :left (+ 24 (:x (:menu-pos dashboard-local))) + :top (:y (:menu-pos dashboard-local)) + :can-edit can-edit + :navigate true + :on-edit on-edit + :on-menu-close on-menu-close + :origin origin + :parent-id (dm/str file-id "-action-menu")}]])]])]]])) (mf/defc grid {::mf/props :obj} From 8ae326ed06513f4b5db61ad7ae82b44fa674674f Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Thu, 26 Dec 2024 16:17:46 +0100 Subject: [PATCH 3/4] :bug: Fix silent crash uploading a font too big --- frontend/src/app/main/ui/dashboard/fonts.cljs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/app/main/ui/dashboard/fonts.cljs b/frontend/src/app/main/ui/dashboard/fonts.cljs index 7ae210b5f..c9cb383fd 100644 --- a/frontend/src/app/main/ui/dashboard/fonts.cljs +++ b/frontend/src/app/main/ui/dashboard/fonts.cljs @@ -11,6 +11,7 @@ [app.common.media :as cm] [app.main.data.fonts :as df] [app.main.data.modal :as modal] + [app.main.data.notifications :as ntf] [app.main.repo :as rp] [app.main.store :as st] [app.main.ui.components.context-menu-a11y :refer [context-menu*]] @@ -109,6 +110,8 @@ (swap! uploading* disj id) (st/emit! (df/add-font font))) (fn [error] + (st/emit! (ntf/error (tr "errors.bad-font" (first (:names item))))) + (swap! fonts* dissoc id) (js/console.log "error" error)))))) on-upload From ad552eaf681a8c16305faea6e0034af76ee6ac3a Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Thu, 26 Dec 2024 12:32:35 +0100 Subject: [PATCH 4/4] :bug: Fix version history control exit is not intuitive --- frontend/src/app/main/ui/workspace/sidebar.cljs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/ui/workspace/sidebar.cljs b/frontend/src/app/main/ui/workspace/sidebar.cljs index 80f8a0379..13d978290 100644 --- a/frontend/src/app/main/ui/workspace/sidebar.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar.cljs @@ -14,6 +14,7 @@ [app.main.refs :as refs] [app.main.store :as st] [app.main.ui.context :as muc] + [app.main.ui.ds.buttons.icon-button :refer [icon-button*]] [app.main.ui.ds.foundations.assets.icon :refer [icon*]] [app.main.ui.ds.layout.tab-switcher :refer [tab-switcher*]] [app.main.ui.hooks.resize :refer [use-resize-hook]] @@ -205,6 +206,9 @@ (fn [section] (reset! current-section* section))) + on-close-history + (mf/use-fn #(st/emit! (dw/remove-layout-flag :document-history))) + handle-expand (mf/use-callback (mf/deps size) @@ -255,7 +259,12 @@ {:tabs #js [#js {:label (tr "workspace.versions.tab.history") :id "history" :content versions-tab} #js {:label (tr "workspace.versions.tab.actions") :id "actions" :content history-tab}] :default-selected "history" - :class (stl/css :left-sidebar-tabs)}] + :class (stl/css :left-sidebar-tabs) + :action-button-position "end" + :action-button (mf/html [:> icon-button* {:variant "ghost" + :aria-label (tr "labels.close") + :on-click on-close-history + :icon "close"}])}] :else [:> options-toolbox props])]]]))