-
Notifications
You must be signed in to change notification settings - Fork 183
Add useExitOnCtrlC hook #5924
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
base: shauns/06-02-add_loadingbar_ui_component
Are you sure you want to change the base?
Add useExitOnCtrlC hook #5924
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |
Coverage report
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run success2901 tests passing in 1260 suites. Report generated by 🧪jest coverage report action from 1f9a01f |
3ab608e
to
72137d9
Compare
6805c2f
to
dcc143a
Compare
72137d9
to
d4750fa
Compare
dcc143a
to
8f34fe9
Compare
d4750fa
to
1f9a01f
Compare
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationspackages/cli-kit/dist/private/node/ui/components/LoadingBar.d.tsimport React from 'react';
interface LoadingBarProps {
title: string;
noColor?: boolean;
}
declare const LoadingBar: ({ title, noColor }: React.PropsWithChildren<LoadingBarProps>) => JSX.Element;
export { LoadingBar };
packages/cli-kit/dist/private/node/ui/hooks/use-exit-on-ctrl-c.d.ts/**
* This hook will cause the process to exit when the user presses Ctrl+C.
*/
export declare function useExitOnCtrlC(): void;
Existing type declarationsWe found no diffs with existing type declarations |
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 are these changes introduced?
To improve code organization and maintainability by extracting the Ctrl+C handling logic into a reusable hook.
WHAT is this pull request doing?
Creates a new
useExitOnCtrlC
hook that encapsulates the logic for handling Ctrl+C keyboard input to exit the process. This hook:The Tasks component has been updated to use this new hook, simplifying its implementation.
How to test your changes?
Measuring impact
How do we know this change was effective? Please choose one:
Checklist