Skip to content

Conversation

splincode
Copy link
Member

@splincode splincode commented Sep 29, 2025

Part of #11917

@splincode splincode requested a review from a team as a code owner September 29, 2025 09:59
@splincode splincode requested review from MarsiBarsi, Copilot, mdlufy, nsbarsukov, vladimirpotekhin and waterplea and removed request for a team September 29, 2025 09:59
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds migration support for the TuiInputYear component in the schematics for v5 updates. It migrates the deprecated TuiInputYearModule from @taiga-ui/legacy to the new TuiInputYear component from @taiga-ui/kit and transforms templates to use the new tui-textfield structure.

Key changes:

  • Creates a utility function for running migrations consistently across tests
  • Adds comprehensive template migration logic for tui-input-year components
  • Updates identifier mappings and migration pipeline

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
projects/cdk/schematics/utils/run-migration.ts New utility function for consistent test migration execution
projects/cdk/schematics/ng-update/v5/tests/schematic-migrate-input-year.spec.ts Comprehensive test suite for TuiInputYear migration scenarios
projects/cdk/schematics/ng-update/v5/tests/schematic-migrate-functions.spec.ts Refactored to use new run-migration utility
projects/cdk/schematics/ng-update/v5/steps/templates/migrate-input-year.ts Core migration logic for transforming input-year templates
projects/cdk/schematics/ng-update/v5/steps/constants/identifiers-to-replace.ts Identifier mapping configuration for module/component replacement
projects/cdk/schematics/ng-update/v5/index.ts Integration of new migration steps into the main pipeline

Copy link
Contributor

github-actions bot commented Sep 29, 2025

✅ NPM Audit Good

5 vulnerabilities (3 low, 2 moderate)

Show details
# npm audit report

dompurify  <lt;3.2.4
Severity: moderate
DOMPurify allows Cross-site Scripting (XSS) - https://github.com/advisories/GHSA-vhxf-7vqr-mrjg
fix available via `npm audit fix --force`
Will install @taiga-ui/[email protected], which is a breaking change
node_modules/dompurify
  @taiga-ui/dompurify  4.1.10 - 4.1.11
  Depends on vulnerable versions of dompurify
  node_modules/@taiga-ui/dompurify

vite  6.0.0 - 6.3.5
Vite middleware may serve files starting with the same name with the public directory - https://github.com/advisories/GHSA-g4jq-h2w9-997c
Vite'#39;s `server.fs` settings were not applied to HTML files - https://github.com/advisories/GHSA-jqfw-vq24-v9c3
fix available via `npm audit fix --force`
Will install @angular-devkit/[email protected], which is outside the stated dependency range
node_modules/@angular/build/node_modules/vite
  @angular/build  19.1.0-next.0 - 19.2.16 || 20.0.0-next.0 - 20.1.0-rc.0
  Depends on vulnerable versions of vite
  node_modules/@angular/build
    @angular-devkit/build-angular  19.1.0-next.0 - 19.2.16 || 20.0.0-next.0 - 20.1.0-rc.0
    Depends on vulnerable versions of @angular/build
    node_modules/@angular-devkit/build-angular

5 vulnerabilities (3 low, 2 moderate)

To address all issues (including breaking changes), run:
  npm audit fix --force

Copy link
Contributor

github-actions bot commented Sep 29, 2025

Tests completed successfully ✅

Good job 🔥

Copy link
Contributor

github-actions bot commented Sep 29, 2025

Visit the preview URL for this PR (updated for commit bc7dfbe):

https://taiga-previews-demo--pr12073-splincode-input-year-demo-id72ejsa.web.app

(expires Tue, 30 Sep 2025 10:50:48 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 73dddc3c665194f3e11f18c16aeb71af4c289c37

Copy link

codecov bot commented Sep 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.36%. Comparing base (f9a5854) to head (bc7dfbe).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #12073   +/-   ##
=======================================
  Coverage   62.36%   62.36%           
=======================================
  Files        1331     1331           
  Lines       18168    18168           
  Branches     2910     2956   +46     
=======================================
  Hits        11331    11331           
+ Misses       6417     6412    -5     
- Partials      420      425    +5     
Flag Coverage Δ
summary 62.36% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

bundlemon bot commented Sep 29, 2025

BundleMon

Files updated (2)
Status Path Size Limits
demo/browser/main.(hash).js
295.23KB (+14B 0%) +10%
demo/browser/styles.(hash).css
22.37KB (-155B -0.67%) +10%
Unchanged files (3)
Status Path Size Limits
demo/browser/vendor.(hash).js
261.29KB +10%
demo/browser/runtime.(hash).js
44.3KB +10%
demo/browser/polyfills.(hash).js
11.91KB +10%

Total files change -144B -0.02%

Unchanged groups (1)
Status Path Size Limits
demo/browser/*..js
8.17MB -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

Copy link
Contributor

📊 Performance Metrics Comparison

✅ No significant performance regressions detected!

Overall Rendering Cost Δ: -1.33% ℹ️ (neutral ±15%) – neutral

Summary
  • Overall layout duration: -3.5% ✅
  • Overall recalc duration: -0.2% ✅
  • Max layout duration change: -23.5% ✅
  • Max recalc duration change: +25.8% ❌
  • Max layout ops change: +18.6% ❌
  • Max recalc ops change: +16.7% ❌

Copy link
Contributor

Playwright test results

passed  1183 passed
flaky  1 flaky
skipped  40 skipped

Details

report  Open report ↗︎
stats  1224 tests across 85 suites
duration  37 minutes, 45 seconds
commit  bc7dfbe

Flaky tests

chromium › tests/kit/line-clamp/line-clamp.pw.spec.ts › LineClamp › do not close after click in hint area

Skipped tests

chromium › tests/addon-doc/navigation.pw.spec.ts › Navigation › anchor links navigation works › scroll to "tui-doc-example"
chromium › tests/core/dropdown/dropdown.pw.spec.ts › Dropdown › Esc -> Hosted Dropdown
chromium › tests/demo/source-code-link.pw.spec.ts › Source code button › /variables
chromium › tests/demo/source-code-link.pw.spec.ts › Source code button › /appearances
chromium › tests/demo/source-code-link.pw.spec.ts › Source code button › /portals
chromium › tests/inputs/update-on.pw.spec.ts › Inputs - updateOn › InputCard › update on change
chromium › tests/inputs/update-on.pw.spec.ts › Inputs - updateOn › InputCard › update on blur
chromium › tests/inputs/update-on.pw.spec.ts › Inputs - updateOn › InputCard › update on submit
chromium › tests/inputs/update-on.pw.spec.ts › Inputs - updateOn › InputInline › update on change
chromium › tests/inputs/update-on.pw.spec.ts › Inputs - updateOn › InputInline › update on blur
chromium › tests/inputs/update-on.pw.spec.ts › Inputs - updateOn › InputInline › update on submit
chromium › tests/inputs/update-on.pw.spec.ts › Inputs - updateOn › InputPin › update on change
chromium › tests/inputs/update-on.pw.spec.ts › Inputs - updateOn › InputPin › update on blur
chromium › tests/inputs/update-on.pw.spec.ts › Inputs - updateOn › InputPin › update on submit
chromium › tests/inputs/update-on.pw.spec.ts › Inputs - updateOn › InputFiles › update on change
chromium › tests/inputs/update-on.pw.spec.ts › Inputs - updateOn › InputFiles › update on blur
chromium › tests/inputs/update-on.pw.spec.ts › Inputs - updateOn › InputFiles › update on submit
chromium › tests/inputs/update-on.pw.spec.ts › Inputs - updateOn › Textfield › update on change
chromium › tests/inputs/update-on.pw.spec.ts › Inputs - updateOn › Textfield › update on blur
chromium › tests/inputs/update-on.pw.spec.ts › Inputs - updateOn › Textfield › update on submit
chromium › tests/kit/input-number/input-number.pw.spec.ts › InputNumber › API › [prefix] & [postfix] props › non-erasable minus (as [prefix]) for [max] <= 0 › forbids to enter more minuses
chromium › tests/legacy/combo-box/combobox.pw.spec.ts › ComboBox
chromium › tests/legacy/input/input.pw.spec.ts › Input
chromium › tests/legacy/input-date/input-date-mobile.pw.spec.ts › InputDate and mobile user agent
chromium › tests/legacy/input-date/input-date.pw.spec.ts › InputDate
chromium › tests/legacy/input-date-range/input-date-range.pw.spec.ts › InputDateRange
chromium › tests/legacy/input-date-time/input-date-time.pw.spec.ts › InputDateTime
chromium › tests/legacy/input-month/input-month.pw.spec.ts › InputMonth
chromium › tests/legacy/input-month-range/input-month-range.pw.spec.ts › InputMonthRange
chromium › tests/legacy/input-number/input-number.pw.spec.ts › InputNumber
chromium › tests/legacy/input-phone/input-phone.pw.spec.ts › InputPhone
chromium › tests/legacy/input-phone-international/input-phone-international.pw.spec.ts › InputPhoneInternational
chromium › tests/legacy/input-range/input-range.pw.spec.ts › InputRange
chromium › tests/legacy/input-table/input-table.pw.spec.ts › InputTable
chromium › tests/legacy/input-tag/input-tag.pw.spec.ts › InputTag
chromium › tests/legacy/input-time/input-time.pw.spec.ts › InputTime
chromium › tests/legacy/input-year/input-year.pw.spec.ts › InputYear
chromium › tests/legacy/multi-select/multi-select.pw.spec.ts › MultiSelect
chromium › tests/legacy/primitive-textfield/primitive-textfield.pw.spec.ts › TuiPrimitiveTextfield
chromium › tests/legacy/textarea/textarea.pw.spec.ts › Textarea

`,
});

expect(component).toEqual(`import { TuiInputYear } from "@taiga-ui/kit";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also add TuiTextfield import ?


expect(template).toEqual(`
<form [formGroup]="testForm">
<tui-textfield formControlName="testValue">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid migration


recorder.insertRight(
calendarInsertOffset,
'\n<tui-calendar-year *tuiTextfieldDropdown />\n',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'\n<tui-calendar-year *tuiTextfieldDropdown />\n',
'\n<tui-calendar-year *tuiDropdown />\n',

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants