Skip to content

Commit

Permalink
Fix: tooltips added back + moved top level
Browse files Browse the repository at this point in the history
  • Loading branch information
folletto committed Dec 18, 2015
1 parent 32a21f1 commit 813e083
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions client/layout/masterbar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export default React.createClass( {
icon={ this.wordpressIcon() }
onClick={ this.clickMySites }
isActive={ this.isActive( 'sites' ) }
tooltip={ this.translate( 'View a list of your sites and access their dashboards', { textOnly: true } ) }
>
{ this.props.user.get().visible_site_count > 1
? this.translate( 'My Sites', { comment: 'Toolbar, must be shorter than ~12 chars' } )
Expand All @@ -81,6 +82,7 @@ export default React.createClass( {
icon="reader"
onClick={ this.clickReader }
isActive={ this.isActive( 'reader' ) }
tooltip={ this.translate( 'Read the blogs and topics you follow', { textOnly: true } ) }
>
{ this.translate( 'Reader', { comment: 'Toolbar, must be shorter than ~12 chars' } ) }
</Item>
Expand All @@ -90,6 +92,7 @@ export default React.createClass( {
user={ this.props.user }
isActive={ this.isActive( 'post' ) }
className="masterbar__item-new"
tooltip={ this.translate( 'Create a New Post', { textOnly: true } ) }
>
{ this.translate( 'New Post' ) }
</Publish>
Expand All @@ -98,6 +101,7 @@ export default React.createClass( {
icon="user-circle"
isActive={ this.isActive( 'me' ) }
className="masterbar__item-me"
tooltip={ this.translate( 'Update your profile, personal settings, and more', { textOnly: true } ) }
>
<Gravatar user={ this.props.user.get() } alt="Me" size={ 18 } />
<span className="masterbar__item-me-label">
Expand All @@ -109,6 +113,7 @@ export default React.createClass( {
onClick={ this.clickNotifications }
isActive={ this.isActive( 'notifications' ) }
className="masterbar__item-notifications"
tooltip={ this.translate( 'Manage your notifications', { textOnly: true } ) }
>
<span className="masterbar__item-notifications-label">{ this.translate( 'Notifications', { comment: 'Toolbar, must be shorter than ~12 chars' } ) }</span>
</Notifications>
Expand Down
3 changes: 2 additions & 1 deletion client/layout/masterbar/notifications.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default React.createClass( {
isActive: React.PropTypes.bool,
className: React.PropTypes.string,
onClick: React.PropTypes.func,
tooltip: React.PropTypes.string,
},

getInitialState() {
Expand Down Expand Up @@ -114,7 +115,7 @@ export default React.createClass( {
icon="bell"
onClick={ this.toggleNotesFrame }
isActive={ this.props.isActive }
tooltip={ this.translate( 'Manage your notifications', { textOnly: true } ) }
tooltip={ this.props.tooltip }
className={ classes }
>
{ this.props.children }
Expand Down
6 changes: 3 additions & 3 deletions client/layout/masterbar/publish.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export default React.createClass( {
user: React.PropTypes.object,
sites: React.PropTypes.object,
isActive: React.PropTypes.bool,
className: React.PropTypes.string
className: React.PropTypes.string,
tooltip: React.PropTypes.string,
},

getInitialState() {
Expand Down Expand Up @@ -78,7 +79,6 @@ export default React.createClass( {

render() {
const classes = classNames( this.props.className );
const tooltip = this.translate( 'Create a New Post', { textOnly: true } );
const currentSite = this.props.sites.getSelectedSite() || this.props.user.get().primarySiteSlug;
const newPostPath = paths.newPost( currentSite );

Expand All @@ -90,7 +90,7 @@ export default React.createClass( {
onClick={ this.onClick }
onPreload={ this.onPreload }
isActive={ this.props.isActive }
tooltip={ tooltip }
tooltip={ this.props.tooltip }
className={ classes }
>
{ this.props.children }
Expand Down

0 comments on commit 813e083

Please sign in to comment.