vale icon indicating copy to clipboard operation
vale copied to clipboard

Help test Vale's new Chrome extension!

Open jdkato opened this issue 1 year ago • 21 comments

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.

jdkato avatar Feb 20 '24 01:02 jdkato

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 avatar Feb 20 '24 08:02 theletterf

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.

aireilly avatar Feb 20 '24 10:02 aireilly

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

jdkato avatar Feb 20 '24 10:02 jdkato

vale host-install chrome

Yup worked a treat thanks.

aireilly avatar Feb 20 '24 15:02 aireilly

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 | ✓

aireilly avatar Feb 20 '24 15:02 aireilly

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.

jdkato avatar Feb 20 '24 21:02 jdkato

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

aireilly avatar Feb 21 '24 14:02 aireilly

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

aireilly avatar Feb 21 '24 14:02 aireilly

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 https://github.com/errata-ai/vale/issues/737 for a description of the idea.

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

jdkato avatar Feb 22 '24 03:02 jdkato

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

dustinloflandsmith avatar Mar 02 '24 18:03 dustinloflandsmith

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?

jdkato avatar Mar 31 '24 02:03 jdkato

@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 avatar Mar 31 '24 06:03 theletterf

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

theletterf avatar Apr 30 '24 12:04 theletterf

Are the extension sources planned to be on github too?

Looking forward too try this out once Firefox support lands.

jansol avatar Apr 30 '24 14:04 jansol

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.

jdkato avatar May 01 '24 22:05 jdkato

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

theletterf avatar May 02 '24 07:05 theletterf

I also took a quick test today, couple of thoughts / questions:

  1. I assume it doesn't work if I use symlinks in the extension's application support folder? Because of all the testing I do, I have quite an esoteric setup for Vale.
  2. To be more useful, it would be good to figure out how to do line decorations inline. I am investigating how to do this via attempting to update the Vale Obsidian extension and some other projects so I may find out how to do this. Other extensions do, so it's possible…
  3. I'd also like to try and make a version for other browsers.

ChrisChinchilla avatar Jun 21 '24 09:06 ChrisChinchilla

To be more useful, it would be good to figure out how to do line decorations inline. I am investigating how to do this via attempting to update the Vale Obsidian extension and some other projects so I may find out how to do this. Other extensions do, so it's possible…

This is obviously a matter of taste, but I dislike this functionality. When every writing extension feels the need to inject styling into the page it often means that (1) you can't use them together and (2) it interferes will built-in corrections (such as are present in Gmail, for example). The solution here isn't clear to me, short of making this opt-in.

I'd also like to try and make a version for other browsers.

I have it working in Firefox and Arc locally. I just need to publish to the stores.

jdkato avatar Jun 26 '24 01:06 jdkato