primer / brand

React components and Primitives for GitHub marketing websites
https://primer.style/brand
MIT License
65 stars 30 forks source link

Anchor links for `FAQ` Questions #643

Open sergioalvz opened 2 months ago

sergioalvz commented 2 months ago

Hey Primer Brand friends,

We've received a request about how convenient it would be to add anchor links to specific questions inside the FAQ component so they can be easily shared with customers. I see the FAQ has some support for passing around id attributes, but from reading the docs, I don't think it offers any control to detect when a FAQ question is selected to change the URL accordingly. I guess supporting this kind of behavior will need a hybrid approach where certain logic needs to happen on the application side, but some could also be added to the component itself. For example, Primer Brand could facilitate expanding the right question when there are FAQ groups involved.

How do you feel about this functionality? Do you happen to have any directions to make it work today?

rezrah commented 2 months ago

👋 @sergioalvz - thanks for the request. We explored deeplinks a little while back, which sounds similar to what you're asking about. The feature lost traction due to lowered prioritisation, but you can see the progress we made here. If this is what you're looking for, feel free to create a new modification request with the relevant info, or add a comment to this proposal and we can look to revive that work.