Skip to content

A platform for community discussion. Free, open, simple.

UX: Fix edit navigation tags modal height too long on desktop (#24765)

Alan Guo Xiang Tan7aab65887ffc
diff --git a/app/assets/stylesheets/common/base/modal.scss b/app/assets/stylesheets/common/base/modal.scss
index 47d22188262..a11bc27f75c 100644
--- a/app/assets/stylesheets/common/base/modal.scss
+++ b/app/assets/stylesheets/common/base/modal.scss
@@ -243,9 +243,7 @@
}
}
- &:not(.bookmark-reminder-modal):not(.history-modal):not(
- .sidebar__edit-navigation-menu__modal
- ) {
+ &:not(.bookmark-reminder-modal):not(.history-modal) {
.modal-body:not(.reorder-categories):not(.poll-ui-builder):not(
.poll-breakdown
) {
diff --git a/app/assets/stylesheets/desktop/components/_index.scss b/app/assets/stylesheets/desktop/components/_index.scss
index 895dda8fa7a..72479eca716 100644
--- a/app/assets/stylesheets/desktop/components/_index.scss
+++ b/app/assets/stylesheets/desktop/components/_index.scss
@@ -1,4 +1,5 @@
@import "more-topics";
+@import "sidebar/edit-navigation-menu/tags-modal";
@import "user-card";
@import "user-info";
@import "user-stream-item";
diff --git a/app/assets/stylesheets/desktop/components/sidebar/edit-navigation-menu/tags-modal.scss b/app/assets/stylesheets/desktop/components/sidebar/edit-navigation-menu/tags-modal.scss
new file mode 100644
index 00000000000..dc7fa44a79e
--- /dev/null
+++ b/app/assets/stylesheets/desktop/components/sidebar/edit-navigation-menu/tags-modal.scss
@@ -0,0 +1,5 @@
+.sidebar__edit-navigation-menu__tags-modal {
+ .d-modal__body {
+ max-height: 30vh;
+ }
+}
diff --git a/spec/system/editing_sidebar_tags_navigation_spec.rb b/spec/system/editing_sidebar_tags_navigation_spec.rb
index 59e153e0fd3..82f903bf862 100644
--- a/spec/system/editing_sidebar_tags_navigation_spec.rb
+++ b/spec/system/editing_sidebar_tags_navigation_spec.rb
@@ -177,11 +177,11 @@ RSpec.describe "Editing sidebar tags navigation", type: :system do
expect(modal).to have_tag_checkboxes([tag1, tag2, tag3, tag4])
end
- xit "loads more tags when the user scrolls views the last tag in the modal and there is more tags to load" do
+ it "loads more tags when the user scrolls views the last tag in the modal and there is more tags to load" do
Tag.delete_all
tags =
- (TagsController::LIST_LIMIT + 50).times.map do |index|
+ (TagsController::LIST_LIMIT + 1).times.map do |index|
Fabricate(:tag, name: "Tag #{sprintf("%03d", index)}")
end