Skip to content

Automatically close the sidebar when navigating sections on mobile#2097

Merged
josevalim merged 1 commit intoelixir-lang:mainfrom
mcky:feat/sidebar-nav
Mar 18, 2025
Merged

Automatically close the sidebar when navigating sections on mobile#2097
josevalim merged 1 commit intoelixir-lang:mainfrom
mcky:feat/sidebar-nav

Conversation

@mcky
Copy link
Copy Markdown
Contributor

@mcky mcky commented Mar 17, 2025

I've been reading quite a few ExDoc sites from my mobile lately and I've found it slightly frustrating that clicking on some headings causes a full page change and the nav is closed, but within a module the sidebar stays open and it's unclear that you've even navigated

An example of the previous behaviour:

CleanShot.2025-03-17.at.22.31.00.mp4

@DavidOliver
Copy link
Copy Markdown
Contributor

DavidOliver commented Mar 17, 2025

@josevalim, is it okay with you to have the nav bar close on nav link click when mobile/narrow viewport?

Edit: sorry, I didn't see this is a pull request and not just an issue. Ignore me. Thanks, @mcky.

@josevalim
Copy link
Copy Markdown
Member

@DavidOliver i am 80% sure this was the case in the past and it was changed because it would be undesired in many cases. It can double check later.

@github-actions
Copy link
Copy Markdown

@josevalim
Copy link
Copy Markdown
Member

Given we always close when navigating away, I think we should remain consistent, so let's give it a try!

@josevalim josevalim merged commit 2902c6d into elixir-lang:main Mar 18, 2025
5 checks passed
@josevalim
Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

@mcky
Copy link
Copy Markdown
Contributor Author

mcky commented Mar 19, 2025

Thanks folks! 🥳

@mcky mcky deleted the feat/sidebar-nav branch March 19, 2025 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants