refactor toolbar in ew#1018
Open
hannessolo wants to merge 2 commits into
Open
Conversation
- toolbar shows on caret (not just range); marks-at-cursor drive its active state - drop storedMarks preservation across cursor moves so toggled marks clear if the user moves without typing - emit controller updates unconditionally on setActive so the toolbar re-renders against fresh view.state - hide inline-only block controls in wysiwyg/layout mode - only hide the toolbar on actual canvas view-mode transitions, not on port-ready/ctx/iframe-load Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
||
| function shouldShow() { | ||
| if (state.mode === 'none') return false; | ||
| if (state.interacting) return false; |
Contributor
There was a problem hiding this comment.
Do we need to explicitly hide the toolbar when related interactions are happening? Why not still have the toolbar in the background when the table or other modals are open? We then dont have to worry about rendering the toolbar again on closure.
| const disabled = !this.view; | ||
| // In wysiwyg mode the iframe owns block-level structure (paragraph/heading, | ||
| // lists, tables) — only show inline marks and link controls. | ||
| const inlineOnly = this._mode === 'wysiwyg'; |
Contributor
There was a problem hiding this comment.
In wyswyg, shouldn't the user still be able to change the heading types etc?
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

https://ewtb--da-live--adobe.aem.live