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

[Reply] Use NavigationSuite for nav UI components #1407

Merged
merged 7 commits into from
Jun 11, 2024
Merged

Conversation

jdkoren
Copy link
Contributor

@jdkoren jdkoren commented May 28, 2024

No description provided.

@jdkoren jdkoren requested a review from a team as a code owner May 28, 2024 17:32
@jdkoren jdkoren requested a review from bentrengrove May 28, 2024 17:32
Comment on lines +115 to +118
// Avoid opening the modal drawer when there is a permanent drawer or a bottom nav bar,
// but always allow closing an open drawer.
val gesturesEnabled =
drawerState.isOpen || navLayoutType == NavigationSuiteType.NavigationRail
Copy link
Contributor

Choose a reason for hiding this comment

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

This logic does makes sense for consistency, where the drawer will remain open if it was open, but maybe an alternative would be to just hide it immediately if the navigation layout type isn't a navigation rail? Not sure which way would be better.

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 something like that, and it looked fine when changing to a layout that isn't a rail. But when changing back to the rail the drawer opens again, and that's a bit jarring.

We can work around that with a LaunchedEffect that calls drawerState.snapTo(Closed), but that feels more imperative than declarative.

Copy link
Member

@bentrengrove bentrengrove left a comment

Choose a reason for hiding this comment

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

LGTM

Reply/gradle/libs.versions.toml Show resolved Hide resolved
@jdkoren jdkoren merged commit e889549 into main Jun 11, 2024
6 checks passed
@jdkoren jdkoren deleted the jdk/reply/nav-suite branch June 11, 2024 16:30
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.

None yet

3 participants