-
-
Notifications
You must be signed in to change notification settings - Fork 333
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
Update grid list #739
Merged
miguelcobain
merged 9 commits into
adopted-ember-addons:master
from
Subtletree:update-grid-list
Jul 19, 2017
Merged
Update grid list #739
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
74354d0
Merge remote-tracking branch 'miguelcobain/master'
Subtletree 9e29f67
Merge remote-tracking branch 'miguelcobain/master'
Subtletree 37f3f6c
Merge remote-tracking branch 'miguelcobain/master'
Subtletree 2a96521
Update grid list
Subtletree e6c2435
New attribute api + reworked internals
Subtletree 8621746
remove leftover comments
Subtletree beb1fa5
Merge remote-tracking branch 'miguelcobain/master' into update-grid-list
Subtletree d4e324c
Remove redundant _updateCurrentMedia
Subtletree 551a63c
Use wait in tests
Subtletree File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{yield (hash | ||
tile=(component 'paper-grid-tile') | ||
)}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<figure> | ||
{{yield}} | ||
{{yield (hash | ||
footer=(component 'paper-grid-tile-footer') | ||
)}} | ||
</figure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { moduleForComponent, test } from 'ember-qunit'; | ||
import hbs from 'htmlbars-inline-precompile'; | ||
|
||
moduleForComponent('paper-grid-list', 'Integration | Component | paper grid list', { | ||
integration: true | ||
}); | ||
|
||
test('it renders tiles with tag name', function(assert) { | ||
assert.expect(1); | ||
|
||
this.render(hbs` | ||
{{#paper-grid-list cols="1" rowHeight="4:3" as |grid|}} | ||
{{#grid.tile}} | ||
{{/grid.tile}} | ||
{{/paper-grid-list}} | ||
`); | ||
|
||
assert.equal(this.$('md-grid-tile').length, 1); | ||
}); | ||
|
||
test('it renders tiles with footer', function(assert) { | ||
assert.expect(1); | ||
|
||
this.render(hbs` | ||
{{#paper-grid-list cols="1" rowHeight="4:3" as |grid|}} | ||
{{#grid.tile as |tile|}} | ||
{{#tile.footer}} | ||
{{/tile.footer}} | ||
{{/grid.tile}} | ||
{{/paper-grid-list}} | ||
`); | ||
|
||
assert.equal(this.$('md-grid-tile-footer').length, 1); | ||
}); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Did you keep dash-cased attributes here on purpose? It is true that size prefixes (
-sm
,-xs
,-lg
, etc) usually are dash-cased. However, I think consistency wins here. Trying to think of a good api for this.Let me know what you think.
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.
Maybe we could take inspiration from https://flexi.readme.io/docs/attributes
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.
Yes, mentioned it in the PR note.
Looks to me that flexi's api is essentially what we have now except we can't use simple names like
sm
andmd
as we have to differentiate between 3 properties with media options instead of flexi's 1.Only reasonable options I can think of are:
a)
cols="1"
cols-gt-xs="2"
b)
cols="1"
colsGtXs="2"
c)
cols="1 gt-xs-2"
Happy with any of these
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 find
colsGtXs
very hard to readThere 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.
@Subtletree how hard could it be to implement c) ?