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

🚀 Feature: Firefox extension #7

Closed
3 tasks done
JoshuaKGoldberg opened this issue Aug 26, 2022 · 23 comments
Closed
3 tasks done

🚀 Feature: Firefox extension #7

JoshuaKGoldberg opened this issue Aug 26, 2022 · 23 comments
Labels
status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request

Comments

@JoshuaKGoldberg
Copy link
Owner

Feature Request Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Overview

So far I've only targeted Google Chrome as the target browser, since that's the only browser I use day-to-day. But it'd be great to have extensions build for other browsers too.

Additional Info

No response

@JoshuaKGoldberg JoshuaKGoldberg added type: feature New enhancement or request status: accepting prs Please, send a pull request to resolve this! labels Aug 26, 2022
@JoshuaKGoldberg
Copy link
Owner Author

I wonder if https://www.plasmo.com would be a good solution here? Needs investigation.

@schalkneethling
Copy link

I wonder if https://www.plasmo.com would be a good solution here? Needs investigation.

Hey @JoshuaKGoldberg, is it clear what aspects of the current extension make it incompatible with Firefox and Safari? I also assume Edge is no longer a problem, or are there still things there that are different from other Chromium browsers?

@JoshuaKGoldberg
Copy link
Owner Author

The only issue is that it hasn't been packaged in a format those browsers support. There's no technical reason why it couldn't be. Plasmo just looks very convenient!

@schalkneethling
Copy link

The only issue is that it hasn't been packaged in a format those browsers support. There's no technical reason why it couldn't be. Plasmo just looks very convenient!

Not promising anything, but I might look at this over the weekend. Thank you for the quick reply.

@estevezluis
Copy link
Contributor

estevezluis commented Apr 7, 2023

I tried out plasmo, and it doesn't feel complete. In their FAQ, firefox-mv3 and safari-mv3 (unfortunately requires xcode) are not listed in the supported list.

You can "build" any version you want using plasmo build --target=make_up_a_vendor-mv3

Without plasmo, I was able to install and verify the extension in firefox ONLY in debugging mode.

For FF mv3 production build, it required adding an extension ID to the manifest.json

"browser_specific_settings": {
	"gecko": {
		"id": "{567af3e7-5ad3-4add-8413-0414e930519b}" // or email@domain.com
	}
}

Edge: From quick research, if it works for chrome then it works for edge. (except for minuscule changes)

I will continue to figure out:

  • if this extension needs permission to make fetch request in production mode. E.g host_permissions key. EDIT: probably not needed since we are make request within the same origin. 😅
  • if one manifest.json can be shared for all vendors.

@estevezluis
Copy link
Contributor

It's a feature not a bug!

I ran into a situation where the content_scripts isn't executing/injecting automatically but since Firefox 109, mv3 permissions are not granted during installation. User has to allow per visit unless user selects "Always allow access..."

In MV2, host permissions are granted by the user at the time of install and there’s no elegant way for the user to change this setting (short of uninstalling/reinstalling and choosing different permissions). But with the new extensions button in MV3 in Firefox, users will have easy access and persistent control over which extensions can access any web page, at any time. Users are free to grant ongoing access to a website, or make a choice per visit. To enable this, MV3 treats host permissions (listed in the extension manifest) as opt-in. - source

@zombie
Copy link

zombie commented Apr 10, 2023

FWIW, I downloaded a CRX from the Chrome store, unpacked locally, loaded it through about:debugging in Firefox, granted access to github.com (open 🧩 extension panel 🡒 then ⚙️ cog menu 🡒 Always Allow on github.com), and it seems everything just works.

saved-replies

If you want to upload to AMO, I believe you would just need to add an id to the manifest (as Luis already mentioned).

@JoshuaKGoldberg
Copy link
Owner Author

JoshuaKGoldberg commented Apr 10, 2023

Well that's wonderful! I think for a PR to land here it would have to:

Really excited about this! I've never had a cross-browser extension before 😄. The last time I worked on these things was maybe 5 years ago. Thanks for the investigations y'all!

@schalkneethling
Copy link

FWIW, I downloaded a CRX from the Chrome store, unpacked locally, loaded it through about:debugging in Firefox, granted access to github.com (open 🧩 extension panel 🡒 then ⚙️ cog menu 🡒 Always Allow on github.com), and it seems everything just works.

Thanks for adding this here @zombie, I was just about to add a comment.

@schalkneethling
Copy link

@zombie @JoshuaKGoldberg @estevezluis are any of you working on the PR?

@estevezluis
Copy link
Contributor

@schalkneethling You can have at it :) I'm just dropping resources for it.

@schalkneethling
Copy link

Quick update. I will open a pull request for this tomorrow.

@schalkneethling
Copy link

schalkneethling commented Apr 17, 2023

@JoshuaKGoldberg I installed the extension in Arc (Chromium), and when clicking saved replies in this repository, I do not see the expected saved reply added to my existing list of saved replies.

Screenshot of saved replies that demonstrates that the expected saved reply is not added to the list.

From what I can tell, this one is meant to be added to the list:
https://github.com/JoshuaKGoldberg/refined-saved-replies/blob/main/.github/replies.yml

@schalkneethling
Copy link

@JoshuaKGoldberg, the pull request is open, and I believe it contains everything that is needed. 😄 @zombie, feel free to also double-check. Thanks!

@JoshuaKGoldberg
Copy link
Owner Author

@JoshuaKGoldberg I installed the extension in Arc (Chromium), and when clicking saved replies in this repository, I do not see the expected saved reply added to my existing list of saved replies.

Screenshot of saved replies that demonstrates that the expected saved reply is not added to the list.

From what I can tell, this one is meant to be added to the list: main/.github/replies.yml

Seems like something to be investigated 😉

@drupol
Copy link

drupol commented Jul 29, 2023

Hello,

I review a lot of PRs on the NixOS project and this extension would be amazing if it would be available on Firefox.

JoshuaKGoldberg added a commit that referenced this issue Nov 16, 2023
## PR Checklist

- [x] Addresses an existing open issue: starts on #7
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/refined-saved-replies/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/refined-saved-replies/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

Adds https://extensionworkshop.com's `web-ext` tool instead of the
existing `zip` script to build a Firefox-ready zip, and adds development
+ production docs for Firefox alongside the existing Chrome ones.

Doesn't yet look into Edge or Safari. That can be a next step or two for
the rest of #7.

cc @estevezluis @schalkneethling - builds off the changes in #153.

Co-authored-by: Schalk Neethling <schalk@mechanical.ink>
Co-authored-by: Luis Estevez <contact@luisestevez.me>
@JoshuaKGoldberg
Copy link
Owner Author

JoshuaKGoldberg commented Jan 12, 2024

Status update: looks like https://addons.mozilla.org/en-US/firefox/addon/refined-saved-replies was approved for Firefox! 🚀

I'll re-target this issue as being just for Firefox and spin out separate ones for Edge and Safari. Whoop!

Fixed by #177.

@JoshuaKGoldberg JoshuaKGoldberg changed the title 🚀 Feature: Edge, Firefox, and Safari extensions 🚀 Feature: Firefox extension Jan 12, 2024
@drupol
Copy link

drupol commented Jan 12, 2024

Excellent news !!!

@schalkneethling
Copy link

Status update: looks like https://addons.mozilla.org/en-US/firefox/addon/refined-saved-replies was approved for Firefox! 🚀

I'll re-target this issue as being just for Firefox and spin out separate ones for Edge and Safari. Whoop!

Fixed by #177.

Thanks to everyone who took this one over the finish line. 🤘

@drupol
Copy link

drupol commented Jan 12, 2024

Do you think it would be possible to use a different .github/replies.yml per site?

Example:

I'm a NixOS contributor and I do pull request reviews. In order to speed up my reviews, I use such a file in my own Github configuration. However, I wish I could share it with other contributors to have better reviews and keep them at one single central place, but not necessarily committing it to the main NixOS project. Therefore, it would be nice if we could configure that extension with predefined presets.

  • Preset 1: {name: NixOS, SavedRepliesRepo: https://github.com/foobar/bar}
  • Preset 2: {name: Rust, SavedRepliesRepo: https://github.com/another/one}
  • etc

Let me know what you think of the idea.

@JoshuaKGoldberg
Copy link
Owner Author

JoshuaKGoldberg commented Jan 12, 2024

It's an interesting idea, but I'm not clear on what you mean by "per site". Right now the extension pulls from the .github/replies.yml of whatever current directory you're in.

Could I bother you to file a feature request that has more details please? I'm definitely interested in this, and want to learn more. Having a separate issue will help make that discussion discoverable.

@JoshuaKGoldberg
Copy link
Owner Author

@all-contributors please add @JoshuaKGoldberg for ideas.

🤖 Beep boop! This comment was added automatically by all-contributors-auto-action.
Not all contributions can be detected from Git & GitHub alone. Please comment any missing contribution types this bot missed.
...and of course, thank you for contributing! 💙

Copy link
Contributor

@JoshuaKGoldberg

I've put up a pull request to add @JoshuaKGoldberg! 🎉

I couldn't determine any contributions to add, did you specify any contributions?
Please make sure to use valid contribution names.

JoshuaKGoldberg pushed a commit that referenced this issue Jun 3, 2024
Adds @JoshuaKGoldberg as a contributor for ideas.

This was requested by JoshuaKGoldberg [in this
comment](#7 (comment))

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
morganm94 pushed a commit to azurespheredev/refined-saved-replies that referenced this issue Nov 4, 2024
Adds @JoshuaKGoldberg as a contributor for ideas.

This was requested by JoshuaKGoldberg [in this
comment](JoshuaKGoldberg/refined-saved-replies#7 (comment))

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request
Projects
None yet
Development

No branches or pull requests

5 participants