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

Tweak some samples for clarity and better behavior in playgrounds #148

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Commits on Jan 23, 2023

  1. Fix existing lint warnings

    tigt committed Jan 23, 2023
    Configuration menu
    Copy the full SHA
    fa7caf0 View commit details
    Browse the repository at this point in the history
  2. Use mixed checkbox instead of .focus() for DOM refs

    When opening the existing `elementRef.focus()` examples in their frameworks’ playgrounds,
    the call to `.focus()` would be ignored because of `<iframe>` reasons or something. This
    change no longer seems like it’s broken when attempting to view it, and as a bonus it
    gets rid of the ambiguity between which frameworks used `type="text"` and which omitted
    it (Was it because the framework needs explicit attributes with default values, or
    because some example authors preferred to leave it off?)
    tigt committed Jan 23, 2023
    Configuration menu
    Copy the full SHA
    3bae07b View commit details
    Browse the repository at this point in the history
  3. Simplify traffic light logic

    The `lightIndex` selection logic can be simplified, which seems like a net win for the
    goal of this site; less attention on the non-framework-specific parts means more
    attention on the differences between components.
    tigt committed Jan 23, 2023
    Configuration menu
    Copy the full SHA
    88021ae View commit details
    Browse the repository at this point in the history
  4. Use viewport dimensions instead of document title, for playgrounds

    Since most framework playgrounds output into an `<iframe>`, their
    `document.title` properties end up being the empty string unless
    set by the component code. This made the samples look broken when
    loaded into playgrounds, so instead this uses runtime properties
    that every `<iframe>` can’t help but have.
    tigt committed Jan 23, 2023
    Configuration menu
    Copy the full SHA
    6c3246e View commit details
    Browse the repository at this point in the history