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

Refactor Blocks/ToC/Edit component #4961

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

Tishasoumya-02
Copy link
Contributor

@Tishasoumya-02 Tishasoumya-02 commented Jul 8, 2023

#4460
Also fixes #5020

@netlify
Copy link

netlify bot commented Jul 8, 2023

Deploy Preview for volto canceled.

Name Link
🔨 Latest commit 55701e7
🔍 Latest deploy log https://app.netlify.com/sites/volto/deploys/64d20e3cf5c0f80008541aca

@cypress
Copy link

cypress bot commented Jul 8, 2023

Passing run #6779 ↗︎

0 107 5 0 Flakiness 0

Details:

Merge branch 'master' into block-toc-refactor
Project: Volto Commit: 55701e7594
Status: Passed Duration: 13:15 💡
Started: Aug 9, 2023 5:16 AM Ended: Aug 9, 2023 5:29 AM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

Copy link
Member

@nileshgulia1 nileshgulia1 left a 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>
Copy link
Member

@iFlameing iFlameing Aug 28, 2023

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?

Copy link
Member

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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here.

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

Successfully merging this pull request may close these issues.

TOC: undefined error when scrolling in edit mode as there is no id
3 participants