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(repeat): allow custom repeatable value #1962

Merged
merged 8 commits into from
May 6, 2024
Merged

Conversation

bigopon
Copy link
Member

@bigopon bigopon commented May 6, 2024

📖 Description

Currently the repeater only knows a fixed set of repeatable value, as we wanted to start simple. Though this is a missing capability from v1, where applications can register custom collection strategies to iterate and create views. In v2, we want to centralize view related work in the repeater, so exposing the ability to have a collection strategy to mostly iterate.

🎫 Issues

close #1703
close #851

cc @fkleuver @Sayan751

Copy link

codecov bot commented May 6, 2024

Codecov Report

Attention: Patch coverage is 88.73239% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 88.54%. Comparing base (eaf2cd7) to head (8320a96).
Report is 1 commits behind head on master.

Files Patch % Lines
...-html/src/resources/template-controllers/repeat.ts 88.40% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1962      +/-   ##
==========================================
- Coverage   88.62%   88.54%   -0.08%     
==========================================
  Files         272      272              
  Lines       22823    22813      -10     
  Branches     5292     5280      -12     
==========================================
- Hits        20226    20199      -27     
- Misses       2597     2614      +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bigopon
Copy link
Member Author

bigopon commented May 6, 2024

@bigopon bigopon merged commit c47df91 into master May 6, 2024
28 of 29 checks passed
@bigopon bigopon deleted the repeater-iterables branch May 6, 2024 12:29
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
3 participants