Skip to content
This repository was archived by the owner on Mar 10, 2023. It is now read-only.
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

Closed

Description

@yoavweiss

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.

WDYT?

cc @addyosmani @KenjiBaheux @jakearchibald

Activity

  1. yoavweiss commented on Sep 20, 2017

    @yoavweiss
    ContributorAuthor

    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.

  2. yoavweiss commented on Sep 20, 2017

    @yoavweiss
    ContributorAuthor

    Alternatively to the prefix approach, I could also go with a group attribute (critical, fonts, functional, visual, late) and a position attribute (before, after)

  3. jakearchibald commented on Sep 21, 2017

    @jakearchibald

    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.

  4. addyosmani commented on Sep 30, 2017

    @addyosmani
    Collaborator

    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.

  5. addyosmani commented on Feb 28, 2018

    @addyosmani
    Collaborator

    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.

  6. addyosmani commented on Mar 20, 2018

    @addyosmani
    Collaborator

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions