adds public methods to show / hide the toolbar#95
Open
aaronmyatt wants to merge 1 commit intopanphora:mainfrom
Open
adds public methods to show / hide the toolbar#95aaronmyatt wants to merge 1 commit intopanphora:mainfrom
aaronmyatt wants to merge 1 commit intopanphora:mainfrom
Conversation
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.
The changes in this PR enable users of Overtype to programatically toggle the toolbar on and off, preserving the in memory representation to save redundant work.
This has been a challenge I've worked around while building my tool: Waystation which uses Overtype as its editor.
You can explore my research and plan for this PR on Waystation itself! https://waystation.aaronmyatt.com/#!/?repo=panphora%2Fovertype
New public methods
Two new public methods are available on the editor instance to
showToolbarorhideToolbarsrc/overtype.js +1025
Toolbar controls itself
The editor public methods delegate to the toolbar. I'd like feedback on whether adding/removing
.overtype-toolbaris the wisest approach, or we can add a dedicated.overtype-toolbar-hiddenclass with a higher prioritydisplaystyle.src/toolbar.js +293
The web component api has been extended similarly too
src/overtype-webcomponent.js +674
Functionality is tested through the web component
test/webcomponent.test.js +472
Summary by cubic
Adds public methods to show and hide the toolbar, enabling programmatic control without destroying the instance. This lets integrations toggle the UI while preserving state and avoiding redundant work.
Written for commit 752594c. Summary will update on new commits.