-
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
Plugin: Add update button to plugin list header #2681
Conversation
It looks right—does it work alright when the options collapse to a dropdown? |
}, | ||
|
||
afterResize() { | ||
const actionBarVisible = findDOMNode( this ).offsetWidth > 719 |
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.
We could extract 719
to a const
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 like how this mustachioed guy thinks
I think this improves the current experience for those with languages that are too long for our current button size. It would be better if we could manage to calculate the width of the button set and decide if we show it or the dropdown based on that, but this is a good first step |
@lezama and @johnHackworth What else do you I need to do here before it is ready to merge? |
@enejb in my opinion it's ready to go... it would be nice to extract that 719 to a MIN_VIEWPORT_WIDTH constant (or similar), but apart from that 👍 |
c208ff8
to
b41b3cb
Compare
const actionBarVisible = findDOMNode( this ).offsetWidth > MIN_VIEWPORT_WIDTH; | ||
this.setState( { actionBarVisible } ); | ||
}, | ||
|
||
onBrowserLinkClick() { | ||
analytics.ga.recordEvent( 'Plugins', 'Clicked Add New Plugins' ); | ||
}, | ||
|
||
canAddNewPlugins() { |
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 perhaps more concisely expressed as:
return config.isEnabled( 'manage/plugins/browser' ) && !this.props.isWpCom;
lgtm 👍 |
b41b3cb
to
1e1a08a
Compare
Use the resize event to determine when to show the action bar vs the dropdown.
1e1a08a
to
7312e27
Compare
…ugin-list-header Plugin: Add update button to plugin list header
Before:
After:
To test:
Visit http://calypso.localhost:3000/plugins
go into bulk edit mode select a plugin that needs updating click the update button.
Make sure that everything works as expected when you are on smaller screens. And the are able to update the plugin there as well.