rows / X

RowsX is a Chrome extension that performs simple web scraping tasks for business users. It loads data from website tables into spreadsheets. Developed by Rows.com.
https://chromewebstore.google.com/detail/rowsx/abkccndhocmfdombbpmnhfjidcdcjjeo
MIT License
75 stars 13 forks source link

Port extension to Safari #82

Open feep opened 5 months ago

feep commented 5 months ago

Clarifying requirements for bounty

In scope

Out of scope

Anything not listed as in scope, for example:

feep commented 5 months ago

If that scope looks OK, please assign to me.

thanks, rusty

feep commented 5 months ago

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.

henriquemcruz commented 5 months ago

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

feep commented 5 months ago

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):

image

image

The bad:

  1. 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.

image

  1. UI loads. But does not connect, so is useless

image

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

feep commented 5 months ago

Always try one more thing before you give up. Prod extension works, dev-mode extension does not.

Progress report

image

But does not properly forward the data to rows.com.

image

Which is going to be difficult to debug without, ahem, being able to use the dev-mode extension.

Anyway, better than before. More later.

feep commented 5 months ago

Where do you want the safari bits?

  1. ./safari in this repo
  2. A different directory
  3. 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).

ricardofelgueiras commented 5 months ago

Where do you want the safari bits?

  1. ./safari in this repo
  2. A different directory
  3. 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).

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).

ricardofelgueiras commented 5 months ago

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.

feep commented 5 months ago

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).

feep commented 5 months ago

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.

  1. Click RowsX extension menu
  2. Click copy button (which dismisses the popover)
  3. Click RowsX extension menu again
  4. Click Open in Rows
  5. Paste

I will get a draft PR up later today with the Safari webextension build in ./safari.

feep commented 5 months ago

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.

feep commented 4 months ago

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.