-
Notifications
You must be signed in to change notification settings - Fork 111
[ACM-29812] ApplicationSet creation - Git revision menu extends page height #5671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -168,6 +168,7 @@ class ControlPanelComboBox extends React.Component { | |||||
| 'tf--list-box__menu-icon': true, | ||||||
| 'tf--list-box__menu-icon--open': isOpen, | ||||||
| }) | ||||||
| const toggleStyles = { height: isOpen ? '10%' : '100%' } | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π§© Analysis chainπ Script executed: # First, locate and read the file
find . -type f -name "ControlPanelComboBox.js" | head -5Repository: stolostron/console Length of output: 135 π Script executed: # Check the actual file structure around line 171
if [ -f "frontend/src/components/TemplateEditor/controls/ControlPanelComboBox.js" ]; then
wc -l "frontend/src/components/TemplateEditor/controls/ControlPanelComboBox.js"
fiRepository: stolostron/console Length of output: 137 π Script executed: # Search for related CSS files
fd -e css -e scss "ControlPanelComboBox|ComboBox" frontend/Repository: stolostron/console Length of output: 44 π Script executed: # Read the file around line 171 to understand the toggleStyles context
sed -n '160,190p' "frontend/src/components/TemplateEditor/controls/ControlPanelComboBox.js"Repository: stolostron/console Length of output: 1357 π Script executed: # Also read around line 278 where toggleStyles is applied
sed -n '270,290p' "frontend/src/components/TemplateEditor/controls/ControlPanelComboBox.js"Repository: stolostron/console Length of output: 950 π Script executed: # Read the component structure (likely JSX return statement)
sed -n '1,50p' "frontend/src/components/TemplateEditor/controls/ControlPanelComboBox.js"Repository: stolostron/console Length of output: 1954 π Script executed: # Search for CSS files that contain styles for these classes
rg -n "creation-view-controls-combobox|tf--list-box" --type css --type scss -B 2 -A 5 frontend/Repository: stolostron/console Length of output: 90 π Script executed: # Also check if there are SCSS files in the same directory
fd -e scss -e css frontend/src/components/TemplateEditor/controls/Repository: stolostron/console Length of output: 559 π Script executed: # Read more of the JSX structure to see the full component layout, especially the menu part
sed -n '190,320p' "frontend/src/components/TemplateEditor/controls/ControlPanelComboBox.js"Repository: stolostron/console Length of output: 6105 π Script executed: # Search for CSS files in the project that might define tf--list-box styles
rg -t css "tf--list-box" --max-count 5 -B 2 -A 5 frontend/Repository: stolostron/console Length of output: 2549 π Script executed: # Also search for any inline style definitions or CSS files that might be imported
fd . 'frontend/src/components/TemplateEditor/controls/' --type fRepository: stolostron/console Length of output: 3474 π Script executed: # Check if there's a styles file in the same directory or parent
fd -e css -e scss . 'frontend/src/components/TemplateEditor/' | head -20Repository: stolostron/console Length of output: 442 π Script executed: # Read the control-panel.css file to understand the styling context
cat -n "frontend/src/components/TemplateEditor/css/control-panel.css"Repository: stolostron/console Length of output: 37252 Percentage-based height on toggle button may cause unexpected layout behavior. The Consider removing the inline height style and relying on CSS: π§ Suggested fix- const toggleStyles = { height: isOpen ? '10%' : '100%' }
+ const toggleStyles = {}Or simply omit the style attribute since CSS already handles this correctly. π Committable suggestion
Suggested change
π€ Prompt for AI Agents |
||||||
| const inputClasses = classNames({ | ||||||
| 'pf-v6-c-form-control': true, | ||||||
| input: true, | ||||||
|
|
@@ -274,6 +275,7 @@ class ControlPanelComboBox extends React.Component { | |||||
| ref={this.setToggleRef} | ||||||
| onClick={this.clickToggle.bind(this)} | ||||||
| onKeyPress={this.pressToggle.bind(this)} | ||||||
| style={toggleStyles} | ||||||
| > | ||||||
| <svg | ||||||
| fillRule="evenodd" | ||||||
|
|
@@ -292,39 +294,43 @@ class ControlPanelComboBox extends React.Component { | |||||
| </div> | ||||||
| {!disabled && isOpen && ( | ||||||
| <div | ||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the rest is just wrapping the whole thing according to the new PF6 HTML structure |
||||||
| role="button" | ||||||
| className="tf--list-box__menu" | ||||||
| className="pf-v6-c-menu pf-m-scrollable" | ||||||
| key={key} | ||||||
| id={key} | ||||||
| ref={this.setMenuRef} | ||||||
| role="presentation" | ||||||
| onMouseDown={() => { | ||||||
| this.menuClick = true | ||||||
| }} | ||||||
| onMouseUp={() => { | ||||||
| this.menuClick = false | ||||||
| }} | ||||||
| tabIndex="0" | ||||||
| > | ||||||
| {items.map(({ label, id }) => { | ||||||
| const itemClasses = classNames({ | ||||||
| 'tf--list-box__menu-item': true, | ||||||
| searching: searchText, | ||||||
| }) | ||||||
| return ( | ||||||
| <div | ||||||
| role="button" | ||||||
| key={label} | ||||||
| className={itemClasses} | ||||||
| id={`${controlId}-item-${id}`} | ||||||
| tabIndex="0" | ||||||
| onMouseDown={() => this.setState({ preselect: true })} | ||||||
| onClick={this.clickSelect.bind(this, label)} | ||||||
| onKeyPress={this.pressSelect.bind(this, label)} | ||||||
| > | ||||||
| {this.renderLabel(label, searchText, active, control, simplified, describe)} | ||||||
| </div> | ||||||
| ) | ||||||
| })} | ||||||
| <div className="pf-v6-c-menu__content"> | ||||||
| <ul role="listbox" aria-multiselectable="false" className="pf-v6-c-menu__list"> | ||||||
| {items.map(({ label, id }) => ( | ||||||
| <li key={label} className="pf-v6-c-menu__list-item" role="none"> | ||||||
| <button | ||||||
| id={`${controlId}-item-${id}`} | ||||||
| type="button" | ||||||
| tabIndex={id === 0 ? 0 : -1} | ||||||
| className="pf-v6-c-menu__item" | ||||||
| role="option" | ||||||
| aria-selected={label === active} | ||||||
| onMouseDown={() => this.setState({ preselect: true })} | ||||||
| onClick={this.clickSelect.bind(this, label)} | ||||||
| onKeyPress={this.pressSelect.bind(this, label)} | ||||||
| > | ||||||
| <span className="pf-v6-c-menu__item-main"> | ||||||
| <span className="pf-v6-c-menu__item-text"> | ||||||
| {this.renderLabel(label, searchText, active, control, simplified, describe)} | ||||||
| </span> | ||||||
| </span> | ||||||
| </button> | ||||||
| </li> | ||||||
| ))} | ||||||
| </ul> | ||||||
| </div> | ||||||
| </div> | ||||||
| )} | ||||||
| </div> | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is for the open/close arrow, it is not ideal solution but it feels like this screen has not been well maintained