Skip to content

Commit

Permalink
feat(chore): remove deprecated features
Browse files Browse the repository at this point in the history
This PR removes deprecated features which the current docs already told

loadUiOverrides() mixin in theme.less (if needed replace by @import (multiple, optional) "../../overrides.less";
form validation empty (use notEmpty instead)
checkbox onEnabled and onDisabled were removed (typo, use onEnable and onDisable instead)
page grid -> use grid container instead
  • Loading branch information
lubber-de authored Mar 7, 2025
1 parent 27e6218 commit fcf090f
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 126 deletions.
5 changes: 0 additions & 5 deletions src/definitions/behaviors/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -1843,11 +1843,6 @@
return !(value === undefined || value === '' || (Array.isArray(value) && value.length === 0));
},

/* Deprecated */
empty: function (value) {
return $.fn.form.settings.rules.notEmpty(value);
},

// checkbox checked
checked: function () {
return $(this).filter(':checked').length > 0;
Expand Down
62 changes: 1 addition & 61 deletions src/definitions/collections/grid.less
Original file line number Diff line number Diff line change
Expand Up @@ -160,58 +160,6 @@
Variations
*******************************/

& when (@variationGridPage) {
/* -----------------------
Page Grid
------------------------- */

@media only screen and (max-width: @largestMobileScreen) {
.ui.page.grid {
width: @mobileWidth;
padding-left: @mobileGutter;
padding-right: @mobileGutter;
margin-left: 0;
margin-right: 0;
}
}
@media only screen and (min-width: @tabletBreakpoint) and (max-width: @largestTabletScreen) {
.ui.page.grid {
width: @tabletWidth;
margin-left: @tabletMargin;
margin-right: @tabletMargin;
padding-left: @tabletGutter;
padding-right: @tabletGutter;
}
}
@media only screen and (min-width: @computerBreakpoint) and (max-width: @largestSmallMonitor) {
.ui.page.grid {
width: @computerWidth;
margin-left: @computerMargin;
margin-right: @computerMargin;
padding-left: @computerGutter;
padding-right: @computerGutter;
}
}
@media only screen and (min-width: @largeMonitorBreakpoint) and (max-width: @largestLargeMonitor) {
.ui.page.grid {
width: @largeMonitorWidth;
margin-left: @largeMonitorMargin;
margin-right: @largeMonitorMargin;
padding-left: @largeMonitorGutter;
padding-right: @largeMonitorGutter;
}
}
@media only screen and (min-width: @widescreenMonitorBreakpoint) {
.ui.page.grid {
width: @widescreenMonitorWidth;
margin-left: @widescreenMargin;
margin-right: @widescreenMargin;
padding-left: @widescreenMonitorGutter;
padding-right: @widescreenMonitorGutter;
}
}
}

/* -------------------
Column Count
-------------------- */
Expand Down Expand Up @@ -338,13 +286,6 @@
width: @sixteenColumn !important;
}

& when (@variationGridCelled) and (@variationGridPage) {
/* Celled Page */
.ui.celled.page.grid {
box-shadow: none;
}
}

& when (@variationGridWide) {
/* -------------------
Column Width
Expand Down Expand Up @@ -1724,8 +1665,7 @@
}

/* Don't pad inside segment or nested grid */
.ui.grid .ui.stackable.grid,
.ui.segment@{notVertical} .ui.stackable.page.grid {
.ui.grid .ui.stackable.grid {
margin-left: -(@stackableGutter / 2);
margin-right: -(@stackableGutter / 2);
}
Expand Down
1 change: 0 additions & 1 deletion src/definitions/elements/segment.less
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
}

/* Grid */
.ui.page.grid.segment,
.ui.grid > .row > .ui.segment.column,
.ui.grid > .ui.segment.column {
padding-top: @pageGridMargin;
Expand Down
8 changes: 0 additions & 8 deletions src/definitions/modules/checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,6 @@
module.set.enabled();
if (!module.should.ignoreCallbacks()) {
settings.onEnable.call(input);
// preserve legacy callbacks
settings.onEnabled.call(input);
}
},

Expand All @@ -348,8 +346,6 @@
module.set.disabled();
if (!module.should.ignoreCallbacks()) {
settings.onDisable.call(input);
// preserve legacy callbacks
settings.onDisabled.call(input);
}
},

Expand Down Expand Up @@ -859,10 +855,6 @@
onEnable: function () {},
onDisable: function () {},

// preserve misspelled callbacks (will be removed in 3.0)
onEnabled: function () {},
onDisabled: function () {},

className: {
checked: 'checked',
indeterminate: 'indeterminate',
Expand Down
13 changes: 0 additions & 13 deletions src/theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,3 @@
});
}
}

/* ------------------
Overrides
------------------- */

// Keep empty mixin in case of custom components using it so they dont break
.loadUIOverrides() {
/* loadUIOverrides mixin is deprecated and will be removed in 2.10.0
Replace mixin call by
@import (multiple, optional) "../../overrides.less";
instead
*/
}
30 changes: 0 additions & 30 deletions src/themes/default/collections/grid.variables
Original file line number Diff line number Diff line change
Expand Up @@ -86,33 +86,3 @@
@veryCompactRowSpacing: (@compactRowSpacing / 2);
@veryCompactCelledRelaxedPadding: (@compactCelledRelaxedPadding / 2);
@veryCompactCelledVeryRelaxedPadding: (@compactCelledVeryRelaxedPadding / 2);

/*******************************
Legacy
*******************************/

/* --------------
Page
--------------- */

/* Legacy (DO NOT USE)
*/
@mobileWidth: auto;
@mobileMargin: 0;
@mobileGutter: 0;

@tabletWidth: auto;
@tabletMargin: 0;
@tabletGutter: 2em;

@computerWidth: auto;
@computerMargin: 0;
@computerGutter: 3%;

@largeMonitorWidth: auto;
@largeMonitorMargin: 0;
@largeMonitorGutter: 15%;

@widescreenMonitorWidth: auto;
@widescreenMargin: 0;
@widescreenMonitorGutter: 23%;
1 change: 0 additions & 1 deletion src/themes/default/globals/variation.variables
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@

/* Grid */
@variationGridInverted: true;
@variationGridPage: true;
@variationGridCelled: true;
@variationGridCentered: true;
@variationGridRelaxed: true;
Expand Down
7 changes: 0 additions & 7 deletions types/fomantic-ui-form.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,12 +444,6 @@ declare namespace FomanticUI {
*/
minValue: string;

/**
* @default '{name} must have a value'
* @deprecated Use notEmpty instead
*/
empty: string;

/**
* @default '{name} must have a value'
*/
Expand Down Expand Up @@ -585,7 +579,6 @@ declare namespace FomanticUI {
}

interface Rules {
empty(value: unknown): boolean;
notEmpty(value: unknown): boolean;
checked(): boolean;
email(value: unknown): boolean;
Expand Down

0 comments on commit fcf090f

Please sign in to comment.