wildcard icon indicating copy to clipboard operation
wildcard copied to clipboard

Propagate errors and display in the UI

Open karlicoss opened this issue 4 years ago • 2 comments

Currently, if something fails (e.g. error inside a scraper), the error is logged in the console, but from the user's perspective the extension just doesn't work, e.g. wildcard table might not even appear.

I've had similar problem in my project, and I'm wrapping all top-level user facing interactions (e.g. keyboard interactions/menu clicks/etc) into an error handler that shows an error notification (instead of silently logging). It has a toggle in the settings, so people could enable/disable that behaviour depending on how it annoys them and whether they want to report issues with the adapters to the developers.

Happy to contribute and add something similar for Wildcard if you think it could be useful.

karlicoss avatar May 07 '20 19:05 karlicoss

Thanks for the suggestion! Definitely a good thing to consider.

It fits in with some broader plans I've been thinking about in terms of handling errors in scrapers, so I think the best thing for now is to leave this issue open, and wait and see how this fits in with some upcoming changes.

One issue which is kind of related: how do I know that Wildcard is supposed to be active on a site? Currently the table just pops up every time, but I think that should be changed to be closed by default... maybe the toolbar icon should light up or something.

geoffreylitt avatar May 08 '20 01:05 geoffreylitt

Yep, agree, also thought about that! My first idea wasn't the toolbar, but rather the browser action? It's always there, and some people might prefer not to show the toolbar for certain sites (regardless whether it's closed or open), and the action icon seems like an accepted way of tuning "extension on/off" and indicating whether it's active on the current page.

karlicoss avatar May 08 '20 07:05 karlicoss