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

Move to a feature-detection system for delivering 1st class browser support #7391

Closed
3 of 7 tasks
alexgibson opened this issue Jul 8, 2019 · 2 comments
Closed
3 of 7 tasks
Assignees
Labels
P3 Third level priority - Nice to have Papercuts 💸 Tech debt payoff

Comments

@alexgibson
Copy link
Member

alexgibson commented Jul 8, 2019

Description

We usually do a good job of making sure to deliver usable experiences to people both with and without JS enabled, but handling scenarios where JS fails to load is a much more common problem on most websites today. We often resort to using feature detection for this type of problem, but it's nearly always done on a page-by-page basis, or at a component level.

If we moved toward using a global cutsTheMustard() type feature detect (real name TBD), and only ran page-specific JS if the function passes, then we could much more confidently ship code without worrying that we're breaking the site in old browsers.

My initial idea was a function that runs a callback only if the feature detect returns true, but there may be other ways to do this too.


💛 Success Criteria 💛

  • Deliver feature detection on a single page (e.g. /firefox/all)
  • Document the feature detection snippet and incorporate into norms going forward

❗ Risks ❗

  • Where should this live - should it be in the <head>, so we can leverage it for CSS class hooks, or should it be in the common bundle only? There are likely tradeoffs for each.

Tasks

  • Create a feature detect. Ideally it should return false for IE10, but true for IE11 and above.
  • Decide where to implement it and how to should be used (see risks above).
  • Update the page-specific JS on /firefox/all/ to use the new feature detect.
  • Document the feature detect and how it should be used on our browser support page.
@alexgibson
Copy link
Member Author

See also: #7391

@alexgibson alexgibson added the Papercuts 💸 Tech debt payoff label Jul 8, 2019
@alexgibson alexgibson modified the milestone: Technical Roadmap Q4 2019 Jul 8, 2019
@alexgibson
Copy link
Member Author

alexgibson commented Aug 12, 2019

Since IE10 does not support conditional comments (the mechanism we currently use to deliver basic browser support for legacy IE), this issue will become important in order to drop support for IE10.

We may want to consider moving away from conditional comments & universal CSS longer term, and moving more toward a feature-detection model that uses graceful degredation.

@alexgibson alexgibson changed the title Add a site-wide feature detection snippet for 1st class JS support. Move to a feature-detection system for delivering 1st class browser support Aug 12, 2019
@ejregithub ejregithub added this to the S5/Q3: 20190923-20191011 milestone Sep 18, 2019
@ejregithub ejregithub added the P3 Third level priority - Nice to have label Sep 18, 2019
@alexgibson alexgibson self-assigned this Oct 8, 2019
alexgibson added a commit to alexgibson/bedrock that referenced this issue Oct 9, 2019
alexgibson added a commit to alexgibson/bedrock that referenced this issue Oct 9, 2019
alexgibson added a commit to alexgibson/bedrock that referenced this issue Oct 9, 2019
alexgibson added a commit to alexgibson/bedrock that referenced this issue Oct 10, 2019
alexgibson added a commit to alexgibson/bedrock that referenced this issue Oct 10, 2019
alexgibson added a commit to alexgibson/bedrock that referenced this issue Oct 10, 2019
@alexgibson alexgibson added the Needs Review Awaiting code review label Oct 10, 2019
alexgibson added a commit to alexgibson/bedrock that referenced this issue Oct 11, 2019
alexgibson added a commit to alexgibson/bedrock that referenced this issue Oct 14, 2019
alexgibson added a commit to alexgibson/bedrock that referenced this issue Oct 14, 2019
alexgibson added a commit to alexgibson/bedrock that referenced this issue Oct 15, 2019
alexgibson added a commit to alexgibson/bedrock that referenced this issue Oct 17, 2019
alexgibson added a commit to alexgibson/bedrock that referenced this issue Oct 18, 2019
alexgibson added a commit to alexgibson/bedrock that referenced this issue Oct 21, 2019
alexgibson added a commit to alexgibson/bedrock that referenced this issue Oct 22, 2019
alexgibson added a commit to alexgibson/bedrock that referenced this issue Oct 23, 2019
alexgibson added a commit to alexgibson/bedrock that referenced this issue Oct 28, 2019
alexgibson added a commit to alexgibson/bedrock that referenced this issue Oct 30, 2019
alexgibson added a commit to alexgibson/bedrock that referenced this issue Oct 31, 2019
alexgibson added a commit to alexgibson/bedrock that referenced this issue Nov 4, 2019
alexgibson added a commit to alexgibson/bedrock that referenced this issue Nov 5, 2019
alexgibson added a commit to alexgibson/bedrock that referenced this issue Nov 5, 2019
@stephaniehobson stephaniehobson removed the Needs Review Awaiting code review label Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Third level priority - Nice to have Papercuts 💸 Tech debt payoff
Projects
None yet
Development

No branches or pull requests

3 participants