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

feat: collapsed state fine-tuning #745

Merged
merged 2 commits into from Jan 25, 2023
Merged

feat: collapsed state fine-tuning #745

merged 2 commits into from Jan 25, 2023

Conversation

mathieunicolas
Copy link
Contributor

@mathieunicolas mathieunicolas commented Dec 26, 2022

If you set the following in a _dir.yml the dir should be collapsed (or not) according to your choice.

aside:
    collapsed: true/false

This way, you can fine-tune the collapsed state of each dir in the aside tree.

Resolves #743

@vercel
Copy link

vercel bot commented Dec 26, 2022

@mathieunicolas is attempting to deploy a commit to the Nuxt Labs Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Dec 26, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
docus ✅ Ready (Inspect) Visit Preview Dec 26, 2022 at 2:16PM (UTC)

@Atinux Atinux changed the title Allow collapsed state fine-tuning fat: Allow collapsed state fine-tuning Jan 5, 2023
@Tahul Tahul changed the title fat: Allow collapsed state fine-tuning feat: Allow collapsed state fine-tuning Jan 25, 2023
@Tahul Tahul changed the title feat: Allow collapsed state fine-tuning feat: collapsed state fine-tuning Jan 25, 2023
@Tahul Tahul merged commit c9c1b27 into nuxt-themes:dev Jan 25, 2023
@mathieunicolas
Copy link
Contributor Author

mathieunicolas commented Mar 22, 2023

@Tahul the code update you made in this commit broke the feature :
if (link?.aside?.collapsed) { return link.aside.collapsed } is not resolved if link.aside.collapsed exists but is set to false.

I spent few hours figuring why my aside didn't work anymore ^^

I think you should revert the modification, do you agree ?
In my local docsAsideTree.vue I updated the line with :

if ([true, false].includes(link?.aside?.collapsed)) { return link.aside.collapsed }

but I still don't know if it's the best way...

Copy link
Contributor

Atinux commented Mar 23, 2023

Happy to open a 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.

Collapse some folders in _dir.yml
3 participants