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

Make <details> blocks linkable #3314

Closed
julieg18 opened this issue Feb 22, 2022 · 3 comments · Fixed by #3329
Closed

Make <details> blocks linkable #3314

julieg18 opened this issue Feb 22, 2022 · 3 comments · Fixed by #3329
Assignees
Labels
A: website Area: website website: eng-doc DEPRECATED JS engine for /doc

Comments

@julieg18
Copy link
Contributor

I assume ability to link to a specific section? Fair enough, but let's do it quick - just move all into section or make expandable blocks linkable - I think it should not be a problem and we could do it quick cc @iterative/websites

From @shcheklein in #3299

This should be doable since we use a custom component to create our expandable sections!

@julieg18 julieg18 added A: website Area: website website: eng-doc DEPRECATED JS engine for /doc labels Feb 22, 2022
@jorgeorpinel
Copy link
Contributor

Can they auto-expand when opening them via #anchored link ?

@julieg18
Copy link
Contributor Author

julieg18 commented Feb 22, 2022

I think it would be a little more difficult to implement, but still doable!

@VinayakRugvedi
Copy link

VinayakRugvedi commented Mar 2, 2022

I have used this beautiful package https://www.npmjs.com/package/rc-collapse to implement and manage accordions.
@julieg18 You can probably consume this or draw some insights/inspiration from this package for your custom component.

@jorgeorpinel @julieg18
Yeah, we can auto-expand them using #anchored link (assuming this link navigates to the section hosting these details)
The section upon mount checks if it's in the view from the fragment URL and can appropriately initialize its state which decides if the detail block should be expanded or not.

I hope this helps.
Thanks!

Further, I would love to discuss and contribute in whatever scope possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: website Area: website website: eng-doc DEPRECATED JS engine for /doc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants