adobe / spectrum-web-components

Spectrum Web Components
https://opensource.adobe.com/spectrum-web-components/
Apache License 2.0
1.29k stars 205 forks source link

Some SWC modules blocked by ad blockers #1160

Closed bengfarrell closed 3 years ago

bengfarrell commented 3 years ago

Full disclaimer - Yes, I know this isn't really a bug. But on the other hand, it did stump someone on my team for a bit and might be useful to take care of in case anyone else gets stumped.

Expected Behaviour

Spectrum modules should all load in a buildless dev environment (@web/dev-server)

Actual Behaviour

1 or 2 specific modules are blocked

To explain - there are 1 or 2 files in the icons-workflow package that seem to trigger ad blockers just by virtue of their name. The first is AdDisplay.js and I would assume that AdPrint.js would also be problematic.

My team member actually forgot he was using an ad blocker, but just got the following error (which wasn't that helpful for him to figure this out):

GET https://localhost:3000/node_modules/@spectrum-web-components/icons-workflow/lib/icons/AdDisplay.js net::ERR_BLOCKED_BY_CLIENT

Unfortunately, the net result is that our entire app wasn't functioning (just a white page), and I don't think we even have this module as a direct dependency, and it looked like the build system was broken.

Perhaps a simple name change on these 2 files would avoid the hassle for folks in the future?

Westbrook commented 3 years ago

Sounds worth changing. Can you share the ad blocker in question so we can test what sort of name changes would get us out from behind this issue?

bengfarrell commented 3 years ago

Here's his response:

Adblock Plus - free ad blocker Offered by: adblockplus.org

Westbrook commented 3 years ago

This will be a breaking change, does it seem reasonable (it seems like this specific ad blocker is OK with it) to rename these icons/files as follows:

AdDisplay.js and AdDisplayIcon => DisplayAdvert.js and DisplayAdvertIcon AdPrint.js and AdPrintIcon => PrintAdvert.js and PrintAdvertIcon

A little worried that the inclusion of the work Advert is enough like Ad (which even when moved to the end blocked the page) that some blockers will still block it and we might need a future break here.