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

Refactor: Remove enums, split components #58

Merged
merged 4 commits into from
Jan 18, 2025
Merged

Refactor: Remove enums, split components #58

merged 4 commits into from
Jan 18, 2025

Conversation

jackw
Copy link
Owner

@jackw jackw commented Jan 18, 2025

This PR refactors the plugin in the following ways:

  • Stop using enums
  • Breakdown larger components
  • Lazy load Feedback/Error component
  • Add eslint sort plugin and run lint:fix

@jackw jackw self-assigned this Jan 18, 2025
Copy link
Contributor

Bundle Size Changes

Hello! 👋 This comment was generated by a Github Action to help you and reviewers understand the impact of your PR on frontend bundle sizes.

Whenever this PR is updated, this comment will update to reflect the latest changes.

EntryPoint Size % Diff
module 13.16 KB (-284 Bytes) -2.06%
Files Total bundle size % Diff
15 357.98 KB (+345 Bytes) +0.09%
View detailed bundle information

Added

Name Size % Diff
904.js?_cache=fd665123737921057804 5.33 KB (+5.33 KB) -
611.js?_cache=a999d6fd10345ef74ed0 3.73 KB (+3.73 KB) -
943.js?_cache=38abcce9f06275167394 3.6 KB (+3.6 KB) -
390.js?_cache=1df504ff3b9c3d945d57 2.47 KB (+2.47 KB) -

Removed

Name Size % Diff
904.js?_cache=f5451ea60a3c214b27c6 0 Bytes (-5.33 KB) -100.00%
611.js?_cache=2ed6dfe0955ad927aaf9 0 Bytes (-3.73 KB) -100.00%
943.js?_cache=ec3bbd837eff9f813884 0 Bytes (-3.59 KB) -100.00%
527.js?_cache=242cb784c9caf1bdb9bb 0 Bytes (-1.87 KB) -100.00%

Bigger

No assets were bigger

Smaller

Name Size % Diff
module.js 13.16 KB (-284 Bytes) -2.06%
View module information

Added

Name Size % Diff
./components/TrafficLight.tsx 2.17 KB (+2.17 KB) -
./components/TrafficLightFeedback.tsx 1.42 KB (+1.42 KB) -
./components/TrafficLightStylesLazy.tsx 1.29 KB (+1.29 KB) -
./components/TrafficLightValue.tsx 993 Bytes (+993 Bytes) -

Removed

Name Size % Diff
./types.ts 0 Bytes (-876 Bytes) -100.00%

Bigger

Name Size % Diff
./constants.ts 1.2 KB (+432 Bytes) +54.27%
./hooks/useLightsData.ts 3.11 KB (+53 Bytes) +1.69%
./utils/utils.ts 3.63 KB (+6 Bytes) +0.16%

Smaller

Name Size % Diff
./components/TrafficLightPanel.tsx 2.75 KB (-4.51 KB) -62.13%
./module.ts 2.61 KB (-258 Bytes) -8.79%
./utils/processTimeSeriesData.ts 2.63 KB (-7 Bytes) -0.26%
./utils/processTableData.ts 2.21 KB (-4 Bytes) -0.18%

@jackw jackw merged commit 0d77e2a into main Jan 18, 2025
9 checks passed
@jackw jackw deleted the jackw/refactor branch January 18, 2025 17:44
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.

1 participant