From 38efa88460b30ee9efcf573a5979d876aa9678eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bel=C3=A9n=20Albeza?= Date: Wed, 3 Dec 2025 22:41:20 +0100 Subject: [PATCH] :bug: Fix unpublish library modal not scrolling file list (#7892) * :bug: Fix unpublish library modal not scrolling when the linked files list is too long * :lipstick: Remove deprecated tokens in unpublish library modal * :wrench: Update CHANGELOG --- CHANGES.md | 1 + frontend/src/app/main/ui/delete_shared.cljs | 16 ++++++------ frontend/src/app/main/ui/delete_shared.scss | 29 +++++++++++++++------ 3 files changed, 30 insertions(+), 16 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index f1e153712d..1f541a0a9e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -90,6 +90,7 @@ example. It's still usable as before, we just removed the example. - Fix copy/pasting application/transit+json [Taiga #12721](https://tree.taiga.io/project/penpot/issue/12721) - Fix problem with plugins content attribute [Plugins #209](https://github.com/penpot/penpot-plugins/issues/209) - Fix U and E icon displayed in project list [Taiga #12806](https://tree.taiga.io/project/penpot/issue/12806) +- Fix unpublish library modal not scrolling a long file list [Taiga #12285](https://tree.taiga.io/project/penpot/issue/12285) ## 2.11.1 diff --git a/frontend/src/app/main/ui/delete_shared.cljs b/frontend/src/app/main/ui/delete_shared.cljs index 43a2a2425b..51fcb8225e 100644 --- a/frontend/src/app/main/ui/delete_shared.cljs +++ b/frontend/src/app/main/ui/delete_shared.cljs @@ -106,14 +106,14 @@ (when (not= 0 count-libraries) (if (pos? (count references)) [:* - [:div - (when (and (string? scd-msg) (not= scd-msg "")) - [:h3 {:class (stl/css :modal-scd-msg)} scd-msg]) - [:ul {:class (stl/css :element-list)} - (for [[file-id file-name] references] - [:li {:class (stl/css :list-item) - :key (dm/str file-id)} - [:span "- " file-name]])]] + (when (and (string? scd-msg) (not= scd-msg "")) + [:p {:class (stl/css :modal-scd-msg)} scd-msg]) + + [:ul {:class (stl/css :element-list)} + (for [[file-id file-name] references] + [:li {:class (stl/css :list-item) + :key (dm/str file-id)} + [:span "- " file-name]])] (when (and (string? hint) (not= hint "")) [:> context-notification* {:level :info :appearance :ghost} diff --git a/frontend/src/app/main/ui/delete_shared.scss b/frontend/src/app/main/ui/delete_shared.scss index ff842933da..8e06bb4720 100644 --- a/frontend/src/app/main/ui/delete_shared.scss +++ b/frontend/src/app/main/ui/delete_shared.scss @@ -4,7 +4,8 @@ // // Copyright (c) KALEIDOS INC -@use "refactor/common-refactor.scss" as deprecated; +@use "refactor/basic-rules.scss" as *; +@use "ds/typography.scss" as t; .modal-overlay { @extend .modal-overlay-base; @@ -15,14 +16,19 @@ .modal-container { @extend .modal-container-base; + display: grid; + gap: var(--sp-xxl); + grid-template-rows: auto minmax(0, 1fr) auto; } -.modal-header { - margin-bottom: deprecated.$s-24; +.list-wrapper { + display: grid; + grid-template-rows: auto 1fr auto; + max-height: 100%; } .modal-title { - @include deprecated.headlineMediumTypography; + @include t.use-typography("headline-medium"); color: var(--modal-title-foreground-color); } @@ -31,13 +37,16 @@ } .modal-content { - @include deprecated.bodySmallTypography; - margin-bottom: deprecated.$s-24; + @include t.use-typography("body-small"); + display: grid; + gap: var(--sp-s); } .element-list { - @include deprecated.bodyLargeTypography; + @include t.use-typography("body-large"); color: var(--modal-text-foreground-color); + overflow-y: scroll; + margin-block: 0; } .action-buttons { @@ -55,10 +64,14 @@ } } +.modal-scd-msg { + margin-block: 0; +} + .modal-scd-msg, .modal-subtitle, .modal-msg { - @include deprecated.bodyLargeTypography; + @include t.use-typography("body-large"); color: var(--modal-text-foreground-color); line-height: 1.5; }