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

Fix various issues with slots #933

Merged
merged 44 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
db58dea
WIP: initial set up and test
MoustaphaDev Jan 2, 2024
34e812e
WIP: check point
MoustaphaDev Jan 2, 2024
d0dfdbb
don't print render for whitespace-only text nodes
MoustaphaDev Jan 2, 2024
899a3e4
oops
MoustaphaDev Jan 2, 2024
f92ac85
update whitespace in tests
MoustaphaDev Jan 2, 2024
5ac8f8a
update whitespace in tests
MoustaphaDev Jan 2, 2024
6e89cfb
chore: changeset
MoustaphaDev Jan 2, 2024
aa392c2
add missed updated test
MoustaphaDev Jan 2, 2024
48266e3
fix edge case
MoustaphaDev Jan 3, 2024
0ba4c9b
chore: more descriptive comments
MoustaphaDev Jan 3, 2024
eb1d7bc
chore: reformulate comments for clarity
MoustaphaDev Jan 3, 2024
c75df6f
revert to initial code with more descriptive vars
MoustaphaDev Jan 3, 2024
6d534c0
refactor
MoustaphaDev Jan 3, 2024
6d9aee1
parens around custom element slots for consistency
MoustaphaDev Jan 3, 2024
f46a4cb
update tests
MoustaphaDev Jan 3, 2024
5de4f3a
handle template strings
MoustaphaDev Jan 3, 2024
3392062
ignore slots w dynamic names without parent expr
MoustaphaDev Jan 3, 2024
f30d73a
update test
MoustaphaDev Jan 3, 2024
4e2e906
Merge branch 'main' into feat/dynamic-slot-names
MoustaphaDev Jan 3, 2024
3a8f468
Merge branch 'fix/printer-space-regression' into feat/dynamic-slot-names
MoustaphaDev Jan 3, 2024
d480139
fix test
MoustaphaDev Jan 3, 2024
f283130
check point
MoustaphaDev Jan 4, 2024
9cec13b
Merge branch 'main' of https://github.com/withastro/compiler into fea…
MoustaphaDev Jan 4, 2024
f73271d
Merge branch 'main' of https://github.com/withastro/compiler into fea…
MoustaphaDev Jan 5, 2024
1974afa
update tests
MoustaphaDev Jan 6, 2024
99a1564
WIP: handle default slots and text nodes better
MoustaphaDev Jan 6, 2024
17a2b27
refactor: break things down into functions
MoustaphaDev Jan 8, 2024
f2a1c90
test: add tests and rename current ones
MoustaphaDev Jan 8, 2024
770f549
chore: changeset
MoustaphaDev Jan 8, 2024
906dcf9
save a poor man's RAM
MoustaphaDev Jan 9, 2024
d85b5a3
remove unnecessary use of pointers
MoustaphaDev Jan 9, 2024
f4047e8
`processNestedSlotEntries` -> `generateEndSlotIndexes`
MoustaphaDev Jan 9, 2024
0ca53b8
make the linter happy
MoustaphaDev Jan 9, 2024
bb95980
fix https://github.com/withastro/astro/issues/8687
MoustaphaDev Jan 10, 2024
184fe60
use a special `renderSlotTemplate` func for slots
MoustaphaDev Jan 10, 2024
f549711
test: update test
MoustaphaDev Jan 10, 2024
c4d2a1d
test: add more complex nested slot expr test
MoustaphaDev Jan 11, 2024
c30b24f
better positioning of comma between slot groups
MoustaphaDev Jan 11, 2024
0810a11
revert `renderSlotTemplate` function
MoustaphaDev Jan 11, 2024
730aeb8
chore: more detailed changeset
MoustaphaDev Jan 12, 2024
5a511a1
Merge branch 'main' of https://github.com/withastro/compiler into fea…
MoustaphaDev Jan 12, 2024
1b70b99
Merge branch 'main' into feat/dynamic-slot-names
natemoo-re Jan 16, 2024
02ee67c
Merge branch 'main' into feat/dynamic-slot-names
natemoo-re Jan 16, 2024
97ce7ae
chore: update test
natemoo-re Jan 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/green-camels-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@astrojs/compiler': minor
---

- Adds support for dynamic slots inside loops
- Fixes an issue where successive named slotted elements would cause a runtime error
- Fixes an issue in which if there was an implicit default slotted element next to named one, the former would get swallowed by the later.
Loading
Loading