From 599b7127d19a8407dfaf78f73ac4fba595465256 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Tue, 13 Aug 2019 21:02:31 -0300 Subject: [PATCH 1/3] feat(b-form-group): remove deprecated slot `horizontal` --- src/components/form-group/form-group.js | 27 ------------------------- 1 file changed, 27 deletions(-) diff --git a/src/components/form-group/form-group.js b/src/components/form-group/form-group.js index a14f550ff76..ca68870d338 100644 --- a/src/components/form-group/form-group.js +++ b/src/components/form-group/form-group.js @@ -25,9 +25,6 @@ const NAME = 'BFormGroup' // Selector for finding first input in the form-group const SELECTOR = 'input:not([disabled]),textarea:not([disabled]),select:not([disabled])' -const DEPRECATED_MSG = - 'Props "horizontal" and "breakpoint" are deprecated. Use "label-cols(-{breakpoint})" props instead.' - // Render helper functions (here rather than polluting the instance with more methods) const renderInvalidFeedback = (h, ctx) => { const content = ctx.normalizeSlot('invalid-feedback') || ctx.invalidFeedback @@ -235,18 +232,6 @@ const generateProps = () => { disabled: { type: Boolean, default: false - }, - horizontal: { - // Deprecated - type: Boolean, - default: false, - deprecated: DEPRECATED_MSG - }, - breakpoint: { - // Deprecated (ignored if horizontal is not true) - type: String, - default: null, // legacy value 'sm', - deprecated: DEPRECATED_MSG } } } @@ -268,18 +253,6 @@ export const BFormGroup = { computed: { labelColProps() { const props = {} - /* istanbul ignore next: deprecated */ - if (this.horizontal) { - // Deprecated setting of horizontal/breakpoint props - /* istanbul ignore next */ - warn(`b-form-group: ${DEPRECATED_MSG}`) - // Legacy default is breakpoint sm and cols 3 - const bp = this.breakpoint || getBreakpointsUpCached()[1] // 'sm' - const cols = parseInt(this.labelCols, 10) || 3 - props[bp] = cols > 0 ? cols : 3 - // We then return the single breakpoint prop for legacy compatibility - return props - } getBreakpointsUpCached().forEach(breakpoint => { // Grab the value if the label column breakpoint prop let propVal = this[makePropName(breakpoint, 'labelCols')] From bcb96f321d72f0a970320187c30333cf361a0e52 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Tue, 13 Aug 2019 21:06:42 -0300 Subject: [PATCH 2/3] Update form-group.js --- src/components/form-group/form-group.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/form-group/form-group.js b/src/components/form-group/form-group.js index ca68870d338..58d6fce2143 100644 --- a/src/components/form-group/form-group.js +++ b/src/components/form-group/form-group.js @@ -1,7 +1,6 @@ // Utils import memoize from '../../utils/memoize' import upperFirst from '../../utils/upper-first' -import warn from '../../utils/warn' import { arrayIncludes } from '../../utils/array' import { getBreakpointsUpCached } from '../../utils/config' import { select, selectAll, isVisible, setAttr, removeAttr, getAttr } from '../../utils/dom' From 57ee37422a28312c64a85790c4ff28fc67849599 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Tue, 13 Aug 2019 21:28:48 -0300 Subject: [PATCH 3/3] Update README.md --- src/components/form-group/README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/form-group/README.md b/src/components/form-group/README.md index 5f6365c7625..c97bd136d32 100644 --- a/src/components/form-group/README.md +++ b/src/components/form-group/README.md @@ -110,14 +110,11 @@ of the width of the rendered row (handy if you have custom Bootstrap with an odd ``` -**Deprecation warning:** The props `horizontal` and `breakpoint` have been deprecated in favour of -using the `label-cols` and `label-cols-{breakpoint}` props. - ### Label size You can control the label text size match the size of your form input(s) via the optional `label-size` prop. Values can be `'sm'` or `'lg'` for small or large label, respectively. Sizes work -for both `horizontal` and non-horizontal form groups. +for both horizontal and non-horizontal form groups. ```html