Skip to content
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

Help test Vale's new Chrome extension! #778

Open
jdkato opened this issue Feb 20, 2024 · 16 comments
Open

Help test Vale's new Chrome extension! #778

jdkato opened this issue Feb 20, 2024 · 16 comments

Comments

@jdkato
Copy link
Member

jdkato commented Feb 20, 2024

The first release of Vale's new Chrome extension has been published to the Chrome Web Store (it will also soon be available for Firefox, Opera, and Edge).

The extension is currently unlisted and I'm looking for help testing it before going completely public.

Installation

  1. Install the latest version of Vale (v3.1.0).
  2. Run vale host-install chrome from the command-line.
  3. Install the extension from the Chrome Web Store.

Configuration

The extension uses your default .vale.ini file for its configuration. Run vale ls-dirs to see its exact location on your system.

The contents of the active textarea or [contenteditable] are passed as paths taking the form of <domain>.<format> -- for example, github.com.md.

You can set the format for a particular website in the extension's settings (see Usage below).

This allows you to both write configuration targeting specific websites or use the typical [*.ext] sections:

StylesPath = styles
MinAlertLevel = suggestion

[*.md]
# All Markdown files
BasedOnStyles = Vale

[*{github,gitlab}.com.md]
# `github.com` and `gitlab.com`
BasedOnStyles = AnotherStyle

Usage

Screenshot 2024-02-18 at 4 08 04 PM

After editing text in either a textarea or [contenteditable] element, click the extension's icon.

NOTE: The extension requires manual activation (clicking its icon) for two reasons: (1) it only requires the lowest level of permissions (activeTab) and (2) it doesn't compete for UI space with other extensions or built-in website functionality.

Uninstallation

  1. Remove the extension from Chrome.
  2. Run vale host-uninstall chrome from the command line.
@theletterf
Copy link

theletterf commented Feb 20, 2024

Working beautifully here. Tested on a MediaWiki setup using the latest macos x64 build of Chrome and the latest version of Vale CLI. It'd be great to somehow set the location of the style using a UI in the extension's settings, overriding the default paths—right now that's the biggest hurdle for non-technical users.

@aireilly
Copy link

On Fedora, I see this error:

$ vale host-install chrome
 SUCCESS  writing config                                                                            
 SUCCESS  fetching binary                                                                           
installing host [2/3] ████████████████████████████████████████████████  67% | 1sE100 [host-install] Runtime error

E100 [host-install] Runtime error

open /home/aireilly/home/aireilly/.config/google-chrome/NativeMessagingHosts/sh.vale.native.json: no such file or directory

Execution stopped with code 1.

Execution stopped with code 1.

@jdkato
Copy link
Member Author

jdkato commented Feb 20, 2024

@aireilly, this should be fixed now. If you're so inclined, you can try building from the v3 branch to confirm.

@aireilly
Copy link

vale host-install chrome

Yup worked a treat thanks.

@aireilly
Copy link

I'm now here:
image

┌───── ~ 
$ vale ls-dirs
Asset       | Default Location                               | Found
StylesPath  | /home/aireilly/.local/share/vale/styles        | ✓
.vale.ini   | /home/aireilly/.config/vale/.vale.ini          | ✓
vale-native | /home/aireilly/.config/vale/native/vale-native | ✓

@jdkato
Copy link
Member Author

jdkato commented Feb 20, 2024

Did you set that StylesPath in the .vale.ini?

If you don't set one, it will use the default. Otherwise, you'll need to create it as usual.

@aireilly
Copy link

Ah Ok. I didn't have StylesPath = .vale/styles set. I created the folder manually and it works now

@aireilly
Copy link

aireilly commented Feb 21, 2024

Slightly confused about the global .vale.ini. Should I run vale sync in this folder?

┌───── ~/.config/vale 
$ vale ls-dirs
Asset       | Default Location                               | Found
StylesPath  | /home/aireilly/.local/share/vale/styles        | ✓
.vale.ini   | /home/aireilly/.config/vale/.vale.ini          | ✓
vale-native | /home/aireilly/.config/vale/native/vale-native | ✓

$ cat /home/aireilly/.config/vale/.vale.ini
StylesPath = .vale/styles
MinAlertLevel = suggestion

[*.md]
# All Markdown files
BasedOnStyles = Vale

[*{github,gitlab}.com.md]
# `github.com` and `gitlab.com`
BasedOnStyles = Vale

@jdkato
Copy link
Member Author

jdkato commented Feb 22, 2024

It's just a config file that is either used in place of, or in addition to, project-specific ones:

  1. In cases where there's no project-specific configuration, such as the browser, this is the only configuration used.
  2. In cases where there is a project-specific configuration, you can use it to make local overrides. See Supporting both in-repo and local rules #737 for a description of the idea.

So, you can treat it as you would any other .vale.ini file.

@dustinloflandsmith
Copy link

dustinloflandsmith commented Mar 2, 2024

Just gave it a try (latest macos arm64 build) and everything works great 👍

@jdkato
Copy link
Member Author

jdkato commented Mar 31, 2024

Working beautifully here. Tested on a MediaWiki setup using the latest macos x64 build of Chrome and the latest version of Vale CLI. It'd be great to somehow set the location of the style using a UI in the extension's settings, overriding the default paths—right now that's the biggest hurdle for non-technical users.

@theletterf, not sure I understand this. Do you mean the location of a .vale.ini file? Or specifically the StylesPath value?

@theletterf
Copy link

@jdkato It'd be great if the Vale ini was somehow stored in the extension itself, or could be selected using the system UI. That would spare users from creating the file in the default path.

@theletterf
Copy link

Hi there! What's the current status? Can we help with something?

@jansol
Copy link

jansol commented Apr 30, 2024

Are the extension sources planned to be on github too?

Looking forward too try this out once Firefox support lands.

@jdkato
Copy link
Member Author

jdkato commented May 1, 2024

The status hasn't changed much lately. I'll probably work on getting the extension out as-is and then work on adding/improving features in later releases.

@theletterf
Copy link

Love the idea. That way, I can get the team at Splunk to test it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants