-
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
URL: Enhance the way long URLs are handled in filterURLForDisplay #27530
Conversation
Thank you for your contribution. I like this proposal, it improves the experience when presenting the URL. Could you refresh this branch because I see some CI checks failing. I hope it was only intermittent failures inherited from the main development branch. I see that all newly added unit tests pass so this should be good to go. By the way, excellent job covering new functionality with tests. |
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 must admit that the logic introduced is very complex, but the issue isn't simple as well. Fortunately, the tests added made me comfortable accepting this PR.
Let's land this enhancement. Thank you 🎉
Congratulations on your first merged pull request, @hsingyuc! We'd like to credit you for your contribution in the post announcing the next WordPress release, but we can't find a WordPress.org profile associated with your GitHub account. When you have a moment, visit the following URL and click "link your GitHub account" under "GitHub Username" to link your accounts: https://profiles.wordpress.org/me/profile/edit/ And if you don't have a WordPress.org account, you can create one on this page: https://login.wordpress.org/register Kudos! |
@wordpress/url: Add a maxLength argument to filterURLForDisplay. (27530) WordPress/gutenberg#27530
Description
Fix #21100
Add an argument to truncate the URL by max length.
How has this been tested?
Additional tests were added to the
url/src/test/index.tests.js
file.Screenshots
Checklist: