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
Refactor Blocks/ToC/Edit component #4961
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for volto canceled.
|
Passing run #6779 ↗︎
Details:
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
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.
lgtm
{title} | ||
</AnchorLink> | ||
{mode === 'edit' ? ( | ||
<a href={`#${slug}`}>{title}</a> |
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.
@Tishasoumya-02 What is the benefit of this code?
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.
@iFlameing I pushed this part in order to fix #5020. Ideally, we should not scroll in edit mode. @sneridagh Thoughts ?
@@ -16,7 +16,11 @@ const RenderMenuItems = ({ items }) => { | |||
item && ( | |||
<React.Fragment key={id}> | |||
<Menu.Item className={`headline-${level}`}> | |||
<AnchorLink href={`#${slug}`}>{title}</AnchorLink> | |||
{mode === 'edit' ? ( | |||
<a href={`#${slug}`}>{title}</a> |
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.
same here.
#4460
Also fixes #5020