-
Notifications
You must be signed in to change notification settings - Fork 6
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
Datatable helper #846
Datatable helper #846
Conversation
Also adds new row-actions dropdown pattern
# Only the main Sass file needs front matter (the dashes are enough) | ||
--- | ||
|
||
$blue: #28a8e0; |
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.
Invalid CSS after "$blue: #28a8e0": expected "{", was ";"
} | ||
|
||
pre .deletion { | ||
background-color: #FFC8BD; |
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.
Color #FFC8BD
should be written as #ffc8bd
} | ||
|
||
pre .addition { | ||
background-color: #BAEEBA; |
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.
Color #BAEEBA
should be written as #baeeba
} | ||
|
||
pre .diff .change { | ||
background-color: #BCCFF9; |
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.
Color #BCCFF9
should be written as #bccff9
} | ||
|
||
pre .tex .formula { | ||
background-color: #EEE; |
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.
Color #EEE
should be written as #eee
color: #000; | ||
} | ||
|
||
pre .css .class, pre .css .id { |
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.
Each selector in a comma sequence should be on its own single line
|
||
pre .variable { | ||
color: rgb(63,110,116); | ||
} |
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.
Rule declaration should be followed by an empty line
} | ||
|
||
pre .variable { | ||
color: rgb(63,110,116); |
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.
Commas in function arguments should be followed by one space
pre .setting, | ||
pre .params, | ||
pre .clojure .attribute { | ||
color: rgb(92,38,153); |
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.
Commas in function arguments should be followed by one space
color: rgb(28,0,207); | ||
} | ||
|
||
pre .class .title, |
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.
Selector built_in
should be written in hyphenated BEM (Block Element Modifier) format
Codecov Report
@@ Coverage Diff @@
## develop #846 +/- ##
===========================================
- Coverage 97.36% 96.05% -1.32%
===========================================
Files 56 56
Lines 1973 2002 +29
===========================================
+ Hits 1921 1923 +2
- Misses 52 79 +27
Continue to review full report at Codecov.
|
}); | ||
|
||
|
||
$this.on('click', '.js-select-all', function(e) { |
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.
Really minor (and something we should setup a linter for) we are inconsistent with function ()
vs function()
, I prefer the former.
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.
Something to add to the linter?
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 need to add the linter first 😄
js/PulsarUIComponent.js
Outdated
$allCheckboxes = $this.find('.js-select'); | ||
|
||
if ($checkbox.hasClass('selected')) { | ||
table.rows( { search: 'applied' } ).deselect() |
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.
semicolon
js/PulsarUIComponent.js
Outdated
$checkbox.removeClass('selected'); | ||
$allCheckboxes.removeClass('selected').prop('checked', false); | ||
} else { | ||
table.rows( { search: 'applied' } ).select() |
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.
semicolon
stylesheets/_component.status.scss
Outdated
&.is-offline { | ||
color: #c84d40; | ||
} | ||
} |
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.
Should these be variables?
@@ -7,6 +7,8 @@ var $ = require('jquery'), | |||
tab = require('../../../js/libs/tab'), | |||
PulsarUIComponent = require('../../../js/PulsarUIComponent'); | |||
|
|||
$.fx.off = !$.fx.off; |
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.
Can we explicitly set this to true
or false
? Toggling the value assuming it will always be one or the other seems a bit risky.
@@ -41,7 +41,7 @@ describe('Pulsar UI Component', function() { | |||
|
|||
this.history = { | |||
pushState: sinon.stub() | |||
}; | |||
} |
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 should have a semicolon shouldn't it?
@@ -0,0 +1,5 @@ | |||
source 'https://rubygems.org' |
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.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
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.
What's all the list.js stuff added to libs
?
Creates a new
html.datatable()
helper to easily create fully marked up datatables based on the normal JSON data object that would also work for DTs ajax methods.The helper will use the horizontal scrolling overflow method by default, it can also be set to collapse by setting the
'overflow': 'collapse'
option.Column attributes can be set through the
attrs
option.Basic usage
Data example