-
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
Chrome: Adding the post excerpt panel #871
Conversation
@jasmussen Oh sorry about this, I was testing with a saved post. It should be ok now. |
Love it. 👍 from me. Also 🔥 this is going fast! |
Looks good to me too. I think there might be some accessibility concerns, but maybe best to fix in a separate PR. Maybe the area needs a label? |
Also adds an aria-label to the excerpt
editor/sidebar/post-excerpt/index.js
Outdated
</a> | ||
</PanelBody> | ||
); | ||
/* eslint-enable jsx-a11y/label-has-for */ |
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 this needed?
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.
Good catch (Ah copy/paste)
editor/sidebar/post-excerpt/index.js
Outdated
excerpt: getEditedPostExcerpt( state ), | ||
} ), | ||
( dispatch ) => { | ||
return { |
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.
Minor: Should we be consistent with how we're creating object return values between mapStateToProps
and mapDispatchToProps
, i.e. either with an explicit return in both, or implied here:
( dispatch ) => ( {
onUpdateExcerpt( excerpt ) {
dispatch( editPost( { excerpt } ) );
},
} )
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.
Right! do you have a preference. I'm leaning towards the explicit return (less magic) but I'm ok with both
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 don't feel strongly. I personally prefer the compact version, but understand that it can be a bit more difficult to interpret (largely because of the need to wrap parentheses for an implicit object return value).
closes #856