Skip to content

Commit

Permalink
Fix explorer title width
Browse files Browse the repository at this point in the history
  • Loading branch information
GilbertCherrie committed Oct 28, 2024
1 parent 71102ea commit dcedd60
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/javascript/components/gtl-view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,11 @@ const GtlView = ({
const [state, dispatch] = useReducer(gtlReducer, initState);

useEffect(() => {
// If id is explorer_wide, change back to explorer to ensure search bar fits on the same line of the page.
if (document.getElementById('explorer_wide')) {
document.getElementById('explorer_wide').setAttribute('id', 'explorer');
}

// eslint-disable-next-line no-unused-expressions
if (!noFlashDiv) {
flashMessages && flashMessages.forEach((message) => add_flash(message.message, message.level));
Expand Down
5 changes: 5 additions & 0 deletions app/javascript/react/textual_summary_wrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import { TextualSummary } from '../components/textual_summary';
import textualSummaryGenericClick from './textual_summary_click';

export default (props) => {
// If id is explorer, change to explorer_wide on textual summary page to fit long titles on the same line.
// Textual summary page has no search bar so we can use 100% width for the title.
if (document.getElementById('explorer')) {
document.getElementById('explorer').setAttribute('id', 'explorer_wide');
}
const onClick = props.onClick || textualSummaryGenericClick;
const component = <TextualSummary onClick={onClick} {...props} />;
if (props.options && Object.keys(props.options).length > 0) {
Expand Down
4 changes: 4 additions & 0 deletions app/stylesheet/legacy/patternfly_overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@ miq-quadicon > .single-wrapper {
}
}

#explorer_wide {
width: 100%;
}

/// end paginator styling

/// begin table view styling
Expand Down

0 comments on commit dcedd60

Please sign in to comment.