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

feat(convention): rewrite runtime-html decorators #1960

Merged
merged 14 commits into from
May 6, 2024

Conversation

Sayan751
Copy link
Member

@Sayan751 Sayan751 commented May 4, 2024

Pull Request

πŸ“– Description

As the wide support for TC39 decorators are still lacking, this PR refactors the convention-plugin to rewrite the following decorators:

  • bindable
  • containerless
  • useShadowDOM
  • capture
  • alias
  • inject

Discord thread: https://discord.com/channels/448698263508615178/1230047298084409464

🎫 Issues

πŸ‘©β€πŸ’» Reviewer Notes

πŸ“‘ Test Plan

⏭ Next Steps

Copy link

codecov bot commented May 4, 2024

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 88.62%. Comparing base (0acd512) to head (9a42a3b).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1960      +/-   ##
==========================================
- Coverage   88.62%   88.62%   -0.01%     
==========================================
  Files         272      272              
  Lines       22825    22823       -2     
  Branches     5292     5292              
==========================================
- Hits        20229    20226       -3     
- Misses       2596     2597       +1     

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@Sayan751 Sayan751 changed the title wip(convention): rewrite runtime-html decorators feat(convention): rewrite runtime-html decorators May 5, 2024
@Sayan751 Sayan751 marked this pull request as ready for review May 5, 2024 07:55
@Sayan751 Sayan751 requested review from bigopon and 3cp May 5, 2024 07:55
@Sayan751
Copy link
Member Author

Sayan751 commented May 5, 2024

@CollinHerber Do these changes cover most of your use-cases?

@CollinHerber
Copy link
Contributor

@CollinHerber Do these changes cover most of your use-cases?

Yeah only one I think might be missing is @Inject

@3cp
Copy link
Member

3cp commented May 5, 2024

Question, are we going to switch to #1939 in future for conventions code rewrite? Not sure whether it covers all the use cases.

@CollinHerber
Copy link
Contributor

@CollinHerber Do these changes cover most of your use-cases?

And @CustomElement

@Sayan751
Copy link
Member Author

Sayan751 commented May 5, 2024

Question, are we going to switch to #1939 in future for conventions code rewrite? Not sure whether it covers all the use cases.

That's a good idea @3cp. However, it should be trivial to remove code later.

@Sayan751
Copy link
Member Author

Sayan751 commented May 5, 2024

@CollinHerber The resource decorators such as custom element, attribute etc. are already taken care of. I'll try to do something for the @inject.

Copy link
Member

@bigopon bigopon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @Sayan751 , looks good to me though I'd prefer to have @3cp approve this 😺

@bigopon bigopon merged commit eaf2cd7 into master May 6, 2024
26 of 27 checks passed
@bigopon bigopon deleted the topic/consolidate-decorators-plugin-convention branch May 6, 2024 00:09
@bigopon
Copy link
Member

bigopon commented May 6, 2024

@CollinHerber you can test it out with the latest dev version, thanks everyone, nice work πŸ‘

AureliaEffect pushed a commit that referenced this pull request May 11, 2024
2.0.0-beta.17 (2024-05-11)

**BREAKING CHANGES:**

* **template:** auto infer binding expression when empty (#1963) ([3359939](3359939))

    Previously only the expression of binding to element bindables get auto inferred, now it's expanded to all bindings
    with `.bind`/`.to-view`/`.from-view`/`.two-way`/`.one-time`
    Examples:
    ```html
    <div some-prop.bind=""> means <div some-prop.bind="someProp">
    <div some-prop.bind> means <div some-prop.bind="someProp">
    <div some-prop.one-time> means <div some-prop.one-time="someProp">
    ...
    ```
* **convention:** rewrite runtime-html decorators (#1960) ([eaf2cd7](eaf2cd7))

    With tooling in the instable state for the tc39 decorator support, we will generate standard fn call code instead of decorator.
    This will likely be changed when browsers start officially supporting it, or at least when the tooling (both spec & tooling stability + compat) gets better

**Features:**

* **template:** support spread syntax with `spread` command and ... (#1965) ([ccae63b](ccae63b))
* **repeat:** allow custom repeatable value (#1962) ([c47df91](c47df91))

**Bug Fixes:**

* **compiler:** fix order when spreading custom attribute into element bindable ([ccae63b](ccae63b))
* **au-slot:** separate parent scope selection from host scope selection (#1961) ([ff605fb](ff605fb))

**Refactorings:**

* **kernel:** mark side effect free (#1964) ([22c8f71](22c8f71))
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.

None yet

4 participants