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

Refine API and refactor #132

Merged
merged 66 commits into from
Aug 24, 2018
Merged

Refine API and refactor #132

merged 66 commits into from
Aug 24, 2018

Commits on Jul 20, 2018

  1. Refactor API (wip)

    Steven Orvell committed Jul 20, 2018
    Configuration menu
    Copy the full SHA
    94d4e48 View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2018

  1. remove microtask lib in favor of Promise.

    Steven Orvell committed Jul 25, 2018
    Configuration menu
    Copy the full SHA
    f8f8862 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2018

  1. API changes

    * Property options have been updated to now include: `attribute`: set to explicitly false to not observe, to a string to customize name, or true or absent to observe lowercased name;   `type`: if a function, used to deserialize attribute value, otherwise can be an object with {fromAttribute: deserializing function, toAttribute: serializing function}; `reflect`: if true, property reflects to attribute using type.toAttribute if present; `shouldInvalidate`: function used to determine if a change should trigger invalidation.
    
    * setting properties in update now does not trigger invalidation and does not issue a warning. This can and should be done to compute values before updating.
    
    * finishUpdate has been added to perform post update tasks like direct dom manipulation. It is an async function which will be awaited before resolving the updateComplete promise. Setting properties in finishUpdate will trigger invalidation and this will finish before the updateComplete promise is resolved.
    * no longer depends on polymer.
    Steven Orvell committed Aug 3, 2018
    Configuration menu
    Copy the full SHA
    df3c39d View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2018

  1. Update tests and Readme

    Steven Orvell committed Aug 4, 2018
    Configuration menu
    Copy the full SHA
    dc5d931 View commit details
    Browse the repository at this point in the history
  2. Tweaks based on review.

    Steven Orvell committed Aug 4, 2018
    Configuration menu
    Copy the full SHA
    5861e0e View commit details
    Browse the repository at this point in the history
  3. More review tweaks.

    Steven Orvell committed Aug 4, 2018
    Configuration menu
    Copy the full SHA
    8f83306 View commit details
    Browse the repository at this point in the history
  4. Lint fixes.

    Steven Orvell committed Aug 4, 2018
    Configuration menu
    Copy the full SHA
    e18819e View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2018

  1. Configuration menu
    Copy the full SHA
    da54543 View commit details
    Browse the repository at this point in the history
  2. Changes based on review

    * mark update/finishUpdate as abstract
    * remove stack of promises in `invalidate`
    Steven Orvell committed Aug 5, 2018
    Configuration menu
    Copy the full SHA
    b39b480 View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2018

  1. Documentation updates and type tweaks based on review.

    Steven Orvell committed Aug 7, 2018
    Configuration menu
    Copy the full SHA
    5ef504e View commit details
    Browse the repository at this point in the history
  2. Allow symbols as properties

    Also test subclass/superclass do not improperly interact.
    Steven Orvell committed Aug 7, 2018
    Configuration menu
    Copy the full SHA
    10fdf29 View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2018

  1. Fix property to attributes serialization

    Uses `update` to update attributes and simplifies tracking.
    Steven Orvell committed Aug 8, 2018
    Configuration menu
    Copy the full SHA
    f131d96 View commit details
    Browse the repository at this point in the history
  2. Doc improvements based on review.

    Steven Orvell committed Aug 8, 2018
    Configuration menu
    Copy the full SHA
    3b5611c View commit details
    Browse the repository at this point in the history
  3. Export PropertyValues type and fixup usage in tests

    Steven Orvell committed Aug 8, 2018
    Configuration menu
    Copy the full SHA
    82be06b View commit details
    Browse the repository at this point in the history
  4. Fixes for IE11

    Steven Orvell committed Aug 8, 2018
    Configuration menu
    Copy the full SHA
    3637c1e View commit details
    Browse the repository at this point in the history
  5. Adds firstUpdated

    * Convenience method for performing tasks after the element was first updated.
    * Also makes presence of ShadyCSS optional.
    Steven Orvell committed Aug 8, 2018
    Configuration menu
    Copy the full SHA
    bbd3267 View commit details
    Browse the repository at this point in the history
  6. Doc tweak based on review.

    Steven Orvell committed Aug 8, 2018
    Configuration menu
    Copy the full SHA
    3f0315c View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2018

  1. Configuration menu
    Copy the full SHA
    85f4cf2 View commit details
    Browse the repository at this point in the history
  2. Updates based on review.

    Steven Orvell committed Aug 13, 2018
    Configuration menu
    Copy the full SHA
    a8d888d View commit details
    Browse the repository at this point in the history
  3. Import from core.

    Steven Orvell committed Aug 13, 2018
    Configuration menu
    Copy the full SHA
    e97392e View commit details
    Browse the repository at this point in the history
  4. Updates based on review.

    Steven Orvell committed Aug 13, 2018
    Configuration menu
    Copy the full SHA
    00d9d5c View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2018

  1. Ensure properties set in update reflect properly

    Steven Orvell committed Aug 14, 2018
    Configuration menu
    Copy the full SHA
    f2f908d View commit details
    Browse the repository at this point in the history
  2. Add notes about limited Symbol support and skipped test with linked i…

    …ssue.
    Steven Orvell committed Aug 14, 2018
    Configuration menu
    Copy the full SHA
    8160de8 View commit details
    Browse the repository at this point in the history
  3. Removed getProperty/setProperty

    This was deemed unnecessary meta-programming. For manual accessor creation, users can manage the value manually and call `invalidate` as an alternative to `set/getProperty`.
    Steven Orvell committed Aug 14, 2018
    Configuration menu
    Copy the full SHA
    e4c7d91 View commit details
    Browse the repository at this point in the history
  4. Remove unused _propertyValues

    Steven Orvell committed Aug 14, 2018
    Configuration menu
    Copy the full SHA
    e6a3c70 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2018

  1. Support properties defined as symbols

    Fixes #146
    
    Changes the `changedProperties` argument to `shouldUpdate`, `update`, and  `finishUpdate` to a Map.
    Steven Orvell committed Aug 15, 2018
    Configuration menu
    Copy the full SHA
    b39b979 View commit details
    Browse the repository at this point in the history
  2. Save flags on element by using bitmask

    Removes `_isReflectingProperty` and `_firstUpdateFinished` flags.
    Steven Orvell committed Aug 15, 2018
    Configuration menu
    Copy the full SHA
    fed3307 View commit details
    Browse the repository at this point in the history
  3. Update package.json

    Steven Orvell committed Aug 15, 2018
    Configuration menu
    Copy the full SHA
    5f3cffd View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2018

  1. Fix IE11 Map support

    Avoids using Map constructor argument which is not supported on IE11.
    Steven Orvell committed Aug 22, 2018
    Configuration menu
    Copy the full SHA
    05ba1e4 View commit details
    Browse the repository at this point in the history
  2. Update wct package.

    Steven Orvell committed Aug 22, 2018
    Configuration menu
    Copy the full SHA
    4361daf View commit details
    Browse the repository at this point in the history
  3. Refine properties handling and add optimizations

    * `createProperty` now takes a PropertyDeclaration and passes this on rather than having to look it up (optimization). Note, this means we now create properties for superClass properties. Also introduces a map used to store reflecting properties (optimization).
    * correct `shouldInvalidate` property option so that it changes the property value but does not cause invalidation.
    * renames `identity` to `notEqual` to reflect what it does.
    Steven Orvell committed Aug 22, 2018
    Configuration menu
    Copy the full SHA
    baaf296 View commit details
    Browse the repository at this point in the history
  4. Fix exports

    Steven Orvell committed Aug 22, 2018
    Configuration menu
    Copy the full SHA
    f2865de View commit details
    Browse the repository at this point in the history
  5. Update tests for shouldInvalidate fix

    Steven Orvell committed Aug 22, 2018
    Configuration menu
    Copy the full SHA
    d4edcd8 View commit details
    Browse the repository at this point in the history
  6. Remove BooleanAttribute and special case type: Boolean

    Change made based on feedback that it seemed weird not to be able to just use `Boolean` as `type` and have the value serialize/deserialize as expected.
    Steven Orvell committed Aug 22, 2018
    2 Configuration menu
    Copy the full SHA
    9f1a709 View commit details
    Browse the repository at this point in the history
  7. Adds invalidateProperty(name, oldValue)

    This method should be called in manually created property setters to trigger an invalidation and honor any configured property options for the given property.
    Steven Orvell committed Aug 22, 2018
    2 Configuration menu
    Copy the full SHA
    25f4ca6 View commit details
    Browse the repository at this point in the history
  8. Simplify update cycle based on feedback

    * invalidate always completes in a microtask and should not be pushed out.
    * properties set in `finishUpdate`are set after the next `updateComplete` resolves
    * adds tests for customizing the timing of `updateComplete`
    Steven Orvell committed Aug 22, 2018
    1 Configuration menu
    Copy the full SHA
    9f8e145 View commit details
    Browse the repository at this point in the history
  9. Documentation fixes based on feedback.

    Steven Orvell committed Aug 22, 2018
    Configuration menu
    Copy the full SHA
    59cd15e View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2018

  1. Configuration menu
    Copy the full SHA
    bf6da1d View commit details
    Browse the repository at this point in the history
  2. Fix tests to test updateComplete return value.

    Steven Orvell committed Aug 23, 2018
    Configuration menu
    Copy the full SHA
    f684c63 View commit details
    Browse the repository at this point in the history
  3. Fix typo.

    Steven Orvell committed Aug 23, 2018
    Configuration menu
    Copy the full SHA
    1953a79 View commit details
    Browse the repository at this point in the history
  4. Avoid use of Map.keys for IE compat.

    Steven Orvell committed Aug 23, 2018
    Configuration menu
    Copy the full SHA
    f3f28b8 View commit details
    Browse the repository at this point in the history
  5. 1 Configuration menu
    Copy the full SHA
    234dff0 View commit details
    Browse the repository at this point in the history
  6. Removes finishFirstUpdate and finishUpdate

    Steven Orvell committed Aug 23, 2018
    Configuration menu
    Copy the full SHA
    24ac381 View commit details
    Browse the repository at this point in the history
  7. Add tests for @property directive.

    Steven Orvell committed Aug 23, 2018
    Configuration menu
    Copy the full SHA
    13e48e6 View commit details
    Browse the repository at this point in the history
  8. Add utility for checking size.

    Steven Orvell committed Aug 23, 2018
    Configuration menu
    Copy the full SHA
    d708572 View commit details
    Browse the repository at this point in the history
  9. Documentation fixes based on feedback.

    Steven Orvell committed Aug 23, 2018
    Configuration menu
    Copy the full SHA
    9a9aced View commit details
    Browse the repository at this point in the history
  10. Fix lint errors.

    Steven Orvell committed Aug 23, 2018
    Configuration menu
    Copy the full SHA
    4bab118 View commit details
    Browse the repository at this point in the history
  11. Update gitignore and add rollup.config.js

    Steven Orvell committed Aug 23, 2018
    Configuration menu
    Copy the full SHA
    88a1ad9 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    10edcc6 View commit details
    Browse the repository at this point in the history
  13. IE11 test fixes and slight change to styleString

    Steven Orvell committed Aug 23, 2018
    Configuration menu
    Copy the full SHA
    a447927 View commit details
    Browse the repository at this point in the history
  14. Updates based on review.

    Steven Orvell committed Aug 23, 2018
    Configuration menu
    Copy the full SHA
    ec02fd8 View commit details
    Browse the repository at this point in the history
  15. Minor doc fixes

    Steven Orvell committed Aug 23, 2018
    Configuration menu
    Copy the full SHA
    b77ee89 View commit details
    Browse the repository at this point in the history
  16. invalidate waits for the previous update to complete before advanci…

    …ng. Fixes tests on Edge / IE.
    Steven Orvell committed Aug 23, 2018
    Configuration menu
    Copy the full SHA
    b0c7428 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2018

  1. Make render abstract

    This helps typescript users get a nice warning if they forget to implment `render`.
    Steven Orvell committed Aug 24, 2018
    Configuration menu
    Copy the full SHA
    9341ae2 View commit details
    Browse the repository at this point in the history
  2. Rename flag based on review

    Steven Orvell committed Aug 24, 2018
    Configuration menu
    Copy the full SHA
    d3a781b View commit details
    Browse the repository at this point in the history
  3. Renaming based on feedback

    Steven Orvell committed Aug 24, 2018
    Configuration menu
    Copy the full SHA
    af1c542 View commit details
    Browse the repository at this point in the history
  4. Remove unnecessary check

    Steven Orvell committed Aug 24, 2018
    Configuration menu
    Copy the full SHA
    e9d400e View commit details
    Browse the repository at this point in the history
  5. Bump version

    Steven Orvell committed Aug 24, 2018
    Configuration menu
    Copy the full SHA
    bb6d73d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    55bc308 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b611732 View commit details
    Browse the repository at this point in the history
  8. Fix tests on Safari 10

    Fairly arcane, but looks like immediately invoking async function assigned to a getter that uses `super` loses `this` context on Safari 10 so working around by using Promises directly instead.
    Steven Orvell committed Aug 24, 2018
    Configuration menu
    Copy the full SHA
    d11ba45 View commit details
    Browse the repository at this point in the history
  9. Merge branch 'refactor' of https://github.com/PolymerLabs/polymer-lit

    …into refactor
    Steven Orvell committed Aug 24, 2018
    Configuration menu
    Copy the full SHA
    a85f4bb View commit details
    Browse the repository at this point in the history
  10. Fix tests on Safari 9

    Add workaround for Promise timing bugs. Promise microtasks are not guaranteed to go before tasks.
    Steven Orvell committed Aug 24, 2018
    Configuration menu
    Copy the full SHA
    c312464 View commit details
    Browse the repository at this point in the history
  11. Now fix tests on Edge 17

    Steven Orvell committed Aug 24, 2018
    Configuration menu
    Copy the full SHA
    84180cd View commit details
    Browse the repository at this point in the history
  12. Update Safari 11 version to test

    Steven Orvell committed Aug 24, 2018
    Configuration menu
    Copy the full SHA
    49cc74c View commit details
    Browse the repository at this point in the history
  13. Avoid Firefox timeout issue on Travis by testing on Sauce

    Same issue as Polymer/polymer#5336.
    Steven Orvell committed Aug 24, 2018
    Configuration menu
    Copy the full SHA
    ffbfead View commit details
    Browse the repository at this point in the history