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

Deprecation notes #62

Open
michaelpb opened this issue Apr 15, 2024 · 1 comment
Open

Deprecation notes #62

michaelpb opened this issue Apr 15, 2024 · 1 comment

Comments

@michaelpb
Copy link
Contributor

michaelpb commented Apr 15, 2024

I need to begin deprecating the following core features (remove in 0.0.74):

Highly likely

  • vanish-into-document (remove and recommend use of Include)
  • AssetManager class

Somewhat likely

  • Change default directive syntax to not use any potentially invalid characters / get implemented as a template substitution (This destroys interop with many libraries that manually copy DOM and use setAttribute) (also they can be searched for in QSA)
  • Component.dataProp -- not sure, but this might be a good simplification (events will not need the colon any more). The loader will still do it, since that is actually useful, and maybe props (so you can do it on Sub elements) but not Component
  • Artifact DOM bundling (remove, add a recipe to show how to do it with a BundlingArtifact subclass. Include will keep track going forward. This removes the need of modulo-asset as well. Include can just have a build callback.)
@michaelpb
Copy link
Contributor Author

New directive behavior and syntax description:

<div
    -state.bind
    -state.bind-click
    --click
></div>

Rules:

  1. Must start with - (just like preprocessor directives) (possibly x- for better compat)
  2. ValueSetter logic (: and .) is always applied (also just like preprocessor directives)
  3. If no directive name is specified (e.g. --click), then it ends up using the default (component.event e.g. so the full becomes component.eventUnmount etc)
  4. The rest of the logic is the same, except the value always comes pre-computed

Note: Almost one-for-one with the old syntax of [...], with one exception: The value is always resolved in the new system. This means [state.bind]="keydown" will need to change to -state.bind-keydown instead, and [state.bind]statename will need to change to -state.bind--statename (e.g. an "empty" event name).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant