-
Notifications
You must be signed in to change notification settings - Fork 3
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
Support accordion block, description block, teaser block. Make tooltip component customizable. #14
base: main
Are you sure you want to change the base?
Conversation
…Make TooltipPopup customizable via component registry.
This reverts commit db84c5d.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I finally made time to test this. Yes, this works. Thanks!
I made a few inline suggestions for the documentation.
Question: you are saying to register a new view for the description block. I am used to customising the existing view by putting it in customizations/components/manage/Blocks/Description/View.tsx
. I tried it, and both work. I wonder if the documentation should show this second method instead. I don't really mind, and don't know which would be better.
I wonder if the same approach could work for the title block, and also the titles of accordions and teasers. But the client has not asked about this yet, and maybe it is better this way.
Thanks!
```js | ||
import { TextWithGlossaryTooltips } from '@rohberg/volto-slate-glossary/utils'; | ||
|
||
const DescriptionBlockView = ({ properties, metadata, id }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the configuration you set
config.blocks.blocksConfig.description.view = DescriptionBlockViewWithTooltips;
so the name here should be the same:
const DescriptionBlockView = ({ properties, metadata, id }) => { | |
const DescriptionBlockViewWithTooltips = ({ properties, metadata, id }) => { |
); | ||
}; | ||
|
||
export default withBlockExtensions(TeaserView); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the blocks config you set teaser.view = TeaserViewWithTooltips
, so that should be the item that is exported.
export default withBlockExtensions(TeaserView); | |
const TeaserViewWithTooltips = withBlockExtensions(TeaserView); | |
export default TeaserViewWithTooltips; |
No description provided.