Skip to content

Commit

Permalink
Remove unused components from ui/ (#54573)
Browse files Browse the repository at this point in the history
* Replace ui tooltip

* Remove ui tooltip

* Remove ui shortcut

* Update changelog

* Remove related unused code

* Reverted unrelated prop change
  • Loading branch information
brookewp authored and mikachan committed Dec 23, 2023
1 parent 3cca31c commit 06608b2
Show file tree
Hide file tree
Showing 20 changed files with 9 additions and 635 deletions.
4 changes: 4 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
- `SlotFill`: Migrate to TypeScript and Convert to Functional Component `<Slot bubblesVirtually />`. ([#51350](https://github.com/WordPress/gutenberg/pull/51350)).


### Internal

- `Tooltip`, `Shortcut`: Remove unused `ui/` components from the codebase ([#54573](https://github.com/WordPress/gutenberg/pull/54573))

## 25.8.0 (2023-09-20)

### Enhancements
Expand Down
14 changes: 5 additions & 9 deletions packages/components/src/color-picker/color-copy-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import { __ } from '@wordpress/i18n';
* Internal dependencies
*/
import { CopyButton } from './styles';
import { Text } from '../text';
import { Tooltip } from '../ui/tooltip';
import Tooltip from '../tooltip';

import type { ColorCopyButtonProps } from './types';

Expand Down Expand Up @@ -56,14 +55,11 @@ export const ColorCopyButton = ( props: ColorCopyButtonProps ) => {

return (
<Tooltip
content={
<Text color="white">
{ copiedColor === color.toHex()
? __( 'Copied!' )
: __( 'Copy' ) }
</Text>
delay={ 0 }
hideOnClick={ false }
text={
copiedColor === color.toHex() ? __( 'Copied!' ) : __( 'Copy' )
}
placement="bottom"
>
<CopyButton
isSmall
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/tooltip/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ function Tooltip( props: TooltipProps ) {
return (
<>
<Ariakit.TooltipAnchor
onBlur={ tooltipStore.hide }
onClick={ hideOnClick ? tooltipStore.hide : undefined }
store={ tooltipStore }
render={ isOnlyChild ? children : undefined }
Expand Down
62 changes: 0 additions & 62 deletions packages/components/src/ui/shortcut/component.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions packages/components/src/ui/shortcut/index.ts

This file was deleted.

This file was deleted.

36 changes: 0 additions & 36 deletions packages/components/src/ui/shortcut/test/index.js

This file was deleted.

21 changes: 0 additions & 21 deletions packages/components/src/ui/tooltip/README.md

This file was deleted.

102 changes: 0 additions & 102 deletions packages/components/src/ui/tooltip/component.js

This file was deleted.

45 changes: 0 additions & 45 deletions packages/components/src/ui/tooltip/content.js

This file was deleted.

10 changes: 0 additions & 10 deletions packages/components/src/ui/tooltip/context.js

This file was deleted.

2 changes: 0 additions & 2 deletions packages/components/src/ui/tooltip/index.js

This file was deleted.

26 changes: 0 additions & 26 deletions packages/components/src/ui/tooltip/stories/index.story.js

This file was deleted.

Loading

0 comments on commit 06608b2

Please sign in to comment.