-
Notifications
You must be signed in to change notification settings - Fork 71
[LG-4735] Spinner codemod #3228
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
Conversation
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
|
Name | Type |
---|---|
@leafygreen-ui/loading-indicator | Major |
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Size Change: -60 B (0%) Total Size: 1.6 MB
ℹ️ View Unchanged
|
f09a987
to
16e789b
Compare
<Spinner size="default" /> | ||
<Spinner size="default" /> | ||
<Spinner size="large" /> | ||
<Spinner size="xlarge" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like xlarge
is a size option. Is this correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops didn't update this after I removed it
@@ -0,0 +1,14 @@ | |||
import React from 'react'; | |||
|
|||
import { Spinner as LGSpinner } from '@leafygreen-ui/loading-indicator'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be using the treeshaken version in the outputs, or does that not make a difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think that makes a difference, but would be worth adding a test to make sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a codemod for the Spinner component upgrade from v3 to v5 of @leafygreen-ui/loading-indicator
. The codemod automates the migration of breaking changes including prop name changes and removals.
Key changes:
- Implements a transformer that converts
displayOption
prop tosize
prop with value mapping - Removes deprecated
description
andbaseFontSize
props while preserving description values as comments - Provides comprehensive test coverage for various usage scenarios
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
tools/codemods/src/codemods/loading-spinner-v5/transform.ts |
Main transformer implementation with prop conversion logic |
tools/codemods/src/codemods/loading-spinner-v5/tests/transform.spec.ts |
Test runner configuration |
tools/codemods/src/codemods/loading-spinner-v5/tests/*.{input,output}.tsx |
Test fixtures covering various scenarios |
tools/codemods/README.md |
Documentation for the new codemod |
.changeset/loading-spinner.md |
Release notes updated with codemod usage instructions |
<LGSpinner size="default" /> | ||
<LGSpinner size="large" /> |
Copilot
AI
Oct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output uses LGSpinner
but the import statement uses Spinner
. This should be <Spinner size=\"default\" />
to match the import.
<LGSpinner size="default" /> | |
<LGSpinner size="large" /> | |
<Spinner size="default" /> | |
<Spinner size="large" /> |
Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…leafygreen-ui into lg-4735-spinner-codemod
commit 4ac4fd2 Author: Adam Thompson <[email protected]> Date: Wed Oct 22 11:11:00 2025 -0400 Update Popover.stories.tsx commit c312739 Merge: 6a573d6 392b350 Author: Adam Thompson <[email protected]> Date: Tue Oct 21 17:26:37 2025 -0400 Merge branch 'main' into LG-5627-popover-height commit 392b350 Author: Adam Rasheed <[email protected]> Date: Tue Oct 21 12:36:10 2025 -0700 [LG-2187] feat: Menu Prop Updates (#3240) * [LG-2187] feat: Menu Prop Updates * fixed contextMenu * cleanup * updated changeset * rm old changeset * updated ContextMenu implementation commit c6b4d3f Author: Adam Thompson <[email protected]> Date: Tue Oct 21 12:15:31 2025 -0400 [LG-5635] chore: Fixes flaky icon builds (#3244) * create new node externals instance * rm debug script * add postbuild * Delete tsconfig.json * rm extra console.logs * Update index.ts * Create icon-build-process.md * Update index.ts commit 2d50b59 Author: Terrence Keane <[email protected]> Date: Tue Oct 21 10:50:24 2025 -0400 [LG-5098] feat(CodeEditor): adds custom search panel (#3186) * feat(SearchForm): add SearchForm component * feat(SearchForm): implement SearchForm component with toggle functionality and styling - Added the SearchForm component to the CodeEditor, featuring a toggle button for expanding and collapsing the search input. - Integrated LeafyGreen UI components for consistent styling and functionality. - Created a new story for SearchForm in Storybook to demonstrate its usage and appearance. - Updated CodeEditor to include the SearchForm, enhancing user interaction capabilities. * refactor(CodeEditor): add back in panel import * refactor(SearchForm): further correct styling * WIP * refactor(SearchForm): Further correct styling * make top row height more dynamic * fix top section height * WIP * Fix width styling * Fix box shadow * Add find functionality * Remove unnecessary space * Add find selected index rendering * Add replace functionality * Fix keyboard shortcuts * rename SearchForm to SearchPanel * fix top padding * Allow search panel to be disabled * fix dep array * only load search module when needed * fix darkmode and font size * fix deps * Fix focus and imports * prevent panel from overflowing editor * add filter menu * pull out all handler * add search panel tests * fix tests * changeset * remove unused styles * update changeset * ignore react client TS issue * add non-panel style * fix dep arr * Fix react 17 bug * Copilot feedback * Missed copilot feedback * CR first pass * Update search match background to match Code highlight * Fix R17 import * Revert "Update search match background to match Code highlight" This reverts commit 6bf2b88. * Fix darkmode implementation * Fix search panel sizing * Extract search logic into hook * Remove unused variables * Reapply "Update search match background to match Code highlight" This reverts commit ec510e5. * Possible color pallette for find * Remove 'all' option * Fix build? * Add require v import comment * Fix hook logic * refactor(SearchPanel): update selected index handling to use searchQuery parameter for improved accuracy * fix(SearchPanel): remove TypeScript error suppression for ref prop in TextInput component * fix(SearchPanel): adjust positioning and add right border to enhance layout commit 090b547 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue Oct 21 09:39:53 2025 -0400 Version Packages (#3231) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> commit 1d67179 Author: Nima Taheri <[email protected]> Date: Mon Oct 20 14:21:03 2025 -0700 LG-5588 Add Bar series for charts (#3206) * feat: add Bar series * refactor: change makeLineData to makeSeriesData * docs: rename Basic to Line, then add a Bar to charts-core storybook * feat: add changeset commit 71ff953 Author: Stephen Lee <[email protected]> Date: Mon Oct 20 13:45:30 2025 -0700 fix(input-bar): change shouldRenderGradient default to false (#3194) (#3243) * fix(input-bar): reverse default of shouldRenderGradient prop * chore(input-bar): changeset * refactor(input-bar): remove log for shouldRenderGradient prop to avoid major change * [LG-5600] feat(input-bar): add onClickStop prop and update button disabled logic (#3195) * feat(input-bar): add onClickStop prop and fix disabled state * docs(input-bar): README * refactor(input-bar): reorg buttons and rename prop commit 7fc3077 Author: Adam Rasheed <[email protected]> Date: Mon Oct 20 13:23:40 2025 -0700 [LG-2163] chore: Select component removed readOnly prop (#3241) commit 82c0efe Author: Adam Thompson <[email protected]> Date: Mon Oct 20 14:20:20 2025 -0400 chore: mv build command to package json (#3242) * mv build command to package json * Update package.json commit 95a6cd3 Author: Adam Thompson <[email protected]> Date: Mon Oct 20 12:30:13 2025 -0400 Update release.yml (#3239) commit 1a9926f Author: Stephen Lee <[email protected]> Date: Mon Oct 20 09:24:27 2025 -0700 [LG-5579] feat(feature-walls): migrate package from private to public scope (#3229) * chore(feature-walls): move from @lg-private to @leafygreen-ui scope * docs: add feature-walls to root readme * docs(vertical-stepper): consistent docs * refactor(feature-walls): remove react-transition-group dep in favor of css transition * chore(feature-walls): changeset * fix(feature-walls): Accordion tests * fix(feature-walls): copilot feedback, cleanup, use only CSS for ExpandableGrid * fix(feature-walls): types * test(feature-walls): generated stories use LG provider * fix(feature-walls): dark mode propagation commit 7f7c385 Author: Terrence Keane <[email protected]> Date: Fri Oct 17 16:31:56 2025 -0400 fix(skeleton-loader): enhance accessibility for TableSkeleton component (#3233) * Add VisuallyHidden "Loading" text to table headers without column labels to improve screen reader support. * Update tests to verify accessibility compliance and ensure no violations are present. * Include '@leafygreen-ui/a11y' as a dependency in the skeleton-loader package. commit 51c453b Author: Terrence Keane <[email protected]> Date: Fri Oct 17 14:11:56 2025 -0400 [LG-3993] fix(Select): VO properly announces value and label (#3218) * Correctly read label and value when label included * Add comment * changeset * Enhance `Select` component accessibility by adding `aria-current` attribute for screen readers and ensuring proper announcement of `aria-label` with selected values. * Refactor `aria-label` attributes in DatePickerMonth and DatePickerYear components for improved accessibility and consistency. * Remove aria-current logic from Select component * Remove aria-current attribute assertions from Select component tests --------- Co-authored-by: Adam Thompson <[email protected]> commit bd83675 Author: Stephen Lee <[email protected]> Date: Fri Oct 17 10:12:27 2025 -0700 feat(chat): style improvements (#3238) * fix(drawer): overflow shadow only renders when scrollable is true (#3210) * fix(drawer): overflow shadow only renders when scrollable is true * chore(drawer): changeset * fix(input-bar): center align disclaimer text (#3211) * fix(input-bar): center align disclaimer * chore(input-bar): changeset * feat(chat): update layout to use flexible height containers (#3212) * fix(leafygreen-chat-provider): set height to 100% * chore(leafygreen-chat-provider): changeset * feat(message-feed): remove fixed default height for MessageFeed component * chore(message-feed): changeset * fix(fixed-chat-window): add explicit height and fix stories * chore(fixed-chat-window): changeset * chore(chat-window): install @storybook/test and @leafygreen-ui/drawer dev deps * test(chat-window): add InDrawerLayout story and update baseMessages * feat(chat-window): add hidden spacer to fix vertical message flow and remove redundant container element * chore: changesets * fix(chat): stories commit f3a8bdc Author: Adam Thompson <[email protected]> Date: Fri Oct 17 12:52:36 2025 -0400 LG-5609 Emotion version script (#3221) * postversion * Create emotion-version.md * Revert "postversion" This reverts commit 12f41d0. * build pre version in ci * Update emotion-version.md commit 6a573d6 Merge: 29c2c23 b2d6795 Author: Adam Thompson <[email protected]> Date: Fri Oct 17 12:51:34 2025 -0400 Merge branch 'main' into LG-5627-popover-height commit 29c2c23 Author: Adam Thompson <[email protected]> Date: Fri Oct 17 12:50:31 2025 -0400 Update packages/popover/src/Popover/Popover.types.ts Co-authored-by: Stephen Lee <[email protected]> commit 1ec9bf8 Author: Adam Thompson <[email protected]> Date: Fri Oct 17 12:50:11 2025 -0400 Update .changeset/popover-max-height.md Co-authored-by: Stephen Lee <[email protected]> commit b2d6795 Author: Adam Thompson <[email protected]> Date: Fri Oct 17 10:28:35 2025 -0400 [LG-4735] Spinner codemod (#3228) * Creates loading spinner * creates story * lgids and test utils * Update README.md * deprecate Spinner from loading-indicator * changesets * Apply suggestion from @Copilot Co-authored-by: Copilot <[email protected]> * Apply suggestion from @Copilot Co-authored-by: Copilot <[email protected]> * Apply suggestion from @Copilot Co-authored-by: Copilot <[email protected]> * mv story * update animation timing * replace loading spinner * adds test harnesses * fix test references * adds named exports * changeset * Update loading-spinner.md * update rotation speed * Update README.md * Updates sizing to match Figma * fixes * Update loading-spinner.md * adds codemod * update description comment * Update loading-spinner.md * lint * fixes xl tests * adds tree shake tests * Update tools/codemods/src/codemods/loading-spinner-v5/transform.ts Co-authored-by: Copilot <[email protected]> * Update tools/codemods/README.md Co-authored-by: Copilot <[email protected]> * fix treeshake test --------- Co-authored-by: Copilot <[email protected]> commit 2e06c1d Author: Stephen Lee <[email protected]> Date: Fri Oct 17 07:24:42 2025 -0700 fix(date-picker): flaky spec (#3235)
✍️ Proposed changes
Adds Codemod for Spinner changes #3219