Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 - v3 to v4 migration errors #10017

Closed
20 of 21 tasks
dequubi opened this issue Dec 18, 2024 · 11 comments
Closed
20 of 21 tasks

🐞 - v3 to v4 migration errors #10017

dequubi opened this issue Dec 18, 2024 · 11 comments
Assignees

Comments

@dequubi
Copy link
Contributor

dequubi commented Dec 18, 2024

Reproduction url

N/A

Description

  • Π‘Ρ‹Π»ΠΎ Π±Ρ‹ Π½Π΅ΠΏΠ»ΠΎΡ…ΠΎ, Ссли Π±Ρ‹ миграция Π½Π΅ мСняла line separator'Ρ‹ с CRLF Π½Π° LF

  • tui-data-list-wrapper пСрСстал ΠΏΡ€ΠΈΠ½ΠΈΠΌΠ°Ρ‚ΡŒ size="xs", миграция Π½Π΅ Π·Π°ΠΌΠ΅Π½ΠΈΠ»Π° "s" ΠΈΠ»ΠΈ Π½Π΅ написала ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΉ

  • Π’ ситуации [tuiHint]="[] | tuiFieldErrorContent" Π² ΠΊΠΎΠΌΠΏΠΎΠ½Π΅Π½Ρ‚ Π½Π΅ импортировался TuiFieldErrorContentPipe, остался TuiFieldErrorPipe

  • tui-input-tag
<tui-input-tag formControlName="values"
       [uniqueTags]="false"
       [tuiHint]="valueArray.length > 0 ? editableHintTpl : ''"
       tuiHintAppearance="onDark"
       tuiHintDirection="bottom"
       [expandable]="false"
/>

ΠœΠΈΠ³Ρ€ΠΈΡ€ΠΎΠ²Π°Π»ΠΎ ΠΊΠ°ΠΊ

<tui-input-tag formControlName="values"
     [uniqueTags]="false"
     [tuiHint]="valueArray.length > 0 ? editableHintTpl : ''"
     tuiHintAppearance="dark"
     tuiHintDirection="bottom"

/[rows]="1">

  • tuiScrollable Π½Π΅ импортируСтся Π² ΠΊΠΎΠΌΠΏΠΎΠ½Π΅Π½Ρ‚, TuiScrollbarModule замСняСтся Π½Π° TuiScrollbar

  • TuiTablePaginationEvent
public onPaginationChange(paginationChange: TuiTablePagination) { /* ... */ }

TuiTablePagination нС замСнился на TuiTablePaginationEvent


  • На <a tuiIconButton/tuiButton> большС нСльзя Π½Π°Π²Π΅ΡΠΈΡ‚ΡŒ [disabled]

  • tui-checkbox-labeled
<tui-checkbox-labeled [ngModel]="selectAllChecked()"
                      (ngModelChange)="onSelectAllChange($event)"
                      [nullableBool]="nullableBool"
>
    {{ 'shared.filterCheckbox.selectAll' | transloco }}
</tui-checkbox-labeled>

ΠœΠΈΠ³Ρ€ΠΈΡ€ΠΎΠ²Π°Π»ΡΡ ΠΊΠ°ΠΊ

<label tuiLabel><label tuiLabel> <input tuiCheckbox type="checkbox" [ngModel]="selectAllChecked()"
                  (ngModelChange)="onSelectAllChange($event)"
                  [nullableBool]="nullableBool"
>
    {{ 'shared.filterCheckbox.selectAll' | transloco }}
</label>

(Π΄Π²Π° label)


  • tui-checkbox-block
<tui-checkbox-block [formControl]="control"
    [size]="size"
>
    {{ label() }}
</tui-checkbox-block>

ΠœΠΈΠ³Ρ€ΠΈΡ€ΠΎΠ²Π°Π»ΡΡ ΠΊΠ°ΠΊ

<label tuiBlock="size"> <input tuiCheckbox type="checkbox" [formControl]="control"           
    [size]="size"
>
    {{ label() }}
</label>

(ΠΏΠΎΡ‚Π΅Ρ€ΡΠ»ΠΈΡΡŒ ΠΊΠ²Π°Π΄Ρ€Π°Ρ‚Π½Ρ‹Π΅ скобки Ρƒ tuiBlock="size")


  • ΠžΡΡ‚Π°Π»ΡΡ ΠΈΠΌΠΏΠΎΡ€Ρ‚ TuiStepState ΠΈΠ· kit, ΠΊΠΎΠ³Π΄Π° этот Ρ‚ΠΈΠΏ Π²ΠΎΠΎΠ±Ρ‰Π΅ Π±Ρ‹Π» ΡƒΠ΄Π°Π»Π΅Π½

  • Π˜ΠΌΠΏΠΎΡ€Ρ‚ TUI_TEXTFIELD_SIZE остаСтся ΠΈΠ· core, Π° Π½Π΅ ΠΈΠ· legacy

  • Π˜ΠΌΠΏΠΎΡ€Ρ‚ TuiStatus, TUI_ARROW_MODE, TuiComboboxComponent, TuiSelectComponent остаСтся ΠΈΠ· kit, Π° Π½Π΅ ΠΈΠ· legacy

  • Π’ tui-badged-content
[colorTop]="(unsavedChanges.value$ | async) ? 'var(--tui-warning-fill)' : ''"

ΠœΠΈΠ³Ρ€ΠΈΡ€ΠΎΠ²Π°Π»ΡΡ ΠΊΠ°ΠΊ

[style.color]="'(unsavedChanges.value$ | async) ? 'var(--tui-status-warning)' : '''"

(Π½Π΅ΠΊΠΎΡ€Ρ€Π΅ΠΊΡ‚Π½ΠΎ поставлСны ΠΊΠ°Π²Ρ‹Ρ‡ΠΊΠΈ)


  • Π’ tui-badged-content Π²Π½ΡƒΡ‚Ρ€ΡŒ вставился tui-badge-notification, Π½ΠΎ TuiBadgeNotification Π½Π΅ импортировался Π² ΠΊΠΎΠΌΠΏΠΎΠ½Π΅Π½Ρ‚

  • Π’ main.ts ΡƒΠΆΠ΅ Π±Ρ‹Π» Π·Π°ΠΏΡ€ΠΎΠ²Π°ΠΉΠ΄Π΅Π½ NG_EVENT_PLUGINS со старым ΠΈΠΌΠΏΠΎΡ€Ρ‚ΠΎΠΌ
import { NG_EVENT_PLUGINS } from '@tinkoff/ng-event-plugins';

Он поправился, Π½Π°

import { NG_EVENT_PLUGINS } from '@taiga-ui/event-plugins';

Π½ΠΎ добавился ΠΈΠ΄Π΅Π½Ρ‚ΠΈΡ‡Π½Ρ‹ΠΉ Π΄ΡƒΠ±Π»ΡŒ Π²Π²Π΅Ρ€Ρ… Ρ„Π°ΠΉΠ»Π°, ΠΈ Π΄ΡƒΠ±Π»ΡŒ Π² ΠΏΡ€ΠΎΠ²Π°ΠΉΠ΄Π΅Ρ€Ρ‹


  • tui-svg Π² [src] ΠΌΠΎΠ³ ΠΏΡ€ΠΈΠ½ΡΡ‚ΡŒ undefined, tui-icon Π² [icon] Π½Π΅ ΠΌΠΎΠΆΠ΅Ρ‚, ΠΈΠ·-Π·Π° Ρ‡Π΅Π³ΠΎ всС мСста, Π³Π΄Π΅ Π² tui-svg ΠΌΠΎΠ³ ΠΏΠΎΠΏΠ°ΡΡ‚ΡŒ undefined, стали ошибкой послС ΠΌΠΈΠ³Ρ€Π°Ρ†ΠΈΠΈ

  • Π’ tui-primitive-textfield (ΠΊΠΎΡ‚ΠΎΡ€Ρ‹ΠΉ ΠΈΠ· лСгаси) [pseudoFocus] Π½Π΅ΠΊΠΎΡ€Ρ€Π΅ΠΊΡ‚Π½ΠΎ замСнился Π½Π° [tuiAppearanceFocus]

  • TuiTreeItemContentComponent Π½Π΅ Π·Π°ΠΌΠ΅Π½Π΅Π½ Π½Π° TuiTreeItemContent

  • ΠŸΠ΅Ρ€Π΅ΡΡ‚Π°Π΅Ρ‚ Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ кСйс
<tui-hosted-dropdown #ref>
  ...
  <button (click)="ref.close()"></button>
  ...
</tui-hosted-dropdown>

НуТно ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒΡΡ exportAs Ρƒ tuiDropdown ΠΈ Π΄Π΅Ρ€Π³Π°Ρ‚ΡŒ .toggle(false)


  • TuiResizerModule Π½Π΅ замСнился Π½Π° TuiResizer + TuiResizable.
    Π”ΠΈΡ€Π΅ΠΊΡ‚ΠΈΠ²Π° tuiResizeable Π½Π΅ ΠΏΠ΅Ρ€Π΅ΠΈΠΌΠ΅Π½ΠΎΠ²Π°Π»Π°ΡΡŒ Π² Ρ‚Π΅ΠΌΠΏΠ»Π΅ΠΉΡ‚Π΅ Π½Π° tuiResizable.

  • tui-badge пСрСстал ΠΏΡ€ΠΈΠ½ΠΈΠΌΠ°Ρ‚ΡŒ "xs" Ρ€Π°Π·ΠΌΠ΅Ρ€, аналогичная ситуация с tui-data-list-wrapper

Taiga UI version

3.94.0 -> 4.18.0

Browser Used

Chrome

OS Used

Windows

@dequubi
Copy link
Contributor Author

dequubi commented Dec 18, 2024

  • Fixed

Π’ main.ts Π² ΠΏΡ€ΠΎΠ²Π°ΠΉΠ΄Π΅Ρ€Π°Ρ… Π±Ρ‹Π»ΠΎ

importProvidersFrom(TuiEdtiorModule)

НСкоррСктно Π·Π°ΠΌΠ΅Π½ΠΈΠ»ΠΎ Π½Π°

importProvidersFrom(TuiEditor, TuiEditorSocket)

@dequubi
Copy link
Contributor Author

dequubi commented Dec 18, 2024

  • Иконка tuiIconAddRowLarge ΠΌΠΈΠ³Ρ€ΠΈΡ€ΠΎΠ²Π°Π»Π° ΠΊΠ°ΠΊ @tui.add-row, Π½ΠΎ Ρ‚Π°ΠΊΠΎΠΉ ΠΈΠΊΠΎΠ½ΠΊΠΈ Π½Π΅ сущСствуСт.
    tuiIconColumns ΠΌΠΈΠ³Ρ€ΠΈΡ€ΠΎΠ²Π°Π»ΠΎ ΠΊΠ°ΠΊ @tui.columns, Π½ΠΎ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ @tui.columns-2.
    tuiIconTool ΠΌΠΈΠ³Ρ€ΠΈΡ€ΠΎΠ²Π°Π»ΠΎ ΠΊΠ°ΠΊ @tui.tool, Π½ΠΎ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ @tui.wrench.
    tuiIconCheckSquare ΠΌΠΈΠ³Ρ€ΠΈΡ€ΠΎΠ²Π°Π»ΠΎ ΠΊΠ°ΠΊ @tui.check-square, Π½ΠΎ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ @tui.square-check-big.

@splincode
Copy link
Member

tui-svg Π² [src] ΠΌΠΎΠ³ ΠΏΡ€ΠΈΠ½ΡΡ‚ΡŒ undefined, tui-icon Π² [icon] Π½Π΅ ΠΌΠΎΠΆΠ΅Ρ‚, ΠΈΠ·-Π·Π° Ρ‡Π΅Π³ΠΎ всС мСста, Π³Π΄Π΅ Π² tui-svg ΠΌΠΎΠ³ ΠΏΠΎΠΏΠ°ΡΡ‚ΡŒ undefined, стали ошибкой послС ΠΌΠΈΠ³Ρ€Π°Ρ†ΠΈΠΈ

The team said there was nothing to do about it, expected behavior

@hakimio
Copy link
Contributor

hakimio commented Dec 31, 2024

One more:

  • tuiGenerateRoutes() is removed without any explanation. The migrator should at least indicate that it was replaced by tuiProvideRoutePageTab().

@splincode
Copy link
Member

@dequubi Image
I can't reproduce it, can you please send full template?

@dequubi
Copy link
Contributor Author

dequubi commented Jan 10, 2025

@splincode

@if (showSearch()) {
    <div class="mb-0_5">
        <tui-input tuiTextfieldSize="s"
                   [ngModel]="searchValue()"
                   (ngModelChange)="searchValue.set($event)"
        >
            {{ 'shared.filterCheckbox.search' | transloco }}
        </tui-input>
    </div>
}
@if (showSelectAll()) {
    <tui-checkbox-labeled [ngModel]="selectAllChecked()"
                          (ngModelChange)="onSelectAllChange($event)"
                          [nullableBool]="nullableBool"
    >
        {{ 'shared.filterCheckbox.selectAll' | transloco }}
    </tui-checkbox-labeled>
    <hr class="my-0_5">
}
<tui-scrollbar>
    <div class="checkbox-container">
        @for (option of filteredOptions(); track option.key) {
            <tui-checkbox-labeled [(ngModel)]="selectedOptions()[option.key]"
                                  (ngModelChange)="onOptionChange()"
                                  [nullableBool]="nullableBool"
            >
                {{ option.value }}
            </tui-checkbox-labeled>
        }
    </div>
</tui-scrollbar>

@splincode
Copy link
Member

splincode commented Jan 10, 2025

I don't see any problem after migration

Image

maybe already fixed in main

@vladimirpotekhin what do you think?

@dequubi
Copy link
Contributor Author

dequubi commented Jan 10, 2025

Weird, I was able to reproduce it

Image

@vladimirpotekhin
Copy link
Member

@vladimirpotekhin what do you think?

I also can't reproduce this on macos. I suspect it might be related to windows

@dequubi what is the encoding of your files? UTF-8 / UTF-8 with BOM, or something else ?

@dequubi
Copy link
Contributor Author

dequubi commented Jan 13, 2025

@vladimirpotekhin UTF-8. I can send you the whole file if that helps.

filter-checkbox-array.component.html.zip

@waterplea
Copy link
Collaborator

I think that's not worth the effort anymore, migration scripts are inevitably error-prone and the more time we spend on perfecting them – the less time is left to do the other work. This looks good enough for me at this point to resolve it. Thank you everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants