diff --git a/CHANGES.md b/CHANGES.md index 39fa8208c..847d2686e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -32,6 +32,7 @@ - Fix problem when drawing boxes won't detect mouse-up [Taiga #4618](https://tree.taiga.io/project/penpot/issue/4618) - Fix missing loading icon on shared libraries [Taiga #4148](https://tree.taiga.io/project/penpot/issue/4148) - Fix selection stroke missing in properties of multiple texts [Taiga #4048](https://tree.taiga.io/project/penpot/issue/4048) +- Fix missing create component menu for frames [Github #2670](https://github.com/penpot/penpot/issues/2670) ### :arrow_up: Deps updates diff --git a/frontend/src/app/main/ui/workspace/context_menu.cljs b/frontend/src/app/main/ui/workspace/context_menu.cljs index eda6e725b..550b68556 100644 --- a/frontend/src/app/main/ui/workspace/context_menu.cljs +++ b/frontend/src/app/main/ui/workspace/context_menu.cljs @@ -398,7 +398,6 @@ [{:keys [shapes]}] (let [single? (= (count shapes) 1) - has-frame? (->> shapes (d/seek cph/frame-shape?)) has-component? (some true? (map #(contains? % :component-id) shapes)) is-component? (and single? (-> shapes first :component-id some?)) @@ -454,19 +453,18 @@ :accept-style :primary :on-accept do-update-component-in-bulk}))] [:* - (when (not has-frame?) - [:* - [:& menu-separator] - [:& menu-entry {:title (tr "workspace.shape.menu.create-component") - :shortcut (sc/get-tooltip :create-component) - :on-click do-add-component}] - (when (and has-component? (not single?)) - [:* - [:& menu-entry {:title (tr "workspace.shape.menu.detach-instances-in-bulk") - :shortcut (sc/get-tooltip :detach-component) - :on-click do-detach-component-in-bulk}] - [:& menu-entry {:title (tr "workspace.shape.menu.update-components-in-bulk") - :on-click do-update-in-bulk}]])]) + [:* + [:& menu-separator] + [:& menu-entry {:title (tr "workspace.shape.menu.create-component") + :shortcut (sc/get-tooltip :create-component) + :on-click do-add-component}] + (when (and has-component? (not single?)) + [:* + [:& menu-entry {:title (tr "workspace.shape.menu.detach-instances-in-bulk") + :shortcut (sc/get-tooltip :detach-component) + :on-click do-detach-component-in-bulk}] + [:& menu-entry {:title (tr "workspace.shape.menu.update-components-in-bulk") + :on-click do-update-in-bulk}]])] (when is-component? ;; WARNING: this menu is the same as the context menu at the sidebar.