-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: Add a 'dev mode' flag to the view, and a few developer utilities #212
Conversation
cff46d2
to
ea710e2
Compare
532f6cf
to
736c312
Compare
…ed (#210) * Allow enabling real-time checking when the plugin is instantiated * Add test * Reference IPluginConfig directly in IPluginOptions Allow enabling real-time checking when the plugin is instantiated Don't remove debug decorations when filtering decorations Add test Reference IPluginConfig directly in IPluginOptions
Allow enabling real-time checking when the plugin is instantiated Reference IPluginConfig directly in IPluginOptions
736c312
to
178083e
Compare
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.
Looks really good.
One thing I noticed was if you uncheck Show pending and inflight checks
before the most recent inflight check has completed, the text highlighting remains. Is this intended or should highlighting be removed when the box is unchecked?
src/ts/components/Controls.tsx
Outdated
type="checkbox" | ||
id="debug" | ||
checked={debug} | ||
onChange={() => setDebugState(!debug)} |
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.
debug is quite a generic term, could we rename this to something more specific? setShowPendingInflightChecks
?
@rebecca-thompson hm not removing those ranges is a bit lazy – thanks for noticing, let's remove them. |
🎉 This PR is included in version 5.14.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What does this change?
Adds a 'dev mode' parameter to the view function, which when
true
presents the user with two checkboxes that permit:Pending checks are only really relevant in real time mode – they represent the ranges that have been 'dirtied' since the last check, and are due to be sent to Typerighter. In-flight checks have been sent to Typerighter and have not yet come back.
Here's how the UI looks:
And here's the annotations at work, with an explanation:
I've defaulted dev mode to true in the sandbox – hopefully that makes sense.
How to test
Fire up prosemirror-typerighter locally and have a play. Does it behave as expected? Do you think these things will be useful?