Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/fields/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Show a "Privacy Policy Page" badge next to the title of the page assigned in Settings > Privacy, alongside the existing "Homepage" and "Posts Page" badges ([#82422](https://github.com/WordPress/gutenberg/pull/82422)).
- Append an ellipsis (`…`) to the labels of the actions that open a dialog requiring further input or confirmation (`Delete…`, `Trash…`, `Permanently delete…`, `Rename…`, `Duplicate…`, `Reset…`, `Order…`), following the menu ellipsis guideline. The dialog titles keep the ellipsis-free wording. ([#81994](https://github.com/WordPress/gutenberg/pull/81994))
- `PageTitleView`: Migrate the page-type badge from the private Components `Badge` to `@wordpress/ui` `Badge`. ([#82499](https://github.com/WordPress/gutenberg/pull/82499))

### Bug Fixes

Expand Down
6 changes: 2 additions & 4 deletions packages/fields/src/fields/page-title/view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ import { __ } from '@wordpress/i18n';
import { useSelect } from '@wordpress/data';
import { store as coreStore } from '@wordpress/core-data';
import type { Settings } from '@wordpress/core-data';
import { privateApis as componentsPrivateApis } from '@wordpress/components';
import { Badge } from '@wordpress/ui';
import type { CommonPost } from '../../types';
import { BaseTitleView } from '../title/view';
import { unlock } from '../../lock-unlock';
const { Badge: WCBadge } = unlock( componentsPrivateApis );

export default function PageTitleView( { item }: { item: CommonPost } ) {
const { frontPageId, postsPageId, privacyPolicyPageId } = useSelect(
Expand Down Expand Up @@ -34,7 +32,7 @@ export default function PageTitleView( { item }: { item: CommonPost } ) {
}
return (
<BaseTitleView item={ item } className="fields-field__page-title">
{ badge && <WCBadge>{ badge }</WCBadge> }
{ badge && <Badge>{ badge }</Badge> }
</BaseTitleView>
);
}
5 changes: 0 additions & 5 deletions tools/eslint/suppressions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7300,11 +7300,6 @@
"count": 2
}
},
"packages/fields/src/fields/page-title/view.tsx": {
"no-restricted-imports": {
"count": 1
}
},
"packages/fields/src/fields/parent/parent-edit.tsx": {
"@wordpress/use-recommended-components": {
"count": 1
Expand Down
5 changes: 0 additions & 5 deletions tools/validation/check-private-apis.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@
"package": "fields",
"via": "packages/patterns/src/index.js"
},
{
"comment": "Unlocks private APIs of @wordpress/components. Remove when the unlocked surface goes public.",
"package": "fields",
"via": "packages/components/src/private-apis.ts"
},
{
"comment": "The package's own private cross-package API usage, tracked file-by-file by the private-apis lint suppressions. Remove when the package stops using private APIs.",
"package": "fields",
Expand Down
Loading