-
Notifications
You must be signed in to change notification settings - Fork 72
[LG-5600] feat(input-bar): add onClickStop prop and update button disabled logic #3195
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
🦋 Changeset detectedLatest commit: ae49f3f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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 enhances the InputBar component to improve user experience during loading states by adding stop functionality and fixing button disabled logic. The main purpose is to allow users to stop ongoing requests and restore their previous message content.
Key changes:
- Added
onClickStopprop for handling stop actions during loading state - Modified send button disabled logic to remain enabled during loading (unless explicitly disabled)
- Changed
shouldRenderGradientdefault fromtruetofalseto prevent console warnings
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
chat/input-bar/src/InputBar/InputBar.types.ts |
Added onClickStop prop definition and reorganized prop documentation |
chat/input-bar/src/InputBar/InputBar.tsx |
Implemented stop functionality, updated button disabled logic, and added message restoration helper |
chat/input-bar/src/InputBar/InputBar.spec.tsx |
Added comprehensive test coverage for the new stop functionality |
chat/input-bar/README.md |
Updated documentation with new example and prop descriptions |
.changeset/real-ears-wait.md |
Documented breaking and minor changes for the release |
|
Size Change: +388 B (+0.02%) Total Size: 1.59 MB
ℹ️ View Unchanged
|
| * Callback fired when the stop button is clicked during a loading state. | ||
| * When triggered, the message input will be restored to the previous message body. | ||
| */ | ||
| onClickStop?: () => void; |
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.
onStopButtonClick?
onClickStop seems like something that fires if the click event is stopped
| onClickStop?: () => void; | |
| onStopButtonClick?: () => void; |
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.
I wanted to preserve a similar pattern used for MessageActions. what about onClickStopButton?
| return; | ||
| } | ||
|
|
||
| if (isLoading && onClickStop) { |
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.
why would the submit handler be fired if isLoading is true? Shouldn't those be separate events?
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.
Oh I see, isLoading is a proxy for "submit event is actually a stop event"
IMO this feels brittle, and we should either have separate events for "submit" and "stop",
or inspect the event object for a payload to determine the intent of this click event
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.
I will split up the buttons and handlers :)
| return; | ||
| } | ||
|
|
||
| if (isLoading && onClickStop) { |
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.
Oh I see, isLoading is a proxy for "submit event is actually a stop event"
IMO this feels brittle, and we should either have separate events for "submit" and "stop",
or inspect the event object for a payload to determine the intent of this click event
| expect(sendButton).not.toHaveAttribute('aria-disabled', 'true'); | ||
| }); | ||
|
|
||
| test('calls onClickStop when button is clicked during loading state', () => { |
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.
do we have visual tests that assert the stop button icon & label?
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.
We have the generated stories showing different IconButton instances, but there is no visible label rendered with it
7637526 to
ae49f3f
Compare
| shouldRenderButtonText={shouldRenderButtonText} | ||
| state={state} | ||
| /> | ||
| {isLoading && isCompact ? ( |
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.
nit: not a huge deal, but maybe a more explicit shouldRenderStopButton?
Or even a utility component with a switch if this ever gets more complex
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.
Going to leave as-is. I don't foresee it getting more complicated than this, and it will be further simplified with this ticket to remove spacious variant code
* 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
…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 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)
* Updates Popover RefEl calculation hook * adds documentation to useObjectDependency * Adds maxHeight/maxWidth props to popover * install faker * Update Popover.types.ts * Create popover-max-height.md * Update Popover.styles.ts * adds moving Popover story * Update Popover.tsx * 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]> * menu dev deps * removes redundant useMemo from useMenuHeight * Update Menu.tsx * Refactors menu to use Popover max height * fix css * Squashed commit of the following: commit ef96910 Author: Adam Thompson <[email protected]> Date: Thu Oct 16 18:48:12 2025 -0400 adds moving Popover story commit 17c0f61 Author: Adam Thompson <[email protected]> Date: Thu Oct 16 16:34:07 2025 -0400 Update Popover.styles.ts commit 71837b0 Author: Adam Thompson <[email protected]> Date: Thu Oct 16 16:02:02 2025 -0400 Create popover-max-height.md commit 764d15c Author: Adam Thompson <[email protected]> Date: Thu Oct 16 15:56:12 2025 -0400 Update Popover.types.ts commit 6414ff2 Author: Adam Thompson <[email protected]> Date: Thu Oct 16 15:56:06 2025 -0400 install faker commit 9419b41 Author: Adam Thompson <[email protected]> Date: Thu Oct 16 15:12:35 2025 -0400 Adds maxHeight/maxWidth props to popover commit 175de17 Author: Adam Thompson <[email protected]> Date: Wed Oct 15 16:37:22 2025 -0400 adds documentation to useObjectDependency * Update Popover.tsx * add MovingMenuTrigger story * changesets * Update .changeset/popover-max-height.md Co-authored-by: Stephen Lee <[email protected]> * Update packages/popover/src/Popover/Popover.types.ts Co-authored-by: Stephen Lee <[email protected]> * Update Popover.stories.tsx * Squashed commit of the following: 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) * add inline definition snapshot delay * Update packages/menu/src/Menu.stories.tsx Co-authored-by: Copilot <[email protected]> * lint fix --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Stephen Lee <[email protected]>
✍️ Proposed changes
This PR improves the send button disabled state during loading. Key changes include:
onClickStopprop that fires when the stop button is clicked during loading staterestorePreviousMessagehelper function used by both stop and error state handlingdisabledanddisableSendprops still take precedence and will disable the button regardless of loading state🎟️ Jira ticket: LG-5600
✅ Checklist
pnpm changesetand documented my changes🧪 How to test changes
Test basic stop functionality:
InputBarwithstate={State.Loading}andonClickStophandleronClickStopis calledTest message restoration:
Test disabled state precedence:
disabled={true}ordisableSend={true}withstate={State.Loading}Test error state behavior:
Run tests:
pnpm test -- --testPathPattern=input-bar- all 28 tests should passVisual testing: Check Storybook to verify no console warnings in compact variant