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

Final “2.x” interface. #215

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

Final “2.x” interface. #215

wants to merge 2 commits into from

Conversation

theengineear
Copy link
Collaborator

@theengineear theengineear commented Nov 19, 2024

This mainly deletes things we deprecated in “1.x” which enables a smooth transition from “1.x” >> “2.x”.

TODO:

  • Discuss the removal of warnings when binding map in the wrong place. We already didn’t warn for like <input foo="${[1,2,3]}"> so it feels ok to not warn about <input foo="${map(/* … */)}">. There were more foot-guns before… it’s much more straightforward now though.

@theengineear
Copy link
Collaborator Author

@klebba — You asked about a PR to show what the interface will look like. Here one is! This is just throwaway work since it’s pointing to a different PR, but I’ll keep recreating every time I make changes so that you can stay updated here.

@theengineear
Copy link
Collaborator Author

The git diff shown in the test-template-engine.js file is not great… it’s really a straight deletion… bummer that it shows up like that 🤷

Changes:
* Deprecate `unsafeHTML` and `usafeSVG`.
* Allow binding `DocumentFragment` as a value.
* Tag every line in the “CHANGELOG.md” with an issue ticket.
* Simplified formatting related to bindings in “TEMPLATES.md”.
* Emit deprecation warnings for soon-to-be-gone interfaces.
This mainly deletes things we deprecated in “1.x” which enables a smooth
transition from “1.x” >> “2.x”.
@klebba
Copy link
Collaborator

klebba commented Dec 2, 2024

x-template contents are always valid HTML and this is important so that HTML linters can be used to evaluate them

^ can we incorporate this somewhere? my thought is that the x-template would be a mime type text/html

@theengineear theengineear force-pushed the ready-2x-interface branch 2 times, most recently from 9460060 to 19367eb Compare December 5, 2024 02:45
Base automatically changed from ready-2x-interface to main December 5, 2024 03:36
@theengineear theengineear marked this pull request as draft December 17, 2024 01:42
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

Successfully merging this pull request may close these issues.

2 participants