-
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
Add permalinks to the document sidebar #11874
Conversation
In theory we are in a design freeze moment, but from my perspective the current permalink UI is buggy and not discoverable, I consider this PR as a bug fix. |
href={ addQueryArgs( 'options-permalink.php' ) } | ||
target="_blank" | ||
> | ||
{ __( 'Permalink Settings' ) } |
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.
Only show it to user roles who are able to change the settings.
} | ||
|
||
.edit-post-post-link__link { | ||
word-break: break-word; |
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.
Not supported in Firefox, see https://caniuse.com/#feat=word-break notes
word-break: break-word; | |
word-wrap: break-word; |
f4578e8
to
2bdf190
Compare
2bdf190
to
f244b7e
Compare
If the post type has the argument |
I have removed design feedback as this has had a review. |
I think the idea is to remove the current permalink UI as well. |
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 think we need the icon to indicate it's a link that goes out (similar to links) for accessibility, but beyond that approving design. I do wonder why it wasn't an open panel for me, all other document panels were open so it was odd to have this new one not open. I get the logic though.
Hi @youknowriad the issue specifies:
That was the reason why I did not remove the UI from the title yet. |
It makes sense to me to remove it from the content. It's certainly a "Document" setting and is not relevant to blocks (until the Post Title becomes its own block). |
I added an isViewable check in my tests if CPT has publicly_queryable false isViewable also becomes false. |
I was about to open PR to resolve #7002 and #7129 as well as give it feature parity with the classic editor. Code is basically ready—I was literally writing out the description right now. Both of those things are still issues with this new document sidebar panel, but @mtias mentioned the old UI would be removed in #10996. Should I refocus on fixing them in this new panel? Or just abandon the effort? |
That makes sense to me 👍 |
Noticed this PR a bit late (and only because #5494 was closed) so there was no chance to give some accessibility feedback so far. At a first glance, there are a few things that could be improved. 1 2 I've read #11858 (comment) and it makes perfectly sense to avoid technical terms. However, the label could be improved a bit. Also noting Squarespace does use some form of "URL" label but it also expands it adding "slug": I have no strong opinions on which the best wording would be, but I'd suggest to consider a more meaningful one. Will open a new issue for this. 3 4 |
@afercia I addressed a few of those things (like showing on first load instead of on save) in #12009 for the title permalink editor. Ideally if we are keeping both then they would share components since the logic is not straightforward. If we are removing the title permalink editor, then we could port the logic from my PR to this component. |
@earnjam thanks! It's not so clear to me what is the process to deprecate the previous permalink UI and when it will be removed, I'm afraid I can't help so much in making a decision. |
Description
Closes: #11858
This PR adds a permalink panel to the document sidebar, trying to follow the design specified in #11858.
This PR is the first iteration so that we can iterate on the design in parallel.
One missing nice feature is the ability to auto refresh the permalink settings (prefix/suffix) if the settings are changed in another tab, I'm not sure if this feature is a blocker and I wanted to think a little bit better about this part.
How has this been tested?
Verify that if the post is new, the panel does not appear. Some behavior we have on the existing permalink edit UI (close to title).
Verify that if the post does not contains editable permalinks (e.g.: Plain permalink setting) the input is not available and only the post link is shown.
Verify that if the permalink is editable it is possible to edit the permalink without problems and after saving the post the permalink is correctly changed/saved.
Screenshots