-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Rewrite URL (Permalink) panel as a popover #42033
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7249665
Rewrite URL (Permalink) panel as a popover
noisysocks 0e54767
Left truncate the URL
noisysocks fcae3aa
Wrap long URLs
noisysocks 3bc218f
Use 'View post' instead of 'URL'
noisysocks f3de20f
Don't show 'View post' if slug is not editable
noisysocks 82766b7
Break long URLs
noisysocks 8ddbcde
Update E2E tests
noisysocks b40835b
Fix unit tests
Mamaduka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,21 +21,21 @@ jest.mock( '@wordpress/compose/src/hooks/use-viewport-match', () => jest.fn() ); | |
describe( 'EditPostPreferencesModal', () => { | ||
describe( 'should match snapshot when the modal is active', () => { | ||
it( 'large viewports', () => { | ||
useSelect.mockImplementation( () => ( { isModalActive: true } ) ); | ||
useSelect.mockImplementation( () => true ); | ||
useViewportMatch.mockImplementation( () => true ); | ||
const wrapper = shallow( <EditPostPreferencesModal /> ); | ||
expect( wrapper ).toMatchSnapshot(); | ||
} ); | ||
it( 'small viewports', () => { | ||
useSelect.mockImplementation( () => ( { isModalActive: true } ) ); | ||
useSelect.mockImplementation( () => true ); | ||
useViewportMatch.mockImplementation( () => false ); | ||
const wrapper = shallow( <EditPostPreferencesModal /> ); | ||
expect( wrapper ).toMatchSnapshot(); | ||
} ); | ||
} ); | ||
|
||
it( 'should not render when the modal is not active', () => { | ||
useSelect.mockImplementation( () => ( { isModalActive: false } ) ); | ||
useSelect.mockImplementation( () => false ); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Select now just returns a boolean used for |
||
const wrapper = shallow( <EditPostPreferencesModal /> ); | ||
expect( wrapper.isEmptyRender() ).toBe( true ); | ||
} ); | ||
|
179 changes: 0 additions & 179 deletions
179
packages/edit-post/src/components/sidebar/post-link/index.js
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
packages/edit-post/src/components/sidebar/post-link/style.scss
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'll fix this in a follow up PR. It points to how we need to set proper
aria-label
s on these buttons. Right now screen readers read them as Public, June 27, example.com/page, Default template which I can't imagine is very useful. It should be something like Select visibility: Public, Change publish date: June 27, Change URL: example.com/page, Change template: Default template.Why a separate PR and not now? Because the issue already exists in
trunk
and I want proper a11y / copy feedback.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.
We can also migrate the e2e tests to Playwright while we are at it 😄 The locator works great with labels.