Skip to content
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

Fix explorer title width #9290

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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