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

chore: merge main into v2 #6816

Merged
merged 414 commits into from
Aug 29, 2024
Merged

chore: merge main into v2 #6816

merged 414 commits into from
Aug 29, 2024

Conversation

wmertens
Copy link
Member

@wmertens wmertens commented Aug 22, 2024

This is a very heavy lift. The Rust optimizer changes are extra-verified by me, and you can see by the snapshots that they're ok.
The rest of the changes need the tests to verify that they're ok.

wmertens and others added 30 commits June 14, 2024 09:51
this fixes imports-of-imports and is also much nicer for debugging
this also protects it against dangling symlinks
* fix: fix a ts issue

* fix: fix a ts issue

* fix: fix a ts issue

* fix: fix a ts issue

---------

Co-authored-by: wuls <linsheng.wu@beantechs.com>
* add possibility to define multiple outputs in vite

* more explicit assertions in tests

* simplify code

* small improvement to make sure at least one output is present in every case

* change variable name so the history is easier to follow

* fix(vite.unit.ts): grab plugin

---------

Co-authored-by: PatrickJS <github@gdi2290.com>
I changed the references to install directly from github to the right repository

Co-authored-by: Tobias Zimmermann <ich@tzdesign.de>
comment out footer sponsors on homepage
* refactor: remove references to `currentScript`

`currentScript` is not available in shadow dom. For this reason we
can't use it. This change removes all references to `currentScript`

The biggest change is that the `qFuncs` are no longer written to the
container element but rather to the document. Because there is only
one document the `qFuncs` property now includes the `container`
`q:manifest-hash` to distinguish between different containers.

* fixup! refactor: remove references to `currentScript`
- click to file works again
- don't duplicate code DOM elements
- in mobile, put file paths at the top

And most notably:
- store now deeply updates so that code changes update the output
- refactored manifest generation
- dev server collects QRL parents during ssr build
- optimizer also stores dev info for noop QRLs
- dev server also uses dev info as an extra fallback
- dev source URLs are kept similar looking to the source tree
- QRLs are annotated with parent so they can be built on demand
Shadow DOM can be used to isolate an application. The isolation also
includes:
- Events don't bubble across shadow boundaries.
- QuerySelector doesn't cross shadow boundaries.

QwikLoader relies on both event bubbling and querySelector to process
events such as `on:click` and dispatch such as `on-window:resize`.

To enable QwikLoader to work with shadow DOM, it is necessary to tell
qwikloader that when it is registering an event listener, as well as
performing querySelector, it should do so not just on document but also
inside the shadow DOM. To do that it is the responsibility of the
developer to tell qwikloader about the shadow DOM roots.

CONSTRAINTS:
The qwikloader applications `q:container` must be fully inside the
shadow root. (i.e. the application itself must not cross the shadow DOM
boundaries.)

Developer responsibility: (choose one)

- Have qwik loader find the roots by annotate the elements which have
  shadow DOM with `q:shadowRoot` attribute.
- Manually insert a `<script>` tag into HTML which will add the shadow DOM
  root into the qwikloader's `qwikevents` array.

Example:
Possible implementation
```html
<div id="my-child" q:shadowRoot>
  <template shadowrootmode="open">
     <div q:container="..." q:base="..."...>qwik-container here</div>
  </template>
</div>
```

Fixes: #6546
Co-authored-by: Giorgio Boa <35845425+gioboa@users.noreply.github.com>
- now you can call the result of `.resolve()` (and `.resolved`) directly
- avoids wrapping QRL functions that don't use lexical scope
Co-authored-by: PatrickJS <github@gdi2290.com>
Co-authored-by: PatrickJS <github@patrickjs.com>
Co-authored-by: Wout Mertens <Wout.Mertens@gmail.com>
Co-authored-by: Giorgio Boa <35845425+gioboa@users.noreply.github.com>
@wmertens wmertens requested review from mhevery, shairez and a team as code owners August 22, 2024 13:20
Copy link

changeset-bot bot commented Aug 22, 2024

🦋 Changeset detected

Latest commit: 97676d1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
create-qwik Patch
@builder.io/qwik Patch
@builder.io/qwik-city Patch
eslint-plugin-qwik Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@wmertens wmertens merged commit e8dd55f into build/v2 Aug 29, 2024
20 of 21 checks passed
@wmertens wmertens deleted the merge-main branch August 29, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.