-
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
UI: Add a fullscreen mode #9567
Conversation
@@ -272,6 +272,10 @@ | |||
margin-left: -18px; | |||
} | |||
} | |||
|
|||
body.is-fullscreen-mode #{$selector} { | |||
left: 0 !important; |
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've used important to avoid overriding all the difference use-case above. It just seemed right :)
This is looking awesome — I really like how fullscreen feels. While using this, I clicked the I'm interested to hear what others think. |
I agree it's not perfect, but the current behavior is very similar to the customizer which is already a familiar fullscreen page for WordPressers |
Damn buttons :P |
This is so good! I am very excited for this and thank you everyone that has worked on this and pushed it along ✨ |
Nice work, this is working better than I would've expected, actually. GIF: The X for close is working well, and is used in other places as well. It's a bit curious, because it feels very right to palace the X on the left here. But in other places, we place it on the right. Is this an inconsistency we want to look at? If yes, I think I'd prefer using a plain "Close" button rather than moving the X to the right, simply because because "More" menus should always be rightmost as they are to indicate "overflow" of buttons to the left of it, in an LTR reading direction. I suppose an exception could be made, but I'm not sure if it would look weird with the sidebar close button being stacked below. Though we could decide to hide the sidebar close button on the desktop breakpoint, since when it's a sidebar it's easily toggled using the cog. The "back to where you were" isn't working quite as well as I thought it would. I think it might work better if it always took you to the same place — like the posts list. If the "Add new post" button in the toolbar was the primary interface (or only) for creating new posts, "back to where you were" would probably work better. |
I updated this as suggested. |
@@ -105,11 +105,19 @@ body.gutenberg-editor-page { | |||
bottom: 0; | |||
left: 0; | |||
min-height: calc(100vh - #{ $admin-bar-height-big }); | |||
|
|||
body.is-fullscreen-mode & { | |||
min-height: calc(100vh); |
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.
is calc()
necessary in this case?
} | ||
|
||
// The WP header height changes at this breakpoint | ||
@include break-medium { | ||
min-height: calc(100vh - #{ $admin-bar-height }); | ||
|
||
body.is-fullscreen-mode & { | ||
min-height: calc(100vh); |
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.
is calc()
necessary in this case?
<IconButton | ||
icon="no-alt" | ||
href={ addQueryArgs( 'edit.php', { post_type: postType } ) } | ||
label={ __( 'Close' ) } |
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.
Since this button is a link, and communicated as such to assistive technologies users, I'd rather consider to use a label that communicates the link destination instead of an action like "Close", which is more appropriate for buttons. RIght now, the link navigates back to the posts list, and it should communicate that 🙂
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 just used the same label as the customizer originally but yeah it's fine to update. I guess something like Back to post list
or something would work?
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.
It would work for me 👍 Yeah... I know about the Customizer link 🙈
Nice job, also from an a11y perspective (but please see the comment about the "Close" link):
🎉 |
3b49a34
to
e810396
Compare
I decided to use the |
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.
Technically this seems to be working very solidly.
There seems to be wide agreement among the reviewers here that this has value and should be tested. I happen to agree with that.
It also adds value to laptops that have limited screen real estate, like 11 inch laptops, presumably tablets as well. As such, I think we should get this in and iterate.
Love this, thanks for the quick implementation! |
This is the best thing ever, thanks for making it! |
Thank you for all who worked on getting this done, I needed it badly. I have some feedback on exiting/closing the fullscreen mode. TLDR: X at the top left gave the affordance that i can get Out of the Full Screen mode. It should either close the mode or be removed. What did i do:
My expectation: It should’ve got me out of fullscreen mode. Comments
Suggestions:
Let me know how further i can help. |
As per comments in #9567. The `x` icon to close the editor while in fullscreen mode could be misconstrued as a button for exiting out of full screen mode. Since the button actually takes you back to the All Posts screen, a back arrow may make more sense here.
To @SNaushadS 's feedback, there's an iteration being proposed / discussed in #9838 |
@ktmn good catch. I will take a look — I need to look at the fullscreen mode regardless as when an editor style applies a colored background, a bottom padding offsets this. |
As per comments in #9567. The `x` icon to close the editor while in fullscreen mode could be misconstrued as a button for closing full screen mode. Since the button actually takes you back to the All Posts screen, an exit icon makes more sense here.
closes #9334
This PR is the second part of #9334 and adds a fullscreen mode.
The CSS contains some "hacks" to allow switching modes without refreshing the page but I think it's fine.