-
Notifications
You must be signed in to change notification settings - Fork 111
fix(testing-library): should switch to another thread when dispatching #1244
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(testing-library): should switch to another thread when dispatching #1244
Conversation
🦋 Changeset detectedLatest commit: b03f0c4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
📢 Thoughts on this report? Let us know! |
CodSpeed Performance ReportMerging #1244 will not alter performanceComparing Summary
|
Web Explorer#2697 Bundle Size — 259.2KiB (0%).b03f0c4(current) vs 7408d3b main#2688(baseline) Bundle metrics
|
| Current #2697 |
Baseline #2688 |
|
|---|---|---|
141.05KiB |
141.05KiB |
|
31.88KiB |
31.88KiB |
|
0% |
0% |
|
4 |
4 |
|
4 |
4 |
|
210 |
210 |
|
17 |
17 |
|
4.15% |
4.15% |
|
4 |
4 |
|
0 |
0 |
Bundle size by type no changes
| Current #2697 |
Baseline #2688 |
|
|---|---|---|
227.32KiB |
227.32KiB |
|
31.88KiB |
31.88KiB |
Bundle analysis report Branch upupming:fix/testing-library-swi... Project dashboard
Generated by RelativeCI Documentation Report issue
React Example#2706 Bundle Size — 234.12KiB (0%).b03f0c4(current) vs 7408d3b main#2697(baseline) Bundle metrics
|
| Current #2706 |
Baseline #2697 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
4 |
4 |
|
153 |
153 |
|
61 |
61 |
|
45.85% |
45.85% |
|
2 |
2 |
|
0 |
0 |
Bundle size by type no changes
| Current #2706 |
Baseline #2697 |
|
|---|---|---|
145.76KiB |
145.76KiB |
|
88.37KiB |
88.37KiB |
Bundle analysis report Branch upupming:fix/testing-library-swi... Project dashboard
Generated by RelativeCI Documentation Report issue
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @lynx-js/[email protected] ### Minor Changes - feat: Force synchronous rendering for background initial renders to support Suspense fallbacks ([#1323](#1323)) - Introduces `@lynx-js/react/compat` submodule exporting Preact implementations of: ([#1316](#1316)) - `startTransition` - `useTransition` ### Patch Changes - fix: Ensure useEffect callbacks execute before event handlers from the same render cycle ([#1348](#1348)) - Enable rendering of the `Suspense` fallback on initial render. ([#1285](#1285)) - fix: Prevent "cannot set property 'current' of undefined" error thrown by MainThreadRef on engine data updates ([#1342](#1342)) ## @lynx-js/[email protected] ### Patch Changes - Should be able to override `performance.profile` when `DEBUG=rspeedy`. ([#1307](#1307)) ## @lynx-js/[email protected] ### Patch Changes - Be compat with `@lynx-js/react` v0.112.0 ([#1323](#1323)) - Fix not having profile in development by default. ([#1306](#1306)) - Updated dependencies \[[`fcafd54`](fcafd54), [`fe38de5`](fe38de5), [`7cd5ea2`](7cd5ea2)]: - @lynx-js/[email protected] - @lynx-js/[email protected] - @lynx-js/[email protected] - @lynx-js/[email protected] ## @lynx-js/[email protected] ### Patch Changes - Add alias for `@lynx-js/react/compat`. ([#1316](#1316)) ## @lynx-js/[email protected] ### Patch Changes - Fix the thread switching bug in `lynx.getCoreContext` and `lynx.getJSContext`. ([#1244](#1244)) ## @lynx-js/[email protected] ### Patch Changes - Improve transform transition compatibility with Lynx versions that do not support animating CSS variables. ([#1320](#1320)) - Added Lynx specific solo transform utilities that avoid CSS variables: `solo-translate-x-*`, `solo-scale-*`, `solo-rotate-*` etc. These utilities are implemented without CSS variables using raw transform functions such as `translateX()`, `scale()` and `rotate()`. They are mutually exclusive and cannot be combined with normal transform utilities. - Enabled arbitrary values for `transform-[...]`: e.g. `transform-[translateX(20px)_rotate(10deg)]`, following Tailwind v4 behavior. - Fix `scale-*` utilities not supporting negative values. Now supports `-scale-x-100`, `-scale-y-50` as expected. ([#1320](#1320)) - Add filter utilities: `blur-*`, `grayscale-*`. ([#1345](#1345)) - Note: On Lynx, filter functions are mutually exclusive, only one can be active at a time. - Introduce scoped timing utilities with auto-derived repeat count for grouped transition properties, working around Lynx's lack of automatic value expansion. ([#1324](#1324)) - Scoped utilities like `duration-colors-*`, `ease-colors-*`, and `delay-colors-*` are generated when `transitionProperty.colors` contains multiple properties. - Scoped utilities like `duration-n-*`, `ease-n-*`,`delay-n-*` are generated when the `transitionProperty.DEFAULT` group contains multiple properties. - For single-property transitions (e.g., `transition-opacity`, `transition-transform`), you must use Tailwind's default `duration-*`, `ease-*`, and `delay-*` utilities, no scoped timing utilities will be generated in these cases. ## @lynx-js/[email protected] ### Patch Changes - fix: improve compatibility with legacy template ([#1337](#1337)) avoid "object Object" error for old version rspeedy outputs - Updated dependencies \[]: - @lynx-js/[email protected] ## @lynx-js/[email protected] ### Patch Changes - fix: improve compatibility with legacy template ([#1337](#1337)) avoid "object Object" error for old version rspeedy outputs - Updated dependencies \[[`0da5ef0`](0da5ef0)]: - @lynx-js/[email protected] - @lynx-js/[email protected] - @lynx-js/[email protected] - @lynx-js/[email protected] ## @lynx-js/[email protected] ### Patch Changes - Add crossorigin attribute support to x-image component ([#1340](#1340)) - Added `crossorigin` to the `observedAttributes` array in `ImageSrc.ts` - Implemented `#handleCrossorigin` handler using the `bindToAttribute` helper to forward the crossorigin attribute from the custom element to the internal `<img>` element - Added comprehensive test coverage to verify the attribute is properly passed through to the shadow DOM This enables CORS-enabled image loading when using `<x-image crossorigin="anonymous">` or similar configurations. - Updated dependencies \[]: - @lynx-js/[email protected] ## @lynx-js/[email protected] ### Patch Changes - Updated dependencies \[[`0da5ef0`](0da5ef0)]: - @lynx-js/[email protected] ## @lynx-js/[email protected] ### Patch Changes - Updated dependencies \[[`0da5ef0`](0da5ef0)]: - @lynx-js/[email protected] - @lynx-js/[email protected] - @lynx-js/[email protected] ## @lynx-js/[email protected] ### Patch Changes - Be compat with `@lynx-js/react` v0.112.0 ([#1323](#1323)) - Fix `REACT_PROFILE` not taking effect. ([#1306](#1306)) ## [email protected] ## [email protected] ## @lynx-js/[email protected] ## @lynx-js/[email protected] ## @lynx-js/[email protected] Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Summary
In the real Lynx App,
lynx.getCoreContextandlynx.getJSContextworks in the following way:We should switch to another thread when
postMessage/dispatchEventis called, this will fix the bug of thread switching when using MTS nestedrunOnMainThreadandrunOnBackground.Checklist