You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 10, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 10, 2023. It is now read-only.
Converge to a single group attribute, with values indicating before and after #6
I started playing around with an implementation, and having 3 different attributes raises the question of "what happens if multiple attributes with conflicting values are defined?"
It's also cumbersome to implement and feels kinda clunky...
What if we changes that so that the group attribute would be of a "prefix_group" format, e.g. before_critical, in_visual, after_functional?
It would certainly make the implementation cleaner, and I think usage would be simpler as well: one attribute to feature detect, etc.
If we follow that pattern we would need to accommodate the fact that e.g. after_critical and before_fonts map to the same internal value and allow both.
Alternatively to the prefix approach, I could also go with a group attribute (critical, fonts, functional, visual, late) and a position attribute (before, after)
I'm strongly in favor of a single group attribute. If theres little difference in the before/after for each group value that feels like it would cause unnecessary confusion with minimal benefit.
After discussing a few options for approaches at TPAC, the consensus was that there would be more interest in forging ahead here if we opted for a simpler approach, perhaps using a single attribute that indicated whether a request was low, high or default priority.
We're going to go ahead and explore how far we can get with this simpler approach.
Closing as we (@yoavweiss, @domfarolino, Kenji and I) appear to have converged on a single attribute approach for the initial MVP for priority hints. I'd like to evaluate once we have an implementation ready (WIP) that this offers enough value that we can punt on the notion of groups.
Activity
yoavweiss commentedon Sep 20, 2017
If we follow that pattern we would need to accommodate the fact that e.g.
after_criticalandbefore_fontsmap to the same internal value and allow both.yoavweiss commentedon Sep 20, 2017
Alternatively to the prefix approach, I could also go with a
groupattribute (critical,fonts,functional,visual,late) and apositionattribute (before,after)jakearchibald commentedon Sep 21, 2017
Yeah, single attribute makes sense. We don't need 'before'/'after' if they simply map to one of the other values.
"before script" is useful, because it works even if browsers change the priority of scripts.
Having "after critical", "fonts", "before visual" all map to the same value doesn't seem useful.
addyosmani commentedon Sep 30, 2017
I'm strongly in favor of a single
groupattribute. If theres little difference in the before/after for each group value that feels like it would cause unnecessary confusion with minimal benefit.addyosmani commentedon Feb 28, 2018
After discussing a few options for approaches at TPAC, the consensus was that there would be more interest in forging ahead here if we opted for a simpler approach, perhaps using a single attribute that indicated whether a request was low, high or default priority.
We're going to go ahead and explore how far we can get with this simpler approach.
addyosmani commentedon Mar 20, 2018
Closing as we (@yoavweiss, @domfarolino, Kenji and I) appear to have converged on a single attribute approach for the initial MVP for priority hints. I'd like to evaluate once we have an implementation ready (WIP) that this offers enough value that we can punt on the notion of groups.