-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feat(table): BS V4.beta.2 New responsive breakpoints and table-dark class #1222
Conversation
V4.beta.2 adds responsive breakpoint support, and changes class `table-inverse` to `table-dark`
Codecov Report
@@ Coverage Diff @@
## dev #1222 +/- ##
==========================================
+ Coverage 32.91% 32.92% +0.01%
==========================================
Files 109 109
Lines 2865 2870 +5
Branches 890 892 +2
==========================================
+ Hits 943 945 +2
- Misses 1546 1548 +2
- Partials 376 377 +1
Continue to review full report at Codecov.
|
Should the |
I think we could add deprecation notice in docs and at runtime as usual we do with deprecated things, and after a pair of versions delete it. |
To align more closely with new class name
lib/components/table.vue
Outdated
@@ -407,14 +413,22 @@ export default { | |||
}); | |||
}, | |||
computed: { | |||
computedDark() { |
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.
At carousel-slide more laconic deprecation procedure at img-src
and src
props definition. And without extra variable.
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 like this
dark: {
// Replaces prop `inverse`
type: Boolean,
default() {
if (this && this.inverse !== null) {
// Deprecate inverse
warn("b-table: prop 'inverse' has been deprecated. Use 'dark' instead");
return this.inverse;
}
return false;
}
},
inverse: {
// Deprecated in v1.0.0.beta.10 in favor of `dark`
type: Boolean,
default: null
},
lib/components/table.vue
Outdated
@@ -148,7 +148,7 @@ function recToString(obj) { | |||
|
|||
return toString(keys(obj).reduce((o, k) => { | |||
// Ignore fields that start with _ | |||
if (!/^_/.test(k)) { | |||
if (!'/^_/'.test(k)) { |
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't have quotes around a literal regex
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.
Yep, my bad english... eslint recommended parens not quotes ))
@@ -148,7 +148,7 @@ function recToString(obj) { | |||
|
|||
return toString(keys(obj).reduce((o, k) => { | |||
// Ignore fields that start with _ | |||
if (!/^_/.test(k)) { | |||
if (!(/^_/).test(k)) { |
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.
Literal RegExpr shouldn't need wrapping in brackets.
If ES Lint is complaining, then try this:
if (!(/^_/.test(k)))
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.
it works good with this if (!(/^_/).test(k)) {
As for me, it good now. |
Bootstrap-V4-beta.2 adds responsive breakpoint support (
.table-responsive-{sm|md|lg|xl}
), and changes classtable-inverse
totable-dark
for "inverse" tables.For backwards compatibility, the
inverse
prop is still available, but the propdark
deprecatesinverse
.Addresses issue #747