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

[CollapsibleNav] Make CollapsibleNav Items Accessible on Small Screens and In Browsers with High Zoom #155817

Merged
merged 12 commits into from
May 1, 2023
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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
$screenHeightBreakpoint: $euiSize * 15;

.kbnCollapsibleNav {
@media (max-height: $screenHeightBreakpoint) {
overflow-y: auto;
}
}

.kbnCollapsibleNav__recentsListGroup {
@include euiYScroll;
max-height: $euiSize * 10;
margin-right: -$euiSizeS;
}

.kbnCollapsibleNav__solutions {
@include euiYScroll;

/**
* Allows the solutions nav group to be viewed on
* very small screen sizes and when the browser Zoom is high
*/
@media (max-height: $screenHeightBreakpoint) {
flex: 1 0 auto;
}
}

/**
* 1. Increase the hit area of the link (anchor)
* 2. Only show the text underline when hovering on the text/anchor portion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export function CollapsibleNav({
button={button}
ownFocus={false}
size={248}
className="kbnCollapsibleNav"
>
{customNavLink && (
<>
Expand Down Expand Up @@ -280,7 +281,7 @@ export function CollapsibleNav({

<EuiHorizontalRule margin="none" />

<EuiFlexItem className="eui-yScroll">
<EuiFlexItem className="kbnCollapsibleNav__solutions">
{/* Kibana, Observability, Security, and Management sections */}
{orderedCategories.map((categoryName) => {
const category = categoryDictionary[categoryName]!;
Expand Down