Port extension to Safari
Clarifying requirements for bounty
In scope
- [x] Build Safari web extension
- [x] readme.md explaining how to build locally
- [ ] Same functionality as Chrome extension
- [ ] Needs a permission grant from Safari
- [x] Able to run in dev mode for testing by Rows
- [x] Minimal single screen, example:
- [x] About box
Out of scope
Anything not listed as in scope, for example:
- Safari app extension
- CI for build
- Non-mac Safari (iOS...)
- Signing for App store
- Submission to App store
- Anything involved with distribution
- [x] Art for app icons
- Copy (legal or otherwise) that Apple requires
If that scope looks OK, please assign to me.
thanks, rusty
Also, please exempt this bounty from made publicly available requirement:
features are only eligible for a bounty once they are approved by our team and made publicly available.
The submission and public distribution should be done by Rows, not by the person who completes the issue.
Thanks for taking on the challenge @feep ! I just assigned it to you, that's the scope. Please keep code duplication to a minimum so that it is easier to maintain. TY!
cc @ricardofelgueiras
Probably unsupported 😿, still working on a minimal reproduction.
Will get back to you on that, Safari’s extension debugging is... limited. And Apple’s transparency on feature support is... hazy.
Anyway,
Progress report (the good):
The bad:
-
The service_worker script failed to load due to an error., best I can tell, there is no debug UI available for this error in Safari.
- UI loads. But does not connect, so is useless
The server is running
❯ curl -I http://localhost:5173
HTTP/1.1 200 OK
...
So,
Hmmph. Done banging my head on it for now. Going for for a walk.
Will report back when I have a minimal test case.
rusty
Always try one more thing before you give up. Prod extension works, dev-mode extension does not.
Progress report
But does not properly forward the data to rows.com.
Which is going to be difficult to debug without, ahem, being able to use the dev-mode extension.
Anyway, better than before. More later.
Where do you want the safari bits?
-
./safariin this repo - A different directory
- A different repo
For dev or CI, it should work fine within the repo or out of the repo. If in a separate repo, the chrome extension would need to keep a consistent path when building (../X/dist or something).
Where do you want the safari bits?
./safariin this repo- A different directory
- A different repo
For dev or CI, it should work fine within the repo or out of the repo. If in a separate repo, the Chrome extension would need to keep a consistent path when building (
../X/distor something).
You can create a safari folder specifically for this. We can take care of the build afterward. Don't forget to edit the tests and ensure these tests run for the Safari extension as well.
Additionally and to give you some context, it would be better to build the extension having the Manifest V3 in mind. This will allow us to create one single extension that works for the main browsers (Safari, Chrome, and Firefox).
One hint for you to check why the Open in Rows doesn't work: check the permissions. The extension should be able to add information to the clipboard.
Additionally and to give you some context, it would be better to build the extension having the Manifest V3 in mind. This will allow us to create one single extension that works for the main browsers (Safari, Chrome, and Firefox).
The (production) extension builds into a Safari extension with no changes.
It will need a different UI on Safari, if you decide to deal with the clipboard issues (more in later comment).
check the permissions. The extension should be able to add information to the clipboard.
Yup. Sigh.
Safari requires user action to read the clipboard.
I think, still, on 17.3.1. Haven’t finished research.
Anyway, if that is true, it needs some UI work.
It works =]
Kinda.
- Click RowsX extension menu
- Click copy button (which dismisses the popover)
- Click RowsX extension menu again
- Click
Open in Rows - Paste
I will get a draft PR up later today with the Safari webextension build in ./safari.
Still poking around, trying to get clipboard permission.
Unhandled Promise Rejection: Error: Cannot access contents of the page. Extension manifest must request permission to access the respective host, or have "activeTab" permission with a user gesture.
I can get the permission request (a different one) to pop up on click (user gesture) on Chromium, but it won’t pop on Safari.
I will update #88 when I make visible progress.
Unable to get proper permissions.
Not much documented in Safari, and things I tried that popped an additional permission request in Chrome did not do anything useful in Safari.
May try again later.
Unassigning. If anyone picks this up, you are welcome to use #88 as a starting point.
Basically, this is where it stands.
As far as I am concerned, this bounty is open again.