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

Ensure scene id props exist #4786

Merged
merged 12 commits into from
Jan 24, 2024
Merged

Ensure scene id props exist #4786

merged 12 commits into from
Jan 24, 2024

Conversation

bkrmendy
Copy link
Contributor

@bkrmendy bkrmendy commented Jan 23, 2024

Problem

We link threads to scenes by adding the value of a scene's id prop to the thread metadata. If a scene doesn't have an id prop, we won't be able to link comments to it. Not all scenes may have an id prop, so we need a mechanism that adds the id prop to scenes without it.

Fix

Walk the contents tree after each dispatch, and ensure that all scenes have ids and their values are all unique. If a scene doesn't have an id prop, or another scene already uses it, it's overwritten by the scene's uid.

Copy link
Contributor

github-actions bot commented Jan 23, 2024

Try me

Copy link

relativeci bot commented Jan 23, 2024

Job #10035: Bundle Size — 59.81MiB (-4.08%).

621ec87(current) vs 8f5e3ac master#10018(baseline)

Warning

Bundle contains 66 duplicate packages – View duplicate packages

Bundle metrics  Change 7 changes Regression 2 regressions Improvement 1 improvement
                 Current
Job #10035
     Baseline
Job #10018
Regression  Initial JS 45.62MiB(+0.17%) 45.55MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 53.51% 19.9%
Change  Chunks 27(+3.85%) 26
Change  Assets 31(+3.33%) 30
Change  Modules 4499(+2.41%) 4393
Regression  Duplicate Modules 580(+22.36%) 474
Improvement  Duplicate Code 27.54%(-10.41%) 30.74%
No change  Packages 462 462
No change  Duplicate Packages 65 65
Bundle size by type  Change 2 changes Regression 1 regression Improvement 1 improvement
                 Current
Job #10035
     Baseline
Job #10018
Improvement  JS 59.8MiB (-4.08%) 62.34MiB
Regression  HTML 11.87KiB (+2.85%) 11.54KiB

View job #10035 reportView fix/check-scene-id-prop branch activityView project dashboard

Copy link
Contributor

github-actions bot commented Jan 23, 2024

Performance test results:
(Chart1)
(Chart2)

@bkrmendy bkrmendy marked this pull request as ready for review January 24, 2024 11:51
jsExpressionValue(idPropValueToUse, emptyComments),
)

if (IS_TEST_ENVIRONMENT || isLeft(updatedProps)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put the IS_TEST_ENVIRONMENT as the first clause in the function, to make it clear it's a separate thing

@bkrmendy bkrmendy merged commit 1811a2c into master Jan 24, 2024
12 checks passed
@bkrmendy bkrmendy deleted the fix/check-scene-id-prop branch January 24, 2024 14:42
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.

4 participants