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:install also 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/browser library with Drupal.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

Command icon 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

deciphered created an issue. See original summary.

deciphered’s picture

Status: Active » Reviewed & tested by the community

  • deciphered committed ae64b93a on 1.1.x
    feat(#3642686): check text in the browser with Vale's WebAssembly build
    
deciphered’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • deciphered committed ae64b93a on chore/devcontainer
    feat(#3642686): check text in the browser with Vale's WebAssembly build
    

  • deciphered committed ae64b93a on feature/108-docs
    feat(#3642686): check text in the browser with Vale's WebAssembly build
    

  • deciphered committed ae64b93a on feature/113-hardening
    feat(#3642686): check text in the browser with Vale's WebAssembly build