-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Replace "Add new post" link text with more meaningful Label (v2) #62277
Replace "Add new post" link text with more meaningful Label (v2) #62277
Conversation
…label of current post type.
…) directly in React components
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @carstingaxion! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
Dear @t-hamano , please could you take a look, once more? |
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.
Thanks for the PR! This PR seems to work as expected.
Post:
Page:
In order to ship this PR, we need to merge the latest trunk into it (See this Slack comment). Would you be willing to try this?
The following steps should do the trick:
- Check out the trunk branch:
git checkout trunk
- Fetch the latest changes from upstream:
git fetch upstream
- Incorporate the upstream changes into the trunk branch of your local repo:
git merge upstream/trunk
- Check out the branch this PR was submitted in:
git checkout feature/better-create-new-post-link-v2
- Merge trunk branch:
git merge trunk
- Push to the remote branch:
git push origin feature/better-create-new-post-link-v2
I tried. And with your detailed & friendly explanation, things went surprisingly well on my side. Thank you very much @t-hamano !!! Now, let's see what happens over here. |
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.
Thanks for the update! The merge is done correctly 👍
Thank you for not giving up and helping me to reach the finish line! Thank you very much @t-hamano . |
…dPress#62277) * Replace "Add new post" link text with more meaningful 'add_new_item' label of current post type. * Avoid rendering the CreateNewPostLink component itself if postType is falsy * Follow recommendation to use useSelect hook, instead of using select() directly in React components Co-authored-by: carstingaxion <carstenbach@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
I messed up my first PR on the same thing, this is my 2nd try in which I followed all suggestions from the review by @t-hamano review. 🙏 Thank you for your kindness!
What?
This PR replaces the static "Add new post" link text inside the the query block, with a more meaningful label from the currently selected post type.
Why?
This PR is polishing the existing UI with data, that is already available, without introducing any new elements.
How?
Removes a static text string, with the
add_new_item
label from the currently selected post type.Testing Instructions
CreateNewPostLink
element.Testing Instructions for Keyboard
Test can be done by keyboard as well, without any additions to my Testing Instruction.
Screenshots or screencast
Before
Bildschirmaufzeichnung.vom.11.03.2024.03.51.53.mp4
After
Bildschirmaufzeichnung.vom.11.03.2024.03.56.18.mp4