serenadeai / serenade

Apache License 2.0
317 stars 57 forks source link

The ability to specify URLs for the Revision Box. #5

Open awulkan opened 2 years ago

awulkan commented 2 years ago

Context

Right now you can specify applications where the revision box should be used. However I find that I often need to use it on specific web sites as well. However I don't want to use the the revision box on all websites, so I don't want to simply specify my browser in the revision box settings.

Goals

The ability to specify URLs in the revision box settings file. Preferably with wildcards/regex to allow for only specifying specific parts of a website.

Proposed Solution

I do not know how to solve this, but I might attempt to figure it out. At the very least I am available to exchange ideas with if necessary. :)

Alternatives

I don't know of any valid alternatives other than making Serenade work properly on all pages without the use of the revision box.

MattWiethoff commented 2 years ago

Thanks for the report!

Does the beta version of the chrome extension work for you? We removed support for content editables and trigger the revision box instead, which might capture the URLs you want to disable.

We haven't published it to the chrome store yet, but it's available here: https://github.com/serenadeai/chrome and requires Serenade 2.0.1.

awulkan commented 2 years ago

I am using the latest source-compiled version of the chrome extension, and version 2.0.1 of Serenade. It doesn't trigger the revision box in any of the places that I'm having problems, such as this GitHub comment section (which is a textarea element). Serenade can't use commands like "change to " or "undo".

MattWiethoff commented 2 years ago

Thanks for checking. I'm unable to repro this on my end (those command work for me in the github text area).

Sounds like this call might not be returning the editor state for you, so it'd be great if we could confirm and then narrow things down further. Happy to debug this live over discord as well, I'm MattWiethoff there too..

awulkan commented 2 years ago

For some reason it works for me as well now on GitHub. I have tried it on multiple occasions without it working, so it must have been some temporary problem. Anyway, the "change" command still doesn't work on Discord's (website) comment box, for example. And I don't get any revision box automatically there either. I'll contact you on Discord. :)

MattWiethoff commented 2 years ago

After trying it out on discord, I think your proposal does make sense when we don't have a regular input / code editor available in the browser. How about the following for the proposed solution:

I'm not sure what the format of the url wildcards should look like. Maybe there's a standard way of doing that we should be using. Ideally the format would make it easily distinguishable from an app name, since it would mean we wouldn't have to change the json structure of the settings file (we can just use a url in the places we currently use an app name).