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

[WIP] deprecate view registry #17804

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

[WIP] deprecate view registry #17804

wants to merge 2 commits into from

Commits on Mar 29, 2019

  1. [CLEANUP] Remove ViewRegistry

    The framework does not need it anymore.
    
    In most cases, `Ember.ViewUtils.getElementView` can be used as a
    replacement to get the classic component (`Ember.Component`) that
    corresponds to a DOM element (if any).
    chancancode committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    90e8079 View commit details
    Browse the repository at this point in the history
  2. [BUGFIX canary] Ensure elementId matches reality

    Since the `id` attribute can be passed through splattributes, we cannot
    assume the generated `elementId` will be used. Instead of eagerly generating
    an `elementId` (if not set in `init`), we make it as lazy as possible and
    read from DOM after flushing the attributes. This ensures the value reflects
    what was eventually set. If, however, an `elementId` is explicitly set during
    `init`, we want to ensure they match up when `elementId` is accessed again.
    
    Note that with this commit, the framework no longer rely on `elementId` for
    any purpose. We may want to deprecate _reading_ from `elementId`, making it
    a "write-only" API that only serve to customize the wrapper element.
    chancancode committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    172849e View commit details
    Browse the repository at this point in the history