Skip to content
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

Updated paper-button #324

Conversation

jorgelainfiesta
Copy link

Hi,

Here's the PR for the update to paper-button, jscs and tests are passing. I'll thank you all for the comments.

Jorge L

noSpan: Ember.computed('no-span', function() {
return this.get('no-span');
}),
noSpan: computed.readOnly('no-span'),

// RippleMixin overrides
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this comment.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@miguelcobain
Copy link
Collaborator

create the test:

uses md-icon-button class when iconButton=true

@miguelcobain miguelcobain added this to the 1.0 milestone Mar 28, 2016
'icon-button:md-icon-button',
'focus:md-focused',
'themed:md-default-theme',
'themed:md-button'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok done. I also added paper-button class.

@miguelcobain
Copy link
Collaborator

create the test:

uses md-raised class when raised=true

classNameBindings: [
'raised:md-raised',
'icon-button:md-icon-button',
'focus:md-focused',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is pointless. BaseFocusable already has such a binding: https://github.com/miguelcobain/ember-paper/blob/wip/v1.0.0/addon%2Fcomponents%2Fbase-focusable.js#L14

Also, focus was renamed to focused. Anyway, this logic is no longer handled in paper-button.

@miguelcobain
Copy link
Collaborator

Thanks for the PR! I've added some notes. Thanks.

@jorgelainfiesta
Copy link
Author

Thanks for the comments! Sorry I'm so slow, have had very busy days. I'll push the changes later today.

@jorgelainfiesta
Copy link
Author

Changes are up :)

'raised:md-raised',
'iconButton:md-icon-button',
'themed:md-default-theme',
'themed:md-button'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these classes should be hardcoded into classNames directly.
Remove themed property.

@miguelcobain
Copy link
Collaborator

@jorgelainfiesta I've reviewed again. I think that is all. It will be an awesome button! 😄

@miguelcobain
Copy link
Collaborator

@jorgelainfiesta ping

@jorgelainfiesta
Copy link
Author

Oh I forgot to push changes (facepalm)

@jorgelainfiesta
Copy link
Author

Oh apparently I only made the changes in my mind, sorry. Doing changes now, should take only a few mins.

this.sendAction('action', this.get('param'), event);
let onClick = this.get('onClick');
if (isPresent(onClick)) {
this.get('onClick')(event);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use this.sendAction('onClick'):

  1. it is compatible with closure actions
  2. you don't need to check if an action exists that way

@jorgelainfiesta
Copy link
Author

All changes are up :)

}

return this.get('bubbles');
let onClick = this.get('onClick');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onClick is unused.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, missed it.

@miguelcobain miguelcobain merged commit 6396fad into adopted-ember-addons:wip/v1.0.0 Apr 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants