mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Improve issue list filter (#24425)
Partial regression of #24393, not only regression, but broken for long time, 24393 didn't really improve it but used wrong `overflow: scroll`. Actually, that "ui secondary filter menu labels" shouldn't be set as scrollable (I missed that at that time), the problem is: if a "ui menu" has "dropdown" items, then it should not be scrollable. Otherwise the dropdown menu can't be shown correctly. And there are more problems: * The "issue-filters" shouldn't be used anywhere else (copying&pasting problem again ....) * There is also an "issue-actions" container, it should also be fixed. * There are similar problems on the milestone page. * The old comment in code: "grid column" doesn't work well. The major changes of this PR are: use "flex: 1" instead of "ui grid column". After this PR, not 100% perfect but much better than before.
This commit is contained in:
		@@ -32,6 +32,7 @@
 | 
			
		||||
@import "./repository.css";
 | 
			
		||||
@import "./repository/release-tag.css";
 | 
			
		||||
@import "./repository/issue-label.css";
 | 
			
		||||
@import "./repository/issue-list.css";
 | 
			
		||||
@import "./repository/list-header.css";
 | 
			
		||||
@import "./editor.css";
 | 
			
		||||
@import "./editor/combomarkdowneditor.css";
 | 
			
		||||
 
 | 
			
		||||
@@ -141,12 +141,19 @@
 | 
			
		||||
  font-size: 11px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.repository .filter.menu .menu {
 | 
			
		||||
/* make all issue filter dropdown menus popup leftward, to avoid go out the viewport (right side) */
 | 
			
		||||
.repository .filter.menu .ui.dropdown .menu {
 | 
			
		||||
  max-height: 500px;
 | 
			
		||||
  max-width: 300px;
 | 
			
		||||
  overflow-x: hidden;
 | 
			
		||||
  right: 0 !important;
 | 
			
		||||
  left: auto !important;
 | 
			
		||||
  right: 0;
 | 
			
		||||
  left: auto;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* the label-filter is the first dropdown, it shouldn't be shown leftward, otherwise it may go out the viewport (left side) */
 | 
			
		||||
.repository .filter.menu .ui.dropdown.label-filter .menu {
 | 
			
		||||
  right: unset;
 | 
			
		||||
  left: 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.repository .select-label .desc {
 | 
			
		||||
@@ -2394,10 +2401,6 @@
 | 
			
		||||
  margin: 6px 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#issue-actions {
 | 
			
		||||
  margin-top: -1rem !important; /* counteract padding from Semantic */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.ui.menu .item > img:not(.ui) {
 | 
			
		||||
  width: auto;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										14
									
								
								web_src/css/repository/issue-list.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								web_src/css/repository/issue-list.css
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
.issue-list-toolbar {
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-wrap: wrap;
 | 
			
		||||
  align-items: flex-start;
 | 
			
		||||
  gap: 1rem;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.issue-list-toolbar-left {
 | 
			
		||||
  display: flex;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.issue-list-toolbar-right {
 | 
			
		||||
  margin-left: auto;
 | 
			
		||||
}
 | 
			
		||||
@@ -23,7 +23,7 @@ function initRepoIssueListCheckboxes() {
 | 
			
		||||
    toggleElem($('#issue-filters'), !anyChecked);
 | 
			
		||||
    toggleElem($('#issue-actions'), anyChecked);
 | 
			
		||||
    // there are two panels but only one select-all checkbox, so move the checkbox to the visible panel
 | 
			
		||||
    $('#issue-filters, #issue-actions').filter(':visible').find('.column:first').prepend($issueSelectAll);
 | 
			
		||||
    $('#issue-filters, #issue-actions').filter(':visible').find('.issue-list-toolbar-left').prepend($issueSelectAll);
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  $issueCheckboxes.on('change', syncIssueSelectionState);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user