From 6003d397d3eb520e72af7c0a41cf79d9b13275c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Tue, 13 Aug 2019 11:50:07 +0200 Subject: [PATCH 01/33] feat(table): remove deprecations --- src/components/nav/nav.spec.js | 55 ------------------- src/components/table/README.md | 27 ++------- .../table/helpers/mixin-filtering.js | 38 ++----------- src/components/table/helpers/mixin-items.js | 3 +- .../table/helpers/mixin-tbody-row.js | 6 +- src/components/table/helpers/mixin-thead.js | 19 +------ .../table/helpers/normalize-fields.js | 8 --- .../table/helpers/normalize-fields.spec.js | 34 ------------ src/components/table/package.json | 24 -------- .../table/table-row-details.spec.js | 2 +- .../table/table-tbody-row-events.spec.js | 12 ++-- .../table/table-tfoot-events.spec.js | 6 +- .../table/table-thead-events.spec.js | 6 +- 13 files changed, 25 insertions(+), 215 deletions(-) diff --git a/src/components/nav/nav.spec.js b/src/components/nav/nav.spec.js index 9837918e745..00adb817b9f 100644 --- a/src/components/nav/nav.spec.js +++ b/src/components/nav/nav.spec.js @@ -37,19 +37,6 @@ describe('nav', () => { expect(wrapper.text()).toBe('foobar') }) - it('supports "is-navbar-nav" mode', async () => { - const wrapper = mount(BNav, { - propsData: { - isNavBar: true - } - }) - - expect(wrapper.is('ul')).toBe(true) - expect(wrapper.classes()).toContain('navbar-nav') - expect(wrapper.classes().length).toBe(1) - expect(wrapper.text()).toBe('') - }) - it('applies pill style', async () => { const wrapper = mount(BNav, { propsData: { @@ -64,20 +51,6 @@ describe('nav', () => { expect(wrapper.text()).toBe('') }) - it("doesn't apply pill style when in 'is-navbar-nav' mode", async () => { - const wrapper = mount(BNav, { - propsData: { - pills: true, - isNavBar: true - } - }) - - expect(wrapper.is('ul')).toBe(true) - expect(wrapper.classes()).toContain('navbar-nav') - expect(wrapper.classes().length).toBe(1) - expect(wrapper.text()).toBe('') - }) - it('applies tab style', async () => { const wrapper = mount(BNav, { propsData: { @@ -92,20 +65,6 @@ describe('nav', () => { expect(wrapper.text()).toBe('') }) - it("doesn't apply tab style when in 'is-navbar-nav' mode", async () => { - const wrapper = mount(BNav, { - propsData: { - tabs: true, - isNavBar: true - } - }) - - expect(wrapper.is('ul')).toBe(true) - expect(wrapper.classes()).toContain('navbar-nav') - expect(wrapper.classes().length).toBe(1) - expect(wrapper.text()).toBe('') - }) - it('applies vertical style', async () => { const wrapper = mount(BNav, { propsData: { @@ -120,20 +79,6 @@ describe('nav', () => { expect(wrapper.text()).toBe('') }) - it("doesn't apply vertical style when in 'is-navbar-nav' mode", async () => { - const wrapper = mount(BNav, { - propsData: { - vertical: true, - isNavBar: true - } - }) - - expect(wrapper.is('ul')).toBe(true) - expect(wrapper.classes()).toContain('navbar-nav') - expect(wrapper.classes().length).toBe(1) - expect(wrapper.text()).toBe('') - }) - it('applies justify style when justified', async () => { const wrapper = mount(BNav, { propsData: { diff --git a/src/components/table/README.md b/src/components/table/README.md index aa5b82ecc0c..9f4c52b52e3 100644 --- a/src/components/table/README.md +++ b/src/components/table/README.md @@ -876,21 +876,13 @@ function. ### Scoped field slots -CHANGED in 2.0.0-rc.28 - Scoped field slots give you greater control over how the record data appears. If you want to add an extra field which does not exist in the records, just add it to the `fields` array, And then reference the field(s) in the scoped slot(s). Scoped field slots use the following naming syntax: `'[' + field key + ']'`. -NEW in 2.0.0-rc.28 You can use the default _fall-back_ -scoped slot `'[]'` to format any cells that do not have an explicit scoped slot provided. - -DEPRECATION in 2.0.0-rc.28 Versions prior to -`2.0.0-rc.28` did not surround the field key with square brackets, which could cause slot name -collisions (i.e. if you had a field key `default`). Using the old field slot names has been -deprecated in favour of the new bracketed syntax, and support will be removed in a future release. -Users are encouraged to switch to the new bracketed syntax. +You can use the default _fall-back_ scoped slot `'[]'` to format any cells that do not have an +explicit scoped slot provided. **Example: Custom data rendering with scoped slots** @@ -1088,8 +1080,6 @@ formatted value as a string (HTML strings are not supported) ## Header and Footer custom rendering via scoped slots -CHANGED in 2.0.0-rc.28 - It is also possible to provide custom rendering for the tables `thead` and `tfoot` elements. Note by default the table footer is not rendered unless `foot-clone` is set to `true`. @@ -1098,14 +1088,8 @@ Scoped slots for the header and footer cells uses a special naming convention of not provided, but a `'HEAD[...]'` slot is provided, then the footer will use the `'HEAD[...]'` slot content. -NEW in 2.0.0-rc.28 You can use a default _fall-back_ -scoped slot `'HEAD[]'` or `'FOOT[]'` to format any header or footer cells that do not have an -explicit scoped slot provided. - -DEPRECATION in 2.0.0-rc.28 Versions prior to -`2.0.0-rc.28` used slot names `'HEAD_'` and `'FOOT_'`. Using the old slot names has been -deprecated in favour of the new bracketed syntax, and support will be removed in a future release. -Users are encouraged to switch to the new bracketed syntax. +You can use a default _fall-back_ scoped slot `'HEAD[]'` or `'FOOT[]'` to format any header or +footer cells that do not have an explicit scoped slot provided. ```html @@ -798,9 +798,9 @@ function. Scoped field slots give you greater control over how the record data appears. If you want to add an extra field which does not exist in the records, just add it to the `fields` array, And then reference the field(s) in the scoped slot(s). Scoped field slots use the following naming syntax: -`'[' + field key + ']'`. +`'cell[' + field key + ']'`. -You can use the default _fall-back_ scoped slot `'[]'` to format any cells that do not have an +You can use the default _fall-back_ scoped slot `'cell[]'` to format any cells that do not have an explicit scoped slot provided. **Example: Custom data rendering with scoped slots** @@ -810,22 +810,22 @@ explicit scoped slot provided.
-