Skip to content

consolidate responses and errors into console section #733

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

Open
wants to merge 7 commits into
base: feature/editor-refactor
Choose a base branch
from

Conversation

kamahuan
Copy link
Contributor

@kamahuan kamahuan commented May 29, 2025

Description

Consolidate ingest responses and errors into console section

Issues Resolved

None

Fixed issues:

  1. no scroll bars on the right side of the page
  2. no overflow issues in the console panel
  3. console panel pushes up instead of pushing down
  4. adjust the function button in the left nav panel
  5. console panel button is not cutting off, the left padding, right padding and bottom padding are consistent
  6. full screen page shows only text with a close (X) button. Both dark mode and light mode tested.
  7. error count matches actual error count
  8. console height (expanded or collapsed) confirmed in the UX meeting. Adding a full screen button helps the messages to be visible
  9. console panel remains closed when navigating through different pages

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@ohltyler
Copy link
Member

ohltyler commented May 29, 2025

Checked out the branch, some initial issues I'm seeing:

  • the details page is now overflowing, instead of fitting all panels within the window
  • when I expand the panel, it expands down & overflows, instead of expanding up. This requires having to scroll down after opening, but the window doesn't move by default. So it wasn't obvious that clicking it was doing anything
  • the error count is displaying an invalid number, showing 2 instead of 1 in screenshot below:
  • still visual issues with the height not being expandable. it is still not usable for viewing responses or long errors, as the height only allows for viewing a few lines
error response

Copy link
Member

@ohltyler ohltyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting close! Next steps:

  • please rebase to resolve the conflicts, from there I will do quick smoke test on my local env
  • now that the Errors and Ingest components have been refactored into Console, can you remove these from the codebase?

@ohltyler
Copy link
Member

ohltyler commented Jun 2, 2025

I've checked it out locally, notice few things:

  • the console open/close state seems to be persisted even after navigating away from the details page and navigating back, even for different workflows. It should be reset to closed whenever the details page is re-mounted
  • the entire details page still has a small amount of overflow and a scrollbar, when there should be none. As a result, the bottom of the console panel is cut off when collapsed by default.
  • there is still overflow happening when the ingest response is populated, and an awkward scrollbar. The console should be static height with no scrollbar.
  • there is extra space added underneath the call-to-action buttons in the left nav
  • the fullscreen modal has awkward spacing, suggest to have it span full width and full height, can you work with UX to get a mockup of the fullscreen view?

Current fullscreen:
modal

Overflow in console (when populated):
overflow

Extra spacing in left nav:
extra-space

@ohltyler
Copy link
Member

ohltyler commented Jun 4, 2025

Pulled the latest changes, I'm seeing the following issues:

  • there is no bottom spacing for the console component, between the text and the bottom of the browser window. Please ensure there is equal/sufficient spacing from all 4 directions for the component
  • when there is an error, even when the console is expanded, there is no way to view the message without going to full-screen. This makes the expanded view not useful. Additionally, when viewing the ingest response, only one line is shown. And, for both scenarios, there is no scrolling available to view the entire output (of errors, or of ingest response). This is equally not useful. Either the component should expand higher by default, or some other sizing / design should happen to increase the vertical space, so there is still utility in viewing the output without going to full screen.
  • when there is an error or response, and if the console is expanded, there is overflow happening, and a vertical scrollbar for the webpage is introduced. And, when re-collapsing, the scrollbar is still visible.
  • The console is still expanded by default, even if a new workflow is loaded. It should be reset to closed, every time the page is loaded. To reproduce: 1/ Have the console opened with an error for a workflow. 2/ Navigate to workflow list page via 'Close' button or breadcrumbs. 3/ Click on a different workflow. 4/ Notice the console is expanded and in empty state.
  • There is still extra vertical space in the left nav.
  • The full screen mode does not support dark mode. Please refer to how existing components are rendered; there shouldn't require any conditional formatting or explicit dark mode checks. The default EUI components will determine the appropriate color based on dark mode being enabled or not.

Console collapsed (no bottom spacing):
bottom-spacing

Ingest response (expanded, can only see one line and no way to scroll):
ingest

Extra space in left nav (with or without the CTA buttons). Please refer to existing branch for how the spacing currently exists.
Screenshot 2025-06-04 at 8 56 51 AM

Full-screen mode is only in light mode
full-screen-light

@kamahuan
Copy link
Contributor Author

kamahuan commented Jun 4, 2025

Pulled the latest changes, I'm seeing the following issues:

  • there is no bottom spacing for the console component, between the text and the bottom of the browser window. Please ensure there is equal/sufficient spacing from all 4 directions for the component
  • when there is an error, even when the console is expanded, there is no way to view the message without going to full-screen. This makes the expanded view not useful. Additionally, when viewing the ingest response, only one line is shown. And, for both scenarios, there is no scrolling available to view the entire output (of errors, or of ingest response). This is equally not useful. Either the component should expand higher by default, or some other sizing / design should happen to increase the vertical space, so there is still utility in viewing the output without going to full screen.
  • when there is an error or response, and if the console is expanded, there is overflow happening, and a vertical scrollbar for the webpage is introduced. And, when re-collapsing, the scrollbar is still visible.
  • The console is still expanded by default, even if a new workflow is loaded. It should be reset to closed, every time the page is loaded. To reproduce: 1/ Have the console opened with an error for a workflow. 2/ Navigate to workflow list page via 'Close' button or breadcrumbs. 3/ Click on a different workflow. 4/ Notice the console is expanded and in empty state.
  • There is still extra vertical space in the left nav.
  • The full screen mode does not support dark mode. Please refer to how existing components are rendered; there shouldn't require any conditional formatting or explicit dark mode checks. The default EUI components will determine the appropriate color based on dark mode being enabled or not.

Console collapsed (no bottom spacing): bottom-spacing

Ingest response (expanded, can only see one line and no way to scroll): ingest

Extra space in left nav (with or without the CTA buttons). Please refer to existing branch for how the spacing currently exists. Screenshot 2025-06-04 at 8 56 51 AM

Full-screen mode is only in light mode full-screen-light

Hello Tyler, I am wondering if need to have the expanded console to have height. Checked with the UX team in the meeting that current expanded/collapsed height looks good, need to add a full screen button. From our last conversation (point 2) you suggest console panel should not have scroll bar so I removed it, will add it back.

@ohltyler
Copy link
Member

ohltyler commented Jun 5, 2025

Good progress on the sizing when opened now, i think it's much more readable. That being said, still seeing several of the styling issues mentioned above:

  • there is still extra space added at the bottom of the left nav panel. Please check out the current feature branch for reference.
    extra-space-3

  • there is still no padding in the console panel when collapsed. Please check out the current feature branch for reference.
    console-no-padding

  • there is extra padding at the bottom of the page as a whole, make sure the padding is equal. Please check out the current feature branch for reference.
    extra-padding

  • the console is still stuck in light mode only.

And lastly (not a blocker) but can/should the console component be larger and have larger title text when in collapsed? It is almost impossible to know it exists until it automatically pops up. Please discuss w/ UX.

Copy link
Member

@ohltyler ohltyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed code up to line 320 in resizable_workspace, will continue in a bit.

output.txt Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this file

@@ -890,11 +887,13 @@ export function LeftNav(props: LeftNavProps) {
)}
</>
</EuiFlexItem>
<EuiFlexItem grow={false} style={{ marginRight: '12px' }}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this change needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if not removing this line, the console panel will not expand with error messages. this is because the flex adds additional space with no content, and when error occurs, it confused resizable workspace about how much space to allocate to the console.

<EuiFlexGroup direction="column" gutterSize="none">
<EuiFlexItem>
<EuiHorizontalRule margin="m" />
</EuiFlexItem>
<EuiFlexItem grow={true}></EuiFlexItem>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary & unused component

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Comment on lines 82 to 95
const [currentWorkflowId, setCurrentWorkflowId] = useState<
string | undefined
>(props.workflow?.id);

// Always start with console closed when workflow changes
const [isConsolePanelOpen, setIsConsolePanelOpen] = useState<boolean>(false);

// Reset console state when workflow changes - ensure it's always closed initially
useEffect(() => {
if (props.workflow?.id !== currentWorkflowId) {
setCurrentWorkflowId(props.workflow?.id);
setIsConsolePanelOpen(false); // Always close on workflow change
}
}, [props.workflow?.id, currentWorkflowId]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currentWorkflowId is not needed, this can be simplified to just having a useEffect listening on props.workflow?.id. It will then execute whenever it changes. No need to persist a current ID variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed unneeded currentWorkflowId

Comment on lines 154 to 163
// Track if this is the initial mount to prevent auto-opening console on page load
const [isInitialMount, setIsInitialMount] = useState<boolean>(true);

useEffect(() => {
// Mark that initial mount is complete after first render
const timer = setTimeout(() => {
setIsInitialMount(false);
}, 100);
return () => clearTimeout(timer);
}, []);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isInitialMount doesn't seem necessary at all. Why not simplify by just having the initial state of the console be closed, and toggle open/closed based on the user clicking the button? This is how all existing code is, and is the general pattern for React component state.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed isInitialMount, console is expanded/collapsed by user toggling the panel

Comment on lines 188 to 228
if (!isEmpty(ingestPipelineErrors)) {
// Add header message (doesn't count as an error)
errorMessages.push(
'Data not ingested. Errors found with the following ingest processor(s):'
);
// Add actual errors (these count)
const ingestErrors = Object.values(ingestPipelineErrors).map(
(error) => {
// Convert to plain text format instead of JSX
const processorType = error.processorType
? error.processorType.charAt(0).toUpperCase() +
error.processorType.slice(1)
: 'Unknown';
return `Processor type: ${processorType}\nError: ${
error.errorMsg || error.toString()
}`;
}
);
errorMessages.push(...ingestErrors);
errorCount += ingestErrors.length;
}
if (!isEmpty(searchPipelineErrors)) {
// Add header message (doesn't count as an error)
errorMessages.push(
'Errors found with the following search processor(s):'
);
// Add actual errors (these count)
const searchErrors = Object.values(searchPipelineErrors).map(
(error) => {
// Convert to plain text format instead of JSX
const processorType = error.processorType
? error.processorType.charAt(0).toUpperCase() +
error.processorType.slice(1)
: 'Unknown';
return `Processor type: ${processorType}\nError: ${
error.errorMsg || error.toString()
}`;
}
);
errorMessages.push(...searchErrors);
errorCount += searchErrors.length;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a lot of duplicate code here, additionally there is the existing util fn for formatting the error messages. Please leverage this util fn, and/or update accordingly to use here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refactor the function to the utils file

Comment on lines +274 to +225
// Force no page overflow
useEffect(() => {
// Store original styles
const originalBodyOverflow = document.body.style.overflow;
const originalHtmlOverflow = document.documentElement.style.overflow;

// Force no scrollbars
document.body.style.overflow = 'hidden';
document.documentElement.style.overflow = 'hidden';

// Also fix any EUI containers that might be causing overflow
const euiPage = document.querySelector('.euiPage') as HTMLElement;
const euiPageBody = document.querySelector('.euiPageBody') as HTMLElement;

let originalEuiPageOverflow = '';
let originalEuiPageBodyOverflow = '';

if (euiPage) {
originalEuiPageOverflow = euiPage.style.overflow;
euiPage.style.overflow = 'hidden';
euiPage.style.maxHeight = '100vh';
}

if (euiPageBody) {
originalEuiPageBodyOverflow = euiPageBody.style.overflow;
euiPageBody.style.overflow = 'hidden';
euiPageBody.style.maxHeight = '100%';
}

return () => {
// Restore original styles on cleanup
document.body.style.overflow = originalBodyOverflow;
document.documentElement.style.overflow = originalHtmlOverflow;

if (euiPage) {
euiPage.style.overflow = originalEuiPageOverflow;
euiPage.style.maxHeight = '';
}

if (euiPageBody) {
euiPageBody.style.overflow = originalEuiPageBodyOverflow;
euiPageBody.style.maxHeight = '';
}
};
}, []);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a workaround for an underlying style issue, this shouldn't be necessary. Can you describe why this is here? The existing page does not overflow. The console component should be within that page, and should not have any effect on overflow.

Comment on lines 321 to 243
<div
data-test-subj="resizable-workspace"
style={{
width: '100%',
gap: '4px',
// Keep our component properly sized
height: 'calc(100vh - 10px)',
maxHeight: 'calc(100vh - 10px)',
display: 'flex',
flexDirection: 'column',
overflow: 'hidden',
//avoid console panel scroll bar when first render
overflowX: 'hidden',
overflowY: 'hidden',
}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm concerned why there is all of the styling changes, we should keep things simple. If the console component is nested within this parent container, none of this should be needed. Note how LeftNav is nested within it, I think we can do the same for the Console component.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to refactor the code and put Tools, LeftVal and Console under the same parent container. The structure did not fix the styling issues itself, adding scroll bars on the right side of the page, cutting off the bottom padding (issues I have come up with before) I think the left nav works because it is a static container with fixed position and size, and no dynamic behavior is needed, but the console panel can push up and collapse dynamically and requires state driven resizing. These styles are tested out to fix all the style issues mentioned in this PR.

Comment on lines +336 to +253
ref={containerRef}
style={{
flex: 1,
minHeight: 0,
display: 'flex',
flexDirection: 'column',
overflow: 'hidden',
}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above; this shouldn't be needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above

}}
>
<EuiResizableContainer
key="debug-static-key"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this key value? can it be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forget why add this, removed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this is not removed

Comment on lines 472 to 421
<div
style={{
height: isConsolePanelOpen ? '30vh' : '35px',
minHeight: isConsolePanelOpen ? '200px' : '35px',
maxHeight: isConsolePanelOpen ? '40vh' : '35px',
flexShrink: 0,
borderTop: '1px solid #D3DAE6',
transition: 'height 0.2s ease',
overflow: 'hidden',
position: 'relative',
width: '100%',
maxWidth: '100%',
marginBottom: '15px',
paddingBottom: '5px',
scrollbarWidth: 'none',
msOverflowStyle: 'none',
}}
>
<EuiPanel
paddingSize="s"
style={{
height: '100%',
display: 'flex',
flexDirection: 'column',
borderRadius: 0,
borderTop: 'none',
overflowX: 'hidden',
overflowY:
consoleErrorMessages.length > 0 || !isEmpty(ingestResponse)
? 'auto'
: 'hidden',
width: '100%',
maxWidth: '100%',
minWidth: 0,
scrollbarWidth: 'none',
msOverflowStyle: 'none',
}}
className="console-panel-no-scroll"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as above. This all seems very over-complicated. Using the EUI components with minimal stying changes should be all that's needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment above.

Comment on lines 30 to 41
const openErrorsFullscreen = () => {
setFullscreenMode('errors');
const style = document.createElement('style');
style.id = 'console-fullscreen-hide-header';
style.textContent = `
.euiHeader,
[data-test-subj="headerGlobalNav"],
#globalHeaderBars,
.osd-top-nav,
.chrome-nav,
.application-header,
.kibana-header,
.opensearch-header,
header[role="banner"],
.global-header,
.top-nav,
nav[aria-label*="primary"],
nav[aria-label*="global"] {
display: none !important;
visibility: hidden !important;
opacity: 0 !important;
z-index: -1 !important;
height: 0 !important;
overflow: hidden !important;
}
`;
document.head.appendChild(style);
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few things:

  • should not need this long list of styles, please use regular EUI components
  • should not need low-level JS here. We should just dynamically render the React components

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tyler I was not able to find any component in the OUI library or EUI library that can do all these things: 1. full screen layout coverage. 2. theme detection 3. delete navigation bar/ header 4. built in X button to close the window 5. built in styling from the framework that I do not need to add any additional style. I also checked the link you shared, at the beginning I though it was a component that I can use, but it seems like a demo (please correct me if I am wrong). I feed the link to AI and ask if there is anything in the EUI or OUI library that at lease I can try out. I tried using EuiModal, it can do theme detection, delete the header, but it has built in constraint that text is only viewable inside some certain area. Also tried EuiFlyout, the header can be removed, but theme detection not working, and no built in styles for the text. The current implementation is not smart (for css injection to delete the header, and theme detection), but I could not find another built in component as solution.

Comment on lines 59 to 56
const openResponsesFullscreen = () => {
setFullscreenMode('responses');
const style = document.createElement('style');
style.id = 'console-fullscreen-hide-header';
style.textContent = `
.euiHeader,
[data-test-subj="headerGlobalNav"],
#globalHeaderBars,
.osd-top-nav,
.chrome-nav,
.application-header,
.kibana-header,
.opensearch-header,
header[role="banner"],
.global-header,
.top-nav,
nav[aria-label*="primary"],
nav[aria-label*="global"] {
display: none !important;
visibility: hidden !important;
opacity: 0 !important;
z-index: -1 !important;
height: 0 !important;
overflow: hidden !important;
}
`;
document.head.appendChild(style);
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strongly suggest to start simple, particularly for the full-screen view. Should be using existing EUI components, and should never need more than 1 or 2 styling tweaks.

Roughly, I would suggest to implement the following way:

  • have 3 main "components": the collapsed console, the expanded console, and the full-screen modal, all using the base EUI components.
  • maintain 1 or 2 state variables to determine when to show each one

I would suggest to study some of the existing components, and the basic rendering pattern for react components here: https://react.dev/learn

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Tyler, I rewrite some test code to figure out if parent/ child structure can guarantee the expected layout, and it looks like all the layout issues I have come across so far: (overflow, scroll bar on the UI page, console bottom padding cut off, overlay issue when console expanded) will still persists. Component structure itself cannot guarantee the expected layout because:

  1. leftNav is static and will not towards side so that the horizontal width will not be chanllenged and will not disrupt sibling components.
  2. console can be expanded/collapsed that will affect the layout of other components and potentially reflow all the other components.
  3. LeftNav uses simple conditional rendering (leftNavOpen ? : undefined) that works seamlessly with the container. Console creates conflicts between our manual isConsolePanelOpen state and EUI's internal resizable panel state (via onToggleCollapsedInternal), causing re-render loops and the component to flash and disappear.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The left nav expands / collapses. Depending on if opened/closed, we re-generate the width of the other 2 resizable components. See this line.

Why can't we do the same thing for console? It is the same idea, but it is on the bottom, instead of the left.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To re-iterate, adding the console should not be adding anything close to 500 lines of code like it currently is. It will make it impossible to debug resizing issues with a tangle of nested and customized sizing styles set.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Tyler, I tested your example code locally and get the same style issues, most of them have been the same I have been tackling so far. As far as I am aware, react make components communicate with each other and css are used for styling. From my test and from your example code, it looks like putting the console component as a sibling component as the left nav will not automatically resolve the styling issues.

I was also unable to find a 'built-in' component which will automatically solve the styling issues. For example, the full screen UI page.

Tested components in the OUI library or EUI library that can do all these things: 1. full screen layout coverage. 2. theme detection 3. delete navigation bar/ header 4. built in X button to close the window 5. built in styling from the framework that I do not need to add any additional style. I also checked the link you shared, at the beginning I though it was a component that I can use, but it seems like a demo (please correct me if I am wrong). I feed the link to AI and ask if there is anything in the EUI or OUI library that at least I can try out. I tried using EuiModal, it can do theme detection, delete the header, but it has built in constraint that text is only viewable inside some certain area. Also tried EuiFlyout, the header can be removed, but theme detection not working, and no built in styles for the text. The current implementation is not smart (for css injection to delete the header, and theme detection), but I could not find another built in component as solution.

For the comments which I did not reply back, these are the ones I could not figure out a way to simplify, could you help me to simplify these styling code?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There shouldn't be any changes needed to this component

Kama Huang added 7 commits June 8, 2025 21:58
Signed-off-by: Kama Huang <[email protected]>

resove merge conflicts2

Signed-off-by: Kama Huang <[email protected]>

fix console expanded issue when mount/unmount

Signed-off-by: Kama Huang <[email protected]>

fix right scroll bar

Signed-off-by: Kama Huang <[email protected]>

fix left panel button space

Signed-off-by: Kama Huang <[email protected]>

fix scroll bar on the console panel

Signed-off-by: Kama Huang <[email protected]>

fix console bottom cut off issue

Signed-off-by: Kama Huang <[email protected]>

fix full screen mode for ingest responses

Signed-off-by: Kama Huang <[email protected]>

clean up code

Signed-off-by: Kama Huang <[email protected]>

fix console panel cut off

Signed-off-by: Kama Huang <[email protected]>

fix full screen style

Signed-off-by: Kama Huang <[email protected]>

fix console state expanded issue

Signed-off-by: Kama Huang <[email protected]>

fix console panel expanded issue2

Signed-off-by: Kama Huang <[email protected]>

scroll bar added but horizontal bar added when error persists

Signed-off-by: Kama Huang <[email protected]>

fix horizontal bar issue

Signed-off-by: Kama Huang <[email protected]>

bottom cut off issue fixed but add additional scroll bar in the console even no responses/errors

Signed-off-by: Kama Huang <[email protected]>

fix console panel scroll bar issue when first rendered

Signed-off-by: Kama Huang <[email protected]>
Signed-off-by: Kama Huang <[email protected]>
Signed-off-by: Kama Huang <[email protected]>
Copy link
Member

@ohltyler ohltyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refer to https://github.com/ohltyler/dashboards-flow-framework/tree/example as a starting point for simplifying the code. The complexity of all of the manual stylings in ResizableContainer and Console is not maintainable or readable, and can lead to very difficult bugs. In general, the mentality you should have is:

  1. Start with the EUI components, particularly EuiFlexGroup/EuiFlexItems for building the overall structure and how things should grow as windows expand, etc. This will handle 99% of all of the styling for you, as they have all built-in styling for flex, margin, padding, etc. and keeps the page layouts consistent.
  2. Minor tuning of margins / overflow / etc. if there looks to be small misalignments or weird gaps, wasted space, etc. This also makes it easy to maintain over time.
  3. Test, test test: Iteratively trying out components and testing it out in browser, seeing how it grows/shrinks, how it functions, is the best place to start.
  4. Work in a hierarchical pattern: start with implementing the biggest parent components, and work towards the smaller ones. This helps you iteratively test and drill down. If it's implemented all at once, it can be much more difficult to know what component in some nested structure is causing some styling issue, overflow, padding, etc.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file still exists, please remove

Comment on lines +922 to +942
<EuiFlexItem
grow={false}
style={{
height: '60px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
marginBottom: '20px',
}}
>
<EuiFlexGroup
direction="row"
gutterSize="s"
style={{
padding: '0px',
marginBottom: USE_NEW_HOME_PAGE ? '0px' : '54px',
margin: '0px',
width: '100%',
height: '100%',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes should not be necessary, why all of the width/height styling changes? EuiFlexGroup will already grow to maximize space within their parent container.

Additionally, the USE_NEW_HOME_PAGE flag has been removed; this was required to maximize the space based on OSD using the new home page layout vs. old home page layout. Please add back.

}}
>
<EuiResizableContainer
key="debug-static-key"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this is not removed

@ohltyler
Copy link
Member

ohltyler commented Jun 9, 2025

Also, make sure to update and point this branch to main now that #737 is merged. Once that is done, I will delete the feature/editor-refactor branch. I didn't do it yet since it will automatically close your PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants