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

Feature/navigator child data tracing #5675

Merged
merged 7 commits into from
May 15, 2024

Conversation

balazsbajorics
Copy link
Contributor

@balazsbajorics balazsbajorics commented May 14, 2024

Before:
image

After:
image

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:

  • The navigator's DataReferenceCartoucheControl takes a new prop surroundingScope and calls traceDataFromElement instead of traceDataFromProp
  • Added surroundingScope: ElementPath to DataReferenceNavigatorEntry
  • Clarified the code that calls useDataPickerButton in DataReferenceCartoucheControl

Copy link
Contributor

github-actions bot commented May 14, 2024

Try me

Copy link

relativeci bot commented May 14, 2024

#12457 Bundle Size — 62.13MiB (~-0.01%).

0be79db(current) vs 6339ece master#12456(baseline)

Warning

Bundle contains 52 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Improvement 1 improvement
                 Current
#12457
     Baseline
#12456
Improvement  Initial JS 45.19MiB(~-0.01%) 45.19MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 21.31% 0%
No change  Chunks 31 31
No change  Assets 34 34
No change  Modules 4276 4276
No change  Duplicate Modules 509 509
No change  Duplicate Code 31.01% 31.01%
No change  Packages 449 449
No change  Duplicate Packages 52 52
Bundle size by type  Change 2 changes Improvement 2 improvements
                 Current
#12457
     Baseline
#12456
Improvement  JS 62.12MiB (~-0.01%) 62.12MiB
Improvement  HTML 10.94KiB (-0.34%) 10.98KiB

Bundle analysis reportBranch feature/navigator-child-data-tra...Project dashboard

@balazsbajorics balazsbajorics marked this pull request as ready for review May 14, 2024 19:47
Copy link
Contributor

github-actions bot commented May 14, 2024

Performance test results:
(Chart1)
(Chart2)

@balazsbajorics balazsbajorics merged commit 41c0311 into master May 15, 2024
16 checks passed
@balazsbajorics balazsbajorics deleted the feature/navigator-child-data-tracing branch May 15, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants