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 Sep 21, 2023
1 parent dd7e10a commit fd07def
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 @@ -11,6 +11,10 @@
- `Placeholder`: Improved DOM structure and screen reader announcements ([#45801](https://github.com/WordPress/gutenberg/pull/45801)).
- `DateTimePicker`: fix onChange callback check so that it also works inside iframes ([#54669](https://github.com/WordPress/gutenberg/pull/54669)).

### 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

1 comment on commit fd07def

@github-actions
Copy link

Choose a reason for hiding this comment

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

Flaky tests detected in fd07def.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6266553370
📝 Reported issues:

Please sign in to comment.