Skip to content
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

Page list: Display a <span/> instead of a <a/> if the page is trashed #41641

Merged
merged 2 commits into from
May 1, 2020

Conversation

millerf
Copy link
Contributor

@millerf millerf commented Apr 29, 2020

Changes proposed in this Pull Request

  • Page list: Display a un-clickable text (a ) when the page item is deleted,. to prevent a 404

Testing instructions

  • Go to page list
  • Either when searching or in the "deleted" tab, page items cannot be clicked

Fixes #41640
cc @kwight

@lancewillett lancewillett added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. Pages labels Apr 29, 2020
@mmtr mmtr requested a review from a team April 30, 2020 07:59
@mmtr mmtr requested a review from a team April 30, 2020 07:59
@gwwar
Copy link
Contributor

gwwar commented Apr 30, 2020

Thanks for looking into this @millerf ✨ ! This PR tests well for me, but I did notice that the posts list takes a slightly different approach with keeping the link, but not setting an href. I don't have strong feelings on a span vs empty link, but would prefer if we could align the approach for both sections. Let us know which approach you prefer!

Screen Shot 2020-04-30 at 4 17 08 PM

@millerf
Copy link
Contributor Author

millerf commented May 1, 2020

@gwwar Done. I display a <span/>. I am not a great fan of <a/> with empty links...

As a side note, merging <PostItem/> and. <Page/> might be to consider as they do pretty much the same thing and are now visually equivalent...

Copy link
Member

@mmtr mmtr left a comment

Choose a reason for hiding this comment

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

Thanks @millerf!

@mmtr mmtr merged commit 99f4906 into Automattic:master May 1, 2020
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label May 1, 2020
@millerf millerf deleted the fix/trashed-pages-can-be-clicked branch May 1, 2020 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pages: Trashed pages can be clicked on, showing a 404.
5 participants