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

Introduce context on view component #6394

Open
ksuess opened this issue Oct 11, 2024 · 1 comment · May be fixed by #6395
Open

Introduce context on view component #6394

ksuess opened this issue Oct 11, 2024 · 1 comment · May be fixed by #6395

Comments

@ksuess
Copy link
Member

ksuess commented Oct 11, 2024

Is your feature request related to a problem? Please describe.
Tooltips generated from a glossary should show up only on the first occurrence on a page.

Describe the solution you'd like
Volto provides a context of the View component for the case that blocks need to know about each other.

Wrap the RenderedView component with a context provider.

Describe alternatives you've considered
Hints where to hook in the collection of blocks without a change in packages/volto/src/components/theme/View/View.jsx are welcome. As an alternative to the wrapper with context provider, I see only the shadowing of the View component, which is obviously no option in an add-on.

Additional context
rohberg/volto-slate-glossary#8
Per default, glossary terms are searched per slate leaf. Which leads to a tooltip on every match.

@mauritsvanrees
Copy link
Member

For the record: I want this. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants