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

[Refactor]: Height for log explorer list panel #4657

Merged
merged 6 commits into from
Mar 12, 2024
Merged

Conversation

Rajat-Dabade
Copy link
Contributor

@Rajat-Dabade Rajat-Dabade commented Mar 6, 2024

Fix the height issue for logs.

Screen.Recording.2024-03-07.at.12.44.28.PM.mov

vikrantgupta25
vikrantgupta25 previously approved these changes Mar 6, 2024
@Rajat-Dabade Rajat-Dabade changed the title Full view for logs [Refactor]: Height for log explorer list panel Mar 7, 2024
Copy link

github-actions bot commented Mar 7, 2024

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

1 similar comment
Copy link

github-actions bot commented Mar 7, 2024

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@YounixM
Copy link
Member

YounixM commented Mar 11, 2024

@Rajat-Dabade: Please add an RCA around. It will help in understanding the internal functioning and requirement for change.

@Rajat-Dabade
Copy link
Contributor Author

Root Cause Analysis (RCA):

Issue Description:
The last <div> element within a flex container does not take up the full remaining height, despite setting display: flex; and flex-direction: column; on the container.

As you can see in the image the last div is not taking the full height available.

Screenshot 2024-03-11 at 3 03 43 PM

Root Cause:

The reason for the last <div> not taking the full remaining height within the flex container is due to the default behaviour of flex items in a flex container. By default, flex items do not automatically stretch to fill the remaining space along the cross-axis (in this case, the vertical axis since the flex-direction is set to column).

Analysis:
Flexbox Behavior: In a flex container with flex-direction: column; , the main axis runs vertically from top to bottom, while the cross-axis runs horizontally. By default, flex items only occupy the height required by their content along the cross-axis.

Lack of Flex Grow Property: Without explicitly specifying the flex: 1 property on the last <div> element, it does not have instructions to expand and fill the remaining space within the flex container along the cross-axis.

Solution:

To address the issue and ensure that the last <div> takes up the full remaining height within the flex container, the flex: 1 property needs to be applied to the last <div> element. Setting flex: 1; set flex-grow: 1 on the last

instructs it to expand and fill the remaining space along the cross-axis, thereby resolving the issue.

@Rajat-Dabade Rajat-Dabade merged commit 0326a4d into develop Mar 12, 2024
11 checks passed
@srikanthccv srikanthccv deleted the gh-4471 branch April 11, 2024 13:07
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.

3 participants