-
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
Move post permalink to beneath title on mobile. #16277
Conversation
Thank you for taking this on, @tellthemachines! This seems like a good fix. I'm seeing just a couple small visual bugs that should be sorted out:
|
Thanks for the feedback @kjellr! Should be all fixed now. |
Thank you, @tellthemachines. These latest updates look excellent.
This was at small breakpoints, under 480px (I saw it using the Chrome device inspector). However, after 6ac67da, this problem has disappeared. 🎉 The margins look great now. Just one last tiny observation — is it possible to add some top margin (maybe just 8px, via our Thanks again, this is very close. |
@kjellr :
There's no way of targeting the button specifically when it wraps, as that depends on how long its text content is; the best I could do was give a 4px top and bottom margin to each of the elements in that container, but that means spacing is slightly increased overall (only at the smallest breakpoint though): Is that OK? |
Yeah, you have to change the permalink format to one that has a post slug (using that Change Permalinks button), and after that the button becomes an edit button. I had a test of the branch and it looks really good 👍
I was thinking along similar lines. An option would be to reduce the container's top and bottom padding so that the spacing is still the same. Any other ideas @kjellr? I also noticed the container feels like it has a lot more space at the top than the bottom when it wraps to multiple lines. It seems as though the copy link icon has a lot of padding around it that causes this. |
I think some combination of these is the best bet. I'd recommend:
Here's what that ends up looking like: And here's a quick diff of those changes:
Also — the reason that has extra padding is because it's actually a button! 😄 As such, I don't think we should remove any of its padding for now: |
It's a pretty secretive button! Agreed about not removing padding then, I suppose it needs to stay above a minimum button size. |
I wonder if we should remove this for now on mobile, and later from desktop too. Once the title is a proper block, we could use the block toolbar to place it, or just keep it in the document sidebar. |
I'd be 100% happy with that change. 🙂 The document sidebar seems like the more natural place for this control — we don't really need it here. |
+100 to moving this control to the document sidebar. The current placement is more of a carry-over from the classic editor, but for users who don't already have that mental model, it makes more sense to include this setting with all the other document settings. The association with document settings is stronger than the association with the title element, and it's a more natural place for users to look to find this setting. Moving it into the sidebar may help make it more discoverable to users, and reinforces the idea that stuff in the main content area is content that appears in your post, where stuff in the sidebar is settings for that content. |
Moving this control to the sidebar sounds great. I do think we should remove it on mobile and desktop at once though, otherwise we risk someone zooming in on the control only to find it has disappeared. For accessibility purposes, mobile is also desktop at a higher zoom level, so moving things from one place to another should be done across all breakpoints simultaneously. Question, @mtias @kjellr @sarahmonster : are you recommending doing that straightaway on this PR, or would it be better to create a separate issue for it? Asking mainly because I'm unsure of the amount of work involved in that change. |
Agreed! More consistency across platforms, especially in the case you reference, is always good. I'd recommend opening a new issue and PR for this change, so we can keep things as atomic as possible. |
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 tested this in a few devices and think it's good to merge now. Thanks for working on this @tellthemachines.
…rnmobile/track-unsupported-blocks * 'master' of https://github.com/WordPress/gutenberg: Bump plugin version to 6.1.0-rc.1 Update HTML anchor explaination text (#16142) Move post permalink to beneath title on mobile. (#16277) Export cloneBlock method to the mobile (#16441) Fix inconsistent references to Settings Sidebar (#16138) Adds a cache key to the blocks reducer in order to optimize the getBlock selector (#16407) Track the parent block to optimize hierarchy selectors (#16392)
Description
Un-positioned post permalink in the editor title block for smallest breakpoint, so it flows below the title and its contents can wrap without breaking layout. On larger breakpoints it is still absolutely positioned.
How has this been tested?
Manually tested at different widths and zoom levels on Chrome, Safari (Mac) and IE (Windows 7).
Screenshots
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: