Skip to content

Commit 0edac49

Browse files
jacobmllr95tmorehouse
authored andcommitted
feat(tabs): remove deprecations (#3863)
1 parent 249efd9 commit 0edac49

File tree

4 files changed

+6
-42
lines changed

4 files changed

+6
-42
lines changed

src/components/tabs/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,6 @@ Visually move the tab controls to the bottom by setting the prop `end`.
197197
tab pane is the same height and fits completely within the visible viewport, otherwise the user
198198
will need to scroll up to read the start of the tabbed content.
199199

200-
**Note:** _the `bottom` prop has been deprecated in favor of the `end` prop._
201-
202200
## Vertical tabs
203201

204202
Have the tab controls placed on the lefthand side by setting the `vertical` prop to `true`. Vertical
@@ -312,8 +310,6 @@ Use the `tabs-start` slot to place extra tab buttons before the content tab butt
312310
**Note:** extra (contentless) tab buttons should be a `<b-nav-item>` or have a root element of
313311
`<li>` and class `nav-item` for proper rendering and semantic markup.
314312

315-
**DEPRECATION:** The `tabs` slot has been deprecated. please use the `tabs-end` slot instead.
316-
317313
## Add custom content to tab title
318314

319315
If you want to add custom content to tab title, like HTML code, icons, or another non-interactive

src/components/tabs/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@
4343
"name": "tabs-end",
4444
"description": "Additional tab buttons without tab content placed after content tab buttons"
4545
},
46-
{
47-
"name": "tabs",
48-
"description": "Deprecated. Use 'tabs-end' instead. Additional tab buttons without tab content."
49-
},
5046
{
5147
"name": "empty",
5248
"description": "Renders this slot if no tabs are present"

src/components/tabs/tab.js

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ import Vue from '../../utils/vue'
22
import idMixin from '../../mixins/id'
33
import normalizeSlotMixin from '../../mixins/normalize-slot'
44
import BVTransition from '../../utils/bv-transition'
5-
import warn from '../../utils/warn'
6-
7-
const DEPRECATED_MSG = 'Setting prop "href" is deprecated. Use the <b-nav> component instead.'
85

96
// @vue/component
107
export const BTab = /*#__PURE__*/ Vue.extend({
@@ -60,16 +57,6 @@ export const BTab = /*#__PURE__*/ Vue.extend({
6057
type: Boolean,
6158
default: false
6259
},
63-
href: {
64-
// This should be deprecated, as tabs are not navigation (URL) based
65-
// <b-nav> + <b-card> + <router-view>/<nuxt-child> should be used instead
66-
// We don't support router-links here
67-
type: String,
68-
default: '#',
69-
// `deprecated` -> Don't use this prop
70-
// `deprecation` -> Refers to a change in prop usage
71-
deprecated: DEPRECATED_MSG
72-
},
7360
lazy: {
7461
type: Boolean,
7562
default: false
@@ -118,6 +105,7 @@ export const BTab = /*#__PURE__*/ Vue.extend({
118105
// If activated post mount
119106
this.activate()
120107
} else {
108+
/* istanbul ignore next */
121109
if (!this.deactivate()) {
122110
// Tab couldn't be deactivated, so we reset the synced active prop
123111
// Deactivation will fail if no other tabs to activate
@@ -140,11 +128,6 @@ export const BTab = /*#__PURE__*/ Vue.extend({
140128
this.registerTab()
141129
// Initially show on mount if active and not disabled
142130
this.show = this.localActive
143-
// Deprecate use of `href` prop
144-
if (this.href && this.href !== '#') {
145-
/* istanbul ignore next */
146-
warn(`b-tab: ${DEPRECATED_MSG}`)
147-
}
148131
},
149132
updated() {
150133
// Force the tab button content to update (since slots are not reactive)

src/components/tabs/tabs.js

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,7 @@ const BTabButtonHelper = /*#__PURE__*/ Vue.extend({
109109
// Apply <b-tabs> `activeNavItemClass` styles when the tab is active
110110
this.tab.localActive ? this.bvTabs.activeNavItemClass : null
111111
],
112-
props: {
113-
href: this.tab.href, // To be deprecated to always be '#'
114-
disabled: this.tab.disabled
115-
},
112+
props: { disabled: this.tab.disabled },
116113
attrs: {
117114
role: 'tab',
118115
id: this.id,
@@ -165,10 +162,6 @@ export const BTabs = /*#__PURE__*/ Vue.extend({
165162
type: Boolean,
166163
default: false
167164
},
168-
bottom: {
169-
type: Boolean,
170-
default: false
171-
},
172165
end: {
173166
// Synonym for 'bottom'
174167
type: Boolean,
@@ -650,20 +643,16 @@ export const BTabs = /*#__PURE__*/ Vue.extend({
650643
small: this.small
651644
}
652645
},
653-
[
654-
this.normalizeSlot('tabs-start') || h(false),
655-
buttons,
656-
this.normalizeSlot('tabs-end') || this.normalizeSlot('tabs') || h(false)
657-
]
646+
[this.normalizeSlot('tabs-start') || h(), buttons, this.normalizeSlot('tabs-end') || h()]
658647
)
659648
nav = h(
660649
'div',
661650
{
662651
key: 'bv-tabs-nav',
663652
class: [
664653
{
665-
'card-header': this.card && !this.vertical && !(this.end || this.bottom),
666-
'card-footer': this.card && !this.vertical && (this.end || this.bottom),
654+
'card-header': this.card && !this.vertical && !this.end,
655+
'card-footer': this.card && !this.vertical && this.end,
667656
'col-auto': this.vertical
668657
},
669658
this.navWrapperClass
@@ -705,7 +694,7 @@ export const BTabs = /*#__PURE__*/ Vue.extend({
705694
},
706695
attrs: { id: this.safeId() }
707696
},
708-
[this.end || this.bottom ? content : h(), [nav], this.end || this.bottom ? h() : content]
697+
[this.end ? content : h(), [nav], this.end ? h() : content]
709698
)
710699
}
711700
})

0 commit comments

Comments
 (0)