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
2 changes: 1 addition & 1 deletion build/link/index.asset.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/link/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/blogroll/__tests__/deprecated.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ const legacy = { links: [ { url: 'https://a.example/', name: 'A' } ] };

describe( 'hasLinkBlocks', () => {
it( 'counts link blocks only', () => {
expect( hasLinkBlocks( [ link( 'https://a.example/' ) ] ) ).toBe( true );
expect( hasLinkBlocks( [ link( 'https://a.example/' ) ] ) ).toBe(
true
);
expect( hasLinkBlocks( [ paragraph ] ) ).toBe( false );
expect( hasLinkBlocks( [] ) ).toBe( false );
expect( hasLinkBlocks( undefined ) ).toBe( false );
Expand Down
8 changes: 8 additions & 0 deletions src/blogroll/components/xfn-control.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ import { ALL_TOKENS, sanitizeXfn } from './xfn';
* A token field over the XFN vocabulary; the group rules are applied
* on every change, so conflicting tokens replace each other.
*
* Typing completes: Enter takes the first match, so "fr" becomes
* "friend". A word that is no relationship stays in the field instead of
* being swallowed, the vocabulary is the one of the XFN spec.
*
* @param {Object} props Component props.
* @param {string[]} props.value Selected tokens.
* @param {Function} props.onChange Change handler.
Expand All @@ -25,6 +29,10 @@ export default function XfnControl( { value = [], onChange } ) {
__next40pxDefaultSize
__nextHasNoMarginBottom
__experimentalExpandOnFocus
__experimentalAutoSelectFirstMatch
__experimentalValidateInput={ ( token ) =>
ALL_TOKENS.includes( token )
}
label={ __( 'Relationship', 'blockroll' ) }
value={ value }
suggestions={ ALL_TOKENS }
Expand Down
Loading