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

chore: re-split code editor #9899

Closed
wants to merge 2 commits into from
Closed

chore: re-split code editor #9899

wants to merge 2 commits into from

Conversation

ashtonG
Copy link
Contributor

@ashtonG ashtonG commented Sep 6, 2024

Ticket

none

Description

This fixes an issue where the code editor was being included in the main app bundle. While you can indicate that a component is meant to be split with React.lazy, if any code elsewhere imports the code statically the code is unsplit. We wrap the code split component and ban other imports using eslint to prevent this from regressing.

Test Plan

Frontend bundle size should be reduced. visiting places where the code editor is visible should show a spinner while the code editor is loading

Checklist

  • Changes have been manually QA'd
  • New features have been approved by the corresponding PM
  • User-facing API changes have the "User-facing API Change" label
  • Release notes have been added as a separate file under docs/release-notes/
    See Release Note for details.
  • Licenses have been included for new code which was copied and/or modified from any external code

This fixes an issue where the code editor was being included in the main
app bundle. While you can indicate that a component is meant to be split
with `React.lazy`, if any code elsewhere imports the code statically the
code is unsplit. We wrap the code split component and ban other imports
using eslint to prevent this from regressing.
@cla-bot cla-bot bot added the cla-signed label Sep 6, 2024
Copy link

netlify bot commented Sep 6, 2024

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit 72148da
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/66db3790eff2ad0008f8651e
😎 Deploy Preview https://deploy-preview-9899--determined-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Sep 6, 2024

Codecov Report

Attention: Patch coverage is 74.46809% with 12 lines in your changes missing coverage. Please review.

Project coverage is 50.58%. Comparing base (8c83d31) to head (72148da).
Report is 212 commits behind head on main.

Files with missing lines Patch % Lines
webui/react/src/components/Markdown.tsx 0.00% 8 Missing ⚠️
...ui/react/src/pages/Templates/TemplateViewModal.tsx 0.00% 2 Missing ⚠️
...ebui/react/src/components/WorkspaceCreateModal.tsx 0.00% 1 Missing ⚠️
.../react/src/pages/Templates/TemplateCreateModal.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9899      +/-   ##
==========================================
- Coverage   54.70%   50.58%   -4.13%     
==========================================
  Files        1262      940     -322     
  Lines      156760   127375   -29385     
  Branches     3597     3595       -2     
==========================================
- Hits        85762    64430   -21332     
+ Misses      70867    62814    -8053     
  Partials      131      131              
Flag Coverage Δ
harness ?
web 54.43% <74.46%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
webui/react/src/components/CodeEditor.tsx 100.00% <100.00%> (ø)
...i/react/src/components/ExperimentContinueModal.tsx 63.31% <100.00%> (-0.28%) ⬇️
...bui/react/src/components/ExperimentCreateModal.tsx 81.41% <100.00%> (-0.18%) ⬇️
webui/react/src/components/JupyterLabModal.tsx 84.58% <100.00%> (-0.04%) ⬇️
webui/react/src/components/Metadata.tsx 56.66% <100.00%> (-1.40%) ⬇️
webui/react/src/components/UserSettingsModal.tsx 19.62% <100.00%> (ø)
...c/pages/ExperimentDetails/ExperimentCodeViewer.tsx 88.53% <100.00%> (-0.08%) ⬇️
...ebui/react/src/components/WorkspaceCreateModal.tsx 0.00% <0.00%> (ø)
.../react/src/pages/Templates/TemplateCreateModal.tsx 0.00% <0.00%> (ø)
...ui/react/src/pages/Templates/TemplateViewModal.tsx 0.00% <0.00%> (ø)
... and 1 more

... and 323 files with indirect coverage changes

@ashtonG ashtonG closed this Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant