Skip to content

ref: Convert OptionButton and DisplayTypeButton to TS#3759

Merged
spalmurray-codecov merged 3 commits intomainfrom
spalmurray/DisplayTypeButton-ts
Feb 21, 2025
Merged

ref: Convert OptionButton and DisplayTypeButton to TS#3759
spalmurray-codecov merged 3 commits intomainfrom
spalmurray/DisplayTypeButton-ts

Conversation

@spalmurray-codecov
Copy link
Copy Markdown
Contributor

@spalmurray-codecov spalmurray-codecov commented Feb 20, 2025

Converts OptionButton and DisplayTypeButton to TS. Some type shenanigans required, but a good time was had. Also got rid of their barrel files.

Part of codecov/engineering-team#2747

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 20, 2025

Bundle Report

Changes will decrease total bundle size by 563 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-system 6.14MB -290 bytes (-0.0%) ⬇️
gazebo-production-esm 6.2MB -273 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: gazebo-production-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js -5 bytes 16.86kB -0.03%
assets/index.*.js 5 bytes 4.07kB 0.12%
assets/index.*.js 5 bytes 48.44kB 0.01%
assets/RawFileViewer.*.js -52 bytes 127.14kB -0.04%
assets/OptionButton.*.js -226 bytes 645 bytes -25.95%

Files in assets/RawFileViewer.*.js:

  • ./src/shared/ContentsTable/DisplayTypeButton/DisplayTypeButton.tsx → Total Size: 1.18kB

Files in assets/OptionButton.*.js:

  • ./src/ui/OptionButton/OptionButton.tsx → Total Size: 876 bytes
view changes for bundle: gazebo-production-system

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/RawFileViewer-legacy.*.js -61 bytes 127.39kB -0.05%
assets/OptionButton-legacy.*.js -229 bytes 735 bytes -23.76%

Files in assets/RawFileViewer-legacy.*.js:

  • ./src/shared/ContentsTable/DisplayTypeButton/DisplayTypeButton.tsx → Total Size: 1.18kB

Files in assets/OptionButton-legacy.*.js:

  • ./src/ui/OptionButton/OptionButton.tsx → Total Size: 876 bytes

@spalmurray-codecov spalmurray-codecov marked this pull request as ready for review February 20, 2025 19:49
@codecov-releaser
Copy link
Copy Markdown
Collaborator

codecov-releaser commented Feb 20, 2025

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
ae39324 Thu, 20 Feb 2025 19:50:36 GMT Expired Expired
ae39324 Thu, 20 Feb 2025 19:53:29 GMT Expired Expired
ec8c8bc Thu, 20 Feb 2025 21:33:00 GMT Expired Expired
b8fb34c Thu, 20 Feb 2025 22:23:00 GMT Expired Expired
b0e13c1 Fri, 21 Feb 2025 14:47:06 GMT Cloud Enterprise

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.67%. Comparing base (e9a9a87) to head (b0e13c1).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3759      +/-   ##
==========================================
- Coverage   98.67%   98.67%   -0.01%     
==========================================
  Files         825      825              
  Lines       14843    14842       -1     
  Branches     4251     4244       -7     
==========================================
- Hits        14647    14646       -1     
  Misses        189      189              
  Partials        7        7              
Files with missing lines Coverage Δ
...mitDetailFileExplorer/CommitDetailFileExplorer.tsx 100.00% <ø> (ø)
...anPage/PlanDetailsControls/PlanDetailsControls.tsx 100.00% <ø> (ø)
...roPlanController/BillingOptions/BillingOptions.tsx 100.00% <ø> (ø)
...ryPlanController/BillingOptions/BillingOptions.tsx 100.00% <ø> (ø)
...amPlanController/BillingOptions/BillingOptions.tsx 100.00% <ø> (ø)
...ge/UpgradeForm/PlanTypeOptions/PlanTypeOptions.tsx 100.00% <ø> (ø)
.../PullCoverage/routes/FileExplorer/FileExplorer.tsx 100.00% <ø> (ø)
...OverviewTab/subroute/FileExplorer/FileExplorer.jsx 100.00% <ø> (ø)
...tentsTable/DisplayTypeButton/DisplayTypeButton.tsx 100.00% <100.00%> (ø)
src/ui/OptionButton/OptionButton.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.26% <ø> (ø)
Services 99.24% <ø> (ø)
Shared 99.11% <100.00%> (-0.01%) ⬇️
UI 99.07% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e9a9a87...b0e13c1. Read the comment docs.

@codecov-qa
Copy link
Copy Markdown

codecov-qa bot commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.67%. Comparing base (e9a9a87) to head (b0e13c1).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

@@            Coverage Diff             @@
##             main    #3759      +/-   ##
==========================================
- Coverage   98.67%   98.67%   -0.01%     
==========================================
  Files         825      825              
  Lines       14843    14842       -1     
  Branches     4251     4244       -7     
==========================================
- Hits        14647    14646       -1     
  Misses        189      189              
  Partials        7        7              
Files with missing lines Coverage Δ
...mitDetailFileExplorer/CommitDetailFileExplorer.tsx 100.00% <ø> (ø)
...anPage/PlanDetailsControls/PlanDetailsControls.tsx 100.00% <ø> (ø)
...roPlanController/BillingOptions/BillingOptions.tsx 100.00% <ø> (ø)
...ryPlanController/BillingOptions/BillingOptions.tsx 100.00% <ø> (ø)
...amPlanController/BillingOptions/BillingOptions.tsx 100.00% <ø> (ø)
...ge/UpgradeForm/PlanTypeOptions/PlanTypeOptions.tsx 100.00% <ø> (ø)
.../PullCoverage/routes/FileExplorer/FileExplorer.tsx 100.00% <ø> (ø)
...OverviewTab/subroute/FileExplorer/FileExplorer.jsx 100.00% <ø> (ø)
...tentsTable/DisplayTypeButton/DisplayTypeButton.tsx 100.00% <100.00%> (ø)
src/ui/OptionButton/OptionButton.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.26% <ø> (ø)
Services 99.24% <ø> (ø)
Shared 99.11% <100.00%> (-0.01%) ⬇️
UI 99.07% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e9a9a87...b0e13c1. Read the comment docs.

@codecov-public-qa
Copy link
Copy Markdown

codecov-public-qa bot commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.67%. Comparing base (e9a9a87) to head (b0e13c1).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

@@            Coverage Diff             @@
##             main    #3759      +/-   ##
==========================================
- Coverage   98.67%   98.67%   -0.01%     
==========================================
  Files         825      825              
  Lines       14843    14842       -1     
  Branches     4243     4244       +1     
==========================================
- Hits        14647    14646       -1     
  Misses        189      189              
  Partials        7        7              
Files with missing lines Coverage Δ
...mitDetailFileExplorer/CommitDetailFileExplorer.tsx 100.00% <ø> (ø)
...anPage/PlanDetailsControls/PlanDetailsControls.tsx 100.00% <ø> (ø)
...roPlanController/BillingOptions/BillingOptions.tsx 100.00% <ø> (ø)
...ryPlanController/BillingOptions/BillingOptions.tsx 100.00% <ø> (ø)
...amPlanController/BillingOptions/BillingOptions.tsx 100.00% <ø> (ø)
...ge/UpgradeForm/PlanTypeOptions/PlanTypeOptions.tsx 100.00% <ø> (ø)
.../PullCoverage/routes/FileExplorer/FileExplorer.tsx 100.00% <ø> (ø)
...OverviewTab/subroute/FileExplorer/FileExplorer.jsx 100.00% <ø> (ø)
...tentsTable/DisplayTypeButton/DisplayTypeButton.tsx 100.00% <100.00%> (ø)
src/ui/OptionButton/OptionButton.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.26% <ø> (ø)
Services 99.24% <ø> (ø)
Shared 99.11% <100.00%> (-0.01%) ⬇️
UI 99.07% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e9a9a87...b0e13c1. Read the comment docs.

@spalmurray-codecov spalmurray-codecov force-pushed the spalmurray/DisplayTypeButton-ts branch from ec8c8bc to b8fb34c Compare February 20, 2025 22:18
@codecov-notifications
Copy link
Copy Markdown

codecov-notifications bot commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

@@            Coverage Diff             @@
##             main    #3759      +/-   ##
==========================================
- Coverage   98.67%   98.67%   -0.01%     
==========================================
  Files         825      825              
  Lines       14843    14842       -1     
  Branches     4251     4244       -7     
==========================================
- Hits        14647    14646       -1     
  Misses        189      189              
  Partials        7        7              
Files with missing lines Coverage Δ
...mitDetailFileExplorer/CommitDetailFileExplorer.tsx 100.00% <ø> (ø)
...anPage/PlanDetailsControls/PlanDetailsControls.tsx 100.00% <ø> (ø)
...roPlanController/BillingOptions/BillingOptions.tsx 100.00% <ø> (ø)
...ryPlanController/BillingOptions/BillingOptions.tsx 100.00% <ø> (ø)
...amPlanController/BillingOptions/BillingOptions.tsx 100.00% <ø> (ø)
...ge/UpgradeForm/PlanTypeOptions/PlanTypeOptions.tsx 100.00% <ø> (ø)
.../PullCoverage/routes/FileExplorer/FileExplorer.tsx 100.00% <ø> (ø)
...OverviewTab/subroute/FileExplorer/FileExplorer.jsx 100.00% <ø> (ø)
...tentsTable/DisplayTypeButton/DisplayTypeButton.tsx 100.00% <100.00%> (ø)
src/ui/OptionButton/OptionButton.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.26% <ø> (ø)
Services 99.24% <ø> (ø)
Shared 99.11% <100.00%> (-0.01%) ⬇️
UI 99.07% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e9a9a87...b0e13c1. Read the comment docs.


export const Default: Story = {
render: () => {
const [active, setActive] = useState<'Orym' | 'Chetney' | 'Imogen'>(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the heck are these

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

They were in the old storybook so just brought them over, but unfortunately I do know that they are characters from Critical Role 🤓

Copy link
Copy Markdown
Contributor

@calvin-codecov calvin-codecov left a comment

Choose a reason for hiding this comment

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

LGTM after merge conflict resolution

type Options = (typeof options)[number]

function initialState(urlParams) {
// useLocationParams is pain
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

☹️

@spalmurray-codecov spalmurray-codecov force-pushed the spalmurray/DisplayTypeButton-ts branch from b8fb34c to b0e13c1 Compare February 21, 2025 14:42
@codecov-staging
Copy link
Copy Markdown

codecov-staging bot commented Feb 21, 2025

Bundle Report

Changes will decrease total bundle size by 563 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-staging-system 6.14MB -290 bytes (-0.0%) ⬇️
gazebo-staging-esm 6.2MB -273 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: gazebo-staging-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js -5 bytes 16.86kB -0.03%
assets/index.*.js 5 bytes 48.44kB 0.01%
assets/index.*.js 5 bytes 4.07kB 0.12%
assets/RawFileViewer.*.js -52 bytes 127.14kB -0.04%
assets/OptionButton.*.js -226 bytes 645 bytes -25.95%

Files in assets/RawFileViewer.*.js:

  • ./src/shared/ContentsTable/DisplayTypeButton/DisplayTypeButton.tsx → Total Size: 1.18kB

Files in assets/OptionButton.*.js:

  • ./src/ui/OptionButton/OptionButton.tsx → Total Size: 876 bytes
view changes for bundle: gazebo-staging-system

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/RawFileViewer-legacy.*.js -61 bytes 127.39kB -0.05%
assets/OptionButton-legacy.*.js -229 bytes 735 bytes -23.76%

Files in assets/RawFileViewer-legacy.*.js:

  • ./src/shared/ContentsTable/DisplayTypeButton/DisplayTypeButton.tsx → Total Size: 1.18kB

Files in assets/OptionButton-legacy.*.js:

  • ./src/ui/OptionButton/OptionButton.tsx → Total Size: 876 bytes

@spalmurray-codecov spalmurray-codecov added this pull request to the merge queue Feb 21, 2025
Merged via the queue into main with commit 9e10243 Feb 21, 2025
62 checks passed
@spalmurray-codecov spalmurray-codecov deleted the spalmurray/DisplayTypeButton-ts branch February 21, 2025 15:31
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.

6 participants