-
Notifications
You must be signed in to change notification settings - Fork 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
Editor: Mobile editor redesign #4456
Conversation
I'll plan to take a closer look soon, but immediate thoughts that come to mind:
|
I'll see what I can do, I'll try to do the needed changes to get this into a shippable state before completing the redesign. I won't start with the action bar though. I have half-done the navigation bar so I'll finish that first. I agree it's better to do incremental PR if possible :) By 'splitting' I mean, for example, the "Publish" button. Before, it was part of the GroundControl component, but with the redesign it's needed both in the mobile navigation bar, and in the desktop GroundControl, so I'm extracting that "tiny" button (which actually has quite a lot of logic) to its own component to minimize code duplication. |
Ah, in which case, I'm totally on board. I had also eventually planned to move the sidebar to its own component, so agree with the idea of doing so here. |
const closeButtonAction = page.back.bind( page, allPostsUrl ); | ||
const closeButtonUrl = ''; | ||
const closeButtonAriaLabel = translate( 'Go back' ); | ||
const EditorSidebarHeader = React.createClass( { |
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.
Could you explain the rationale for moving this from stateless function component to a React.createClass
object? If it's for the pure-render mixin, note that react-redux connect
includes this functionality in its wrapping behavior (docs).
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 was for the PureRenderMixin
, I didn't know about that react-redux
behavior. That was the only reason, so I will revert this change.
3592363
to
57b2415
Compare
Ok, I would say that what I have now it's functionally complete. The navigation bar is complete, the rest is still pending. Here are screenshots of the date picker. What do you think? It's a bit weird that the date picker button grows if the date string is long, but I think the information it provides is useful. |
.editor-ground-control__time-button { | ||
border-radius: 0 4px 4px 0; | ||
@include breakpoint( ">660px" ) { | ||
@include is-primary; |
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.
This is awful. If you have a better alternative to making a button primary
in desktop but normal in mobile, let me know.
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.
This is awful. If you have a better alternative [...]
It doesn't seem that bad to me, to be honest. Seems the primary styling comes more as a consequence of its positioning adjacent the publish button, not that the date picker button is itself a primary action. However, in terms of implementation, instead of creating a separate mixin, could we simply change this to @extend .button.is-primary;
?
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.
@extend
doesn't work inside @media
queries. That was my first approach :(
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.
@extend
doesn't work inside@media
queries. That was my first approach :(
Ah, well, that's a shame, though it at least appears to be an upcoming feature (sass/sass#1050).
Perhaps we'd be better to be more specific with the naming? A global mixin named is-primary
doesn't seem exclusive to its application on a button (button-is-primary
or is-primary-button
come to mind).
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.
Agreed, done.
1cd5be6
to
b6f2e31
Compare
@@ -1,49 +1,45 @@ | |||
/* eslint-disable vars-on-top */ |
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'll rebase and resolve the conflicts on this file when #4550 gets merged.
…ishButton component
…ly on layoutFocus instead
19ab894
to
ea7ba8d
Compare
I couldn't find time to work on the remaining comments, I'll do it this weekend. All the discussion is in the other (related) PR: #4686 , so I'm closing this one to reduce the noise. |
I'm working on #4266, the UI revamp of the mobile post editor. This is by far the most complex task I've started yet, so I'm submitting what I have for now to have early feedback.
The main problem here is that with the new UI (see #4266), desktop and mobile are diverging more and more. I'm trying to tackle it by splitting the editor and sidebar into even smaller components.
What is done:
EditorSidebarHeader
component, since now it's going to be a desktop-specific component.The main UI changes are not yet implemented, so the "mobile" sidebar is still the old one (just now is rendered as a tab). There's still a lot of work to do, but if you could just take a look and tell me if you see something terribly wrong it would be great, so I don't lose time coding the wrong approach to this.
@aduth Feel free to add who you consider relevant to this PR.