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

Remove unnecessary custom require function boilerplate #6514

Merged
merged 9 commits into from
Oct 15, 2024

Conversation

bkrmendy
Copy link
Contributor

@bkrmendy bkrmendy commented Oct 10, 2024

Problem

In multiple places there's unnecessary boilerplate code around creating the custom require function.

Fix

Remove the boilerplate code, since it's only necessary where we want to inject ComponentRendererComponents or or collect data in MutableUtopiaCtxRefData

Details

  • updated snapshot tests in the property control descriptions tests, which kept the file extension of the module key in a way that wasn't consistent with the rest of the tests
  • added a tests that makes sure that components in RemixScenes can be focused (an earlier iteration of this PR broke component focusing in RemixScenes)

Manual Tests:
I hereby swear that:

  • I opened a hydrogen project and it loaded
  • I could navigate to various routes in Play mode

Copy link
Contributor

github-actions bot commented Oct 10, 2024

Try me

Copy link

relativeci bot commented Oct 10, 2024

#14778 Bundle Size — 57.94MiB (~-0.01%).

0435e46(current) vs 916e8b9 master#14776(baseline)

Warning

Bundle contains 70 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Improvement 1 improvement
                 Current
#14778
     Baseline
#14776
Improvement  Initial JS 40.94MiB(~-0.01%) 40.94MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 17.94% 17.93%
No change  Chunks 21 21
No change  Assets 23 23
No change  Modules 4148 4148
No change  Duplicate Modules 213 213
No change  Duplicate Code 27.32% 27.32%
No change  Packages 477 477
No change  Duplicate Packages 70 70
Bundle size by type  Change 2 changes Improvement 2 improvements
                 Current
#14778
     Baseline
#14776
Improvement  JS 57.93MiB (~-0.01%) 57.93MiB
Improvement  HTML 7.37KiB (-0.25%) 7.39KiB

Bundle analysis reportBranch fix/custom-require-minus-boilerp...Project dashboard


Generated by RelativeCIDocumentationReport issue

@bkrmendy bkrmendy marked this pull request as ready for review October 15, 2024 08:07
@bkrmendy bkrmendy changed the title get rid of unnecessary custom require fn boilerplate Remove unnecessary custom require function boilerplate Oct 15, 2024
@bkrmendy bkrmendy requested a review from Rheeseyb October 15, 2024 09:58
@bkrmendy bkrmendy marked this pull request as draft October 15, 2024 09:58
@bkrmendy bkrmendy marked this pull request as ready for review October 15, 2024 12:05
Copy link
Contributor

@Rheeseyb Rheeseyb left a comment

Choose a reason for hiding this comment

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

Thanks for adding the test!

@bkrmendy bkrmendy merged commit b6a2401 into master Oct 15, 2024
16 checks passed
@bkrmendy bkrmendy deleted the fix/custom-require-minus-boilerplate branch October 15, 2024 12:10
liady pushed a commit that referenced this pull request Dec 13, 2024
## Problem
In multiple places there's unnecessary boilerplate code around creating
the custom `require` function.

## Fix
Remove the boilerplate code, since it's only necessary where we want to
inject `ComponentRendererComponent`s or or collect data in
`MutableUtopiaCtxRefData`

### Details
- updated snapshot tests in the property control descriptions tests,
which kept the file extension of the module key in a way that wasn't
consistent with the rest of the tests
- added a tests that makes sure that components in `RemixScene`s can be
focused (an earlier iteration of this PR broke component focusing in
`RemixScene`s)

**Manual Tests:**
I hereby swear that:

- [x] I opened a hydrogen project and it loaded
- [x] I could navigate to various routes in Play mode
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.

3 participants