Resolve "Manual actions dropdown on Pipelines makes to show a vertical scrollbar"
Open
requested to merge 20052-manual-actions-dropdown-on-pipelines-makes-to-show-a-vertical-scrollbar into master
3 unresolved threads
What does this MR do?
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together
What are the relevant issue numbers?
Closes #20052 (closed)
Merge request reports
Activity
69 69 new IssuableForm($('.merge-request-form')); 70 70 new IssuableTemplateSelectors(); 71 71 break; 72 case 'projects:pipelines:index': - Resolved by Victor Wu
1 ((global) => { 2 class GLOverflowDropdown { 3 constructor($table, $dropdown) { 4 const MENU_MAX_HEIGHT = 250; 5 6 this.$table = $table; 7 this.$dropdownToggle = $('.dropdown-toggle', $dropdown); 8 this.$dropdownMenu = $('.dropdown-menu', $dropdown); 9 this.positioned = false; 10 11 this.$dropdownMenu.css({ 12 'max-height': MENU_MAX_HEIGHT, 13 overflow: 'scroll' 14 }); 15 16 $dropdown.off('click.positionDropdownWithinTable') 17 .on('click.positionDropdownWithinTable', this.positionDropdownWithinTable.bind(this)); 18 } 19 20 positionDropdownWithinTable() { 21 if (this.positioned) return; 22 const dropdownMenuHeight = this.$dropdownMenu.outerHeight(true); 23 if ((this.$dropdownToggle.offset().top - this.$table.offset().top + this.$dropdownToggle.outerHeight() + dropdownMenuHeight) > this.$table.outerHeight()) { 24 this.$dropdownMenu.css({ top: -(dropdownMenuHeight + 3) }); 25 } 26 this.positioned = true; 27 } 28 } 29 30 global.GLOverflowDropdown = GLOverflowDropdown; 31 32 $.fn.glOverflowDropdown = function($dropdowns) { 29 30 global.GLOverflowDropdown = GLOverflowDropdown; 31 32 $.fn.glOverflowDropdown = function($dropdowns) { 33 const $table = this; 34 $dropdowns = $dropdowns || $('.gl-overflow-dropdown', $table); 35 $dropdowns.each(function() { 36 if (!$.data(this, 'glOverflowDropdown')) { 29 $.fn.glOverflowDropdown = func($dropdowns) { 30 console.log('hello world'); 31 });
Please register or sign in to reply