-
Notifications
You must be signed in to change notification settings - Fork 159
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
Feature/navigator child data tracing #5675
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#12457 Bundle Size — 62.13MiB (~-0.01%).
Warning Bundle contains 52 duplicate packages – View duplicate packages Bundle metrics
|
Current #12457 |
Baseline #12456 |
|
---|---|---|
Initial JS | 45.19MiB (~-0.01% ) |
45.19MiB |
Initial CSS | 0B |
0B |
Cache Invalidation | 21.31% |
0% |
Chunks | 31 |
31 |
Assets | 34 |
34 |
Modules | 4276 |
4276 |
Duplicate Modules | 509 |
509 |
Duplicate Code | 31.01% |
31.01% |
Packages | 449 |
449 |
Duplicate Packages | 52 |
52 |
Bundle size by type 2 changes
2 improvements
Current #12457 |
Baseline #12456 |
|
---|---|---|
JS | 62.12MiB (~-0.01% ) |
62.12MiB |
HTML | 10.94KiB (-0.34% ) |
10.98KiB |
Bundle analysis report Branch feature/navigator-child-data-tra... Project dashboard
bkrmendy
reviewed
May 15, 2024
editor/src/components/inspector/sections/component-section/data-reference-cartouche.tsx
Outdated
Show resolved
Hide resolved
seanparsons
approved these changes
May 15, 2024
bkrmendy
approved these changes
May 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before:
After:
Problem:
The data tracing could only start running from a property at an ElementPropertyPath, but in our representation the jsx children are not the same as passing data into
props.children
, which means the data tracing couldn't trace for data passed in as children to elements.This limitation meant that #5609 only worked for navigator cartouches that belonged to data passed in as props, not children of elements. You can see in the above before/after screenshots that cartouches representing data coming from useLoaderData are displayed in blue on master.
Fix
#5666 Introduced the ability to start the data tracing from an arbitrary element reference and an ElementPath pointing at their containing scope. This PR uses
traceDataFromElement
for the navigator data cartouches.Details:
DataReferenceCartoucheControl
takes a new propsurroundingScope
and callstraceDataFromElement
instead oftraceDataFromProp
surroundingScope: ElementPath
toDataReferenceNavigatorEntry
useDataPickerButton
inDataReferenceCartoucheControl