Open vladimirpotekhin opened 8 months ago
--tui-radius-xl
to 1rem and add xxl for 1.5remTuiContextWithImplicit
to TuiContext
HostedDropdown
Before:
<tui-hosted-dropdown
[content]="template"
[sided]="sided"
[canOpen]="canOpen"
[(open)]="open"
>
<button>One</button>
<button tuiHostedDropdownHost>Two</button>
</tui-hosted-dropdown>
<ng-template #template>Wow</ng-template>
After:
<div
[tuiDropdown]="template"
[tuiDropdownSided]="sided"
[tuiDropdownEnabled]="canOpen"
[(tuiDropdownOpen)]="open"
>
<button>One</button>
<button #tuiDropdownHost>Two</button>
</div>
<ng-template #template>Wow</ng-template>
2) tuiHostedDropdownHost
is now #tuiDropdownHost
3) sided
is now tuiDropdownSided
directive
4) content
is now tuiDropdown
directive
5) canOpen
input is now tuiDropdownEnabled
input
6) open
banana is now tuiDropdownOpen
banana
7) If wrapping just one element — directives can be moved directly on that element
8) If open
tracking is not needed, it can be just attribute tuiDropdownOpen
without any binding
PR: https://github.com/taiga-family/taiga-ui/pull/6537
(tuiResize)
to (waResizeObserver)
TuiResizeModule
to ResizeObserverDirective
(once we update to standalone)TuiResizeService
to ResizeObserverService
tuiAsDialog
, tuiAsAlert
*tuiPortal
/<ng-template [tuiPortal]="x"
directive is renamed to *tuiDropdown
/<ng-template [tuiDropdown]="x"
autoClose: false
is changed to autoClose: 0
in alertstuiOverPortals
content projection changed to tuiOverDropdowns
TUI_NOTIFICATION_OPTIONS
changed interface and got broken down to TUI_NOTIFICATION_OPTIONS
and TUI_ALERT_OPTIONS
tui-dialog-host
to tui-dialogs
tui-alert-host
to tui-alerts
tui-dropdown-host
to tui-dropdowns
It used to be defaultOptions
and this:
@Injectable({
providedIn: 'root',
})
export class TuiDialogService extends AbstractTuiDialogService<TuiDialogOptions<any>> {
protected readonly component = DIALOG;
protected readonly defaultOptions: TuiDialogOptions<any> = {
...inject(TUI_DIALOG_OPTIONS),
data: undefined,
};
}
Now it is options
and this:
@Injectable({
providedIn: 'root',
useFactory: () =>
new TuiDialogService(TUI_DIALOGS, TuiDialogComponent, inject(TUI_DIALOG_OPTIONS)),
})
export class TuiDialogService extends TuiPopoverService<TuiDialogOptions<any>> {}
InputFiles
now moved to TuiFilesModule
accepts
renamed to accept
removed
output on tui-file
now renamed to remove
src
no longer creates a link inside tui-file
. Instead use <a tuiFile ...
reject
event now always fires an array of rejected files and rejected files remain in the controltuiFileRejected
pipe to display rejected file with a formatted reason<tui-input-files
to <label tuiInputFiles
, control moved to native inputSee examples for the last 3 points, they are probably not 100% migratable so we will need some comment added.
<tui-toggle
-> <input type="checkbox" tuiSwitch
This:
<tui-radio-block
formControlName="control"
item="value"
>
Label
</tui-radio-block>
to this:
<label tuiBlock>
<input
formControlName="control"
tuiRadio
type="radio"
value="value"
/>
Label
</label>
And with hideCheckbox/Radio, this:
<tui-checkbox-block
size="m"
[hideCheckbox]="true"
[(ngModel)]="value"
>
Label
</tui-checkbox-block>
to this:
<label
appearance=""
tuiBlock="m"
>
Label
<input
tuiBlock
type="checkbox"
[(ngModel)]="value"
/>
</label>
This:
<tui-checkbox-labeled [(ngModel)]="value">
Label
</tui-checkbox-labeled>
to this:
<label tuiLabel>
<input type="checkbox" size="s" tuiCheckbox />
Label
</label>
This:
<tui-radio-labeled size="l" [formControl]="control" [item]="value" [identityMatcher]="matcher">
Label
</tui-radio-labeled>
to this:
<label tuiLabel>
<input type="radio" tuiRadio [value]="value" [identityMatcher]="matcher">
Label
</label>
TuiRoutableDialogModule
after ng update
TuiRootModule
from importProvidersFrom
after ng update
NG_EVENT_PLUGINS
into importProvidersFrom
after ng update
<tui-progress-segmented
[colors]="color"
[max]="max"
[size]="size"
[value]="value"
>
<progress
tuiProgressBar
[segments]="max"
[tuiProgressColorSegments]="color"
[max]="max"
[size]="size"
[value]="value"
></progress>
<tui-rating
iconFilled="tuiIconHeartLarge"
iconNormal="tuiIconHeart"
class="red"
[(ngModel)]="thirdRate"
></tui-rating>
// TODO: for custom icons see example ...
<tui-rating
[icon]="icon"
class="red"
[(ngModel)]="thirdRate"
></tui-rating>
// TODO: for rating size and gap customization use css, see example ...
--tui-rating-size
--tui-rating-gap
showLoader
-> loading
@taiga-ui/design-tokens
@taiga-ui/proprietary-core
to @taiga-ui/proprietary
@taiga-ui/proprietary-tds-palette
to @taiga-ui/proprietary
@taiga-ui/proprietary-tds-icons
to @taiga-ui/proprietary
@taiga-ui/proprietary-navigation
to @taiga-ui/proprietary
@taiga-ui/proprietary-banking
to @taiga-ui/proprietary
@taiga-ui/proprietary-icons
from packagesTUI_ARROW
content now replaced by tuiChevron
directiveicon
+ iconAlign
now changed to iconLeft
/ iconRight
--tui-link-icon-size
changed to --tui-icon-size
iconRotated
changed to tuiChevron
tuiMode
no longer relevant, use appearance="icon"
to imitate itMarkerIcon
to Avatar
, mode
to appearance
Action
to CardLarge
+ tuiSurface="elevated"
tui-svg
we need to put a TODO reminding people that all internal icons moved to tui-icon
disabled, separator, leftContent - ?
<tui-tag
[size]="size"
[status]="status"
[value]="item"
/>
<tui-chip
[size]="size"
[appearance]="status"
>{{ value }}</tui-chip>
editable
, removable
, hoverable
, maxLength
---> <input tuiChip />
, <button tuiChip />
see interactive example
<tui-table-pagination
[total]="237"
[(page)]="page"
[(size)]="size"
></tui-table-pagination>
<tui-table-pagination
[page]="page"
[size]="size"
[total]="237"
(paginationChange)="page = $event.page; size = $event.size"
></tui-table-pagination>
tuiOverscroll
directive removed, just use overscroll-behavior
CSS rule insteadimports: [TuiMobileCalendarDialogModule]
providers: [
tuiProvideMobileCalendar()
],
[tuiFocusable]="focusable"
to [tabIndex]="focusable ? 0 : -1"
Proprietary
For appearance="whiteblock" [class._checked]="condition"
has to be changed to [attr.data-mode]="condition ? 'checked' : null"
@tinkoff/tui-editor
-> @taiga-ui/editor
@tinkoff/ng-events-plugin
-> @taiga-ui/events-plugin
@tinkoff/ng-dompurify
-> @taiga-ui/dompurify
ActiveZone
no longer needed in nested dropdowns, needs to be removed. let-close="close"
can be changed to let-close
since it is now $implicit
.TuiLetDirective
-> TuiLet
TuiRepeatTimesDirective
-> TuiRepeatTimes
TuiTouchableDirective
-> TuiTouchable
TuiZoom
-> TuiZoomEvent
TuiCardMediumDirective
-> TuiCardMedium
TuiCardLargeDirective
-> TuiCardLarge
TuiButtonDirective
-> TuiButton
TuiButtonCloseDirective
-> TuiButtonClose
TuiAppearanceDirective
-> TuiAppearance
TuiZoomDirective
-> TuiZoom
TuiLinkDirective
-> TuiLink
TuiIconComponent
-> TuiIcon
TuiRippleDirective
-> TuiRipple
TuiRootComponent
-> TuiRoot
TuiLoaderComponent
-> TuiLoader
TuiScrollIntoViewLinkDirective
-> TuiScrollIntoViewLink
TuiChipDirective
-> TuiChip
TuiAutoFocusDirective
-> TuiAutoFocus
TuiMobileCalendarComponent
-> TuiMobileCalendar
TuiMobileCalendarDropdownComponent
-> TuiMobileCalendarDropdown
~TuiMobileCalendarSheetComponent
-> TuiMobileCalendarSheet
~TuiMobileCalendarComponent
-> TuiMobileCalendar
TuiMobileDialogComponent
-> TuiMobileDialog
TuiTooltipModule
-> TuiTooltip
TuiPullToRefreshComponent
-> TuiPullToRefresh
TuiSwipeActionsDirective
-> TuiSwipeActions
TuiSwipeActionsAutoCloseDirective
-> TuiSwipeActionsAutoClose
TuiIconsDirective
-> TuiIcons
~TuiHeaderDirective
-> TuiHeader
TuiBlockDetailsDirective
-> TuiBlockDetails
TuiCellDirective
-> TuiCell
TuiSwitchComponent
-> TuiSwitch
TUI_NUMBER_FORMAT
to Observable
iconLeft
/iconRight
to iconStart
/iconEnd
Description
In this discussion we will be listing breaking changes we plan for the next major version. No clear forecast on when it will happen yet. Besides obviously dropping all deprecated stuff, these things will also take place:
--tui-radius-l
on large controlsThis list will be updated as we collect more necessary migrations.
We need to cover as many breaking changes with migrations as possible.
Migration list
Experimental
Badge
BadgedContent
ThumbnailCard
Avatar
Checkbox
Radio
Radio
identityMatcher?Toggle
Button
CDK
TuiMapper / TuiMatcher
TuiPreventDefault
->(event.prevent)="0"
Core
PrimitiveTextfield
- prefix, postfix, fillerTuiAlertOptions
- autocloseTimer, hasIconHostedDropdown
->DropdownOpen
Kit
InputCount
-->InputNumber
InputNumber, InputSlider
- prefix, postfixInputTag
,Multiselect
,InputDateMulti
- [expandable]=false --> [rows]=1Action
->CardLarge
Tag
->Chip
Addon-table
TablePagination
pageChange, sizeChange --> paginationChange