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

Use position sticky instead of JavaScript #886

Closed
NickColley opened this issue Jan 26, 2017 · 2 comments
Closed

Use position sticky instead of JavaScript #886

NickColley opened this issue Jan 26, 2017 · 2 comments

Comments

@NickColley
Copy link
Contributor

https://github.com/alphagov/static/blob/9e8795b262c948a65b798029864cbe04f193262a/app/assets/javascripts/modules/sticky-element-container.js

Current browser usage is too low since Chrome has only just shipped it (http://caniuse.com/#feat=css-sticky), however once people switch over it might be enough users to consider this an enhancement we shouldnt polyfill and only use as an enhancement.

@dsingleton
Copy link
Contributor

Copying my comments from slack.

My answer would be: it depends. What issues we have with the current implementation (perf, complexity, too much js?), how many folks would be be affected by the change? (html pubs tend to have a different UA distribution that mainstream content)

Also I'd suggest i’d look at analytics and see how widely used the feature is - that would likely help decide, but might require adding some analytics instrumentation

From memory we debated that at the time - could we just remove the feature, was it being used? In the interest of keeping migration moving we added something with parity and deferred the decision.

So I think the better question is, is this useful, if not, can we remove it? Or, if it’s not widely used, then a progressive approach that doesn’t cover all users is easier to make the case for.

@tijmenb
Copy link
Contributor

tijmenb commented Nov 1, 2018

Cleaning up issues - closing this because of inactivity. I'm assuming this will surface again if we're looking at sticky navs.

@tijmenb tijmenb closed this as completed Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants