mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 16:02:46 +08:00
UX: Fix edit navigation tags modal height too long on desktop (#24765)
Why this change? The tags modal loads more tags via infinite loading based on when the last tag in the given page appears in the viewport for the user. When it comes in to view, a request is then triggered to fetch additional tags. To ensure that we are only loading a single page of tags each time the modal is opened, we previously set a max height on the modal's body to ensure that the last tag which appears in the modal will be outside of the view port in the initial load. However, this has regressed recently due to unknown reasons and resulted in multiple pages of tags being loaded immediately from the server as the modal's height was not restricted. This regression was caught by an existing test but was unfortunately determined as flaky. What does this change do? This change restores the max height on the edit navigation menu tags modal on dekstop.
This commit is contained in:
parent
1a8b1fc698
commit
7aab65887f
|
@ -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
|
||||
) {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@import "more-topics";
|
||||
@import "sidebar/edit-navigation-menu/tags-modal";
|
||||
@import "user-card";
|
||||
@import "user-info";
|
||||
@import "user-stream-item";
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
.sidebar__edit-navigation-menu__tags-modal {
|
||||
.d-modal__body {
|
||||
max-height: 30vh;
|
||||
}
|
||||
}
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user