Problem/Motivation
Every check runs on the server, so showing findings while the author types means a request for each pause in typing. Vale 3.26.0 ships a WebAssembly build that can run the same check in the browser.
Proposed resolution
- Have
vale:installalso install Vale's browser build, at the binary's version, checked against the release's checksums. - Serve the site's configuration, styles and language models to the browser build, to users who may use the check endpoint.
- Add a
vale/browserlibrary withDrupal.vale.lint(), which checks a value in the browser as a save would, and falls back to the check endpoint when the build is missing or fails. - Show the browser build's version on the status report, and warn when it differs from the binary's.
- Describe how to install Vale on hosts that make the code read-only.
Remaining tasks
- Review the merge request.
User interface changes
A "Vale browser build" entry on the status report, and a link to download the styles on the status report and in a field's Prose checks settings.
API changes
New routes /vale/config/{langcode}, /vale/styles and /vale/models/{langcode}. A new vale/browser library with Drupal.vale.lint(). A new vale_wasm setting, and new options on vale:install.
Data model changes
None.
Issue fork vale-3642686
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
decipheredComment #5
deciphered