-
Notifications
You must be signed in to change notification settings - Fork 20
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
PLANET-4811 Submenu WYSIWYG #328
Conversation
d771ede
to
6216d38
Compare
5886583
to
382cb80
Compare
@@ -32,15 +32,13 @@ public function init() { | |||
'shortcake_columns', | |||
'shortcake_carousel_header', | |||
'shortcake_cookies', | |||
'shortcake_counter', |
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 removed this one here too because it was forgotten when converting Counter to WYSIWYG 😬
2f8d0fb
to
93e130d
Compare
There is another open PR for this issue, to remove the endpoint: #356 |
Copying here @sagarsdeshmukh's comment from the other PR: Functionality wise the new wysiwyg submenu block looks good to me 👍
https://drive.google.com/file/d/1t_oVWunSj1pyCXS-YnND4lqjbAhoVHn6/view?usp=sharing |
useEffect(() => { | ||
const items = loadMenuItems(); | ||
setMenuItems(items); | ||
}, [levels]); |
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.
This is actually a bit more tricky, the block also needs to re-render if any headings are added, removed or changed on the page. Not sure what would be the best way. We could do a document.querySelectorAll
and pass the result as a dependency to useEffect
, but that would be a bit duplicate logic with what happens inside loadMenuItems
Hi @mleray - Sorry for the delay in reply, I tested the latest changes at here and above issues seems to fixed including the special char issue as well. |
Thank you for testing again! There is yet another PR open for this issue 🙈 And the title being displayed as a link is taken care of there |
Closing this as we'll continue with #363, which already has the commits from this PR |
See https://jira.greenpeace.org/browse/PLANET-4811
More details in the doc