Skip to content

Commit

Permalink
chore: use Note instead of TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Jan 27, 2024
1 parent be28334 commit 0acf9c3
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion projects/cdk/schematics/ng-update/steps/show-warnings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function showWarning(
*/
referencesMeta.forEach(({sourceFile, filePath, startLinePos}) => {
logger.warn(`[WARNING] in ${filePath}: ${message}`);
sourceFile.insertText(startLinePos, `// TODO: (Taiga UI migration) ${message}\n`);
sourceFile.insertText(startLinePos, `// Note: (Taiga UI migration) ${message}\n`);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ export function migrateInputRange(
!options['skip-logs'] && progressLog(componentPath);
addMinMaxLabelMethod(componentPath, MIN_LABELS_MIGRATION_METHOD_NAME, [
'const currentValue = context.$implicit;',
'const minValue = 0; // TODO: (Taiga UI migration) replace with the MIN value of the input-range',
'const minLabelText = "Min"; // TODO: (Taiga UI migration) replace with the required label',
'const minValue = 0; // Note: (Taiga UI migration) replace with the MIN value of the input-range',
'const minLabelText = "Min"; // Note: (Taiga UI migration) replace with the required label',
'if (currentValue === minValue) return minLabelText;',
'return String(currentValue);',
]);
Expand All @@ -136,8 +136,8 @@ export function migrateInputRange(
!options['skip-logs'] && progressLog(componentPath);
addMinMaxLabelMethod(componentPath, MAX_LABELS_MIGRATION_METHOD_NAME, [
'const currentValue = context.$implicit;',
'const maxValue = 100; // TODO: (Taiga UI migration) replace with the MAX value of the input',
'const maxLabelText = "Max"; // TODO: (Taiga UI migration) replace with the required label',
'const maxValue = 100; // Note: (Taiga UI migration) replace with the MAX value of the input',
'const maxLabelText = "Max"; // Note: (Taiga UI migration) replace with the required label',
'if (currentValue === maxValue) return maxLabelText;',
'return String(currentValue);',
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ function addMinMaxLabelMethod(componentPath: string): void {
parameters: [{name: 'context', type: 'TuiContextWithImplicit<number>'}],
statements: [
'const currentValue = context.$implicit;',
'const maxValue = 100; // TODO: (Taiga UI migration) replace with the MAX value of the input',
'const maxLabelText = "Max"; // TODO: (Taiga UI migration) replace with the required label',
'const minValue = 0; // TODO: (Taiga UI migration) replace with the MIN value of the input',
'const minLabelText = "Min"; // TODO: (Taiga UI migration) replace with the required label',
'const maxValue = 100; // Note: (Taiga UI migration) replace with the MAX value of the input',
'const maxLabelText = "Max"; // Note: (Taiga UI migration) replace with the required label',
'const minValue = 0; // Note: (Taiga UI migration) replace with the MIN value of the input',
'const minLabelText = "Min"; // Note: (Taiga UI migration) replace with the required label',
'if (currentValue === maxValue) return maxLabelText;',
'if (currentValue === minValue) return minLabelText;',
'return String(currentValue);',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const TUI_WARNING_NORMALIZE = `
// If you're looking to use reset styles or you can write your own reset.css`;

export const TUI_WARNING_WRAPPER_MIXINS =
'// TODO: (Taiga UI migration): use mixins to customize tuiWrapper. See https://taiga-ui.dev/wrapper';
'// Note: (Taiga UI migration): use mixins to customize tuiWrapper. See https://taiga-ui.dev/wrapper';

export function replaceStyles(): void {
getActiveProject()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ export class AppComponent {
this.other.getFormattedDay("DMY", ".");
// TODO: (Taiga UI migration) getDayFromMonthRowCol has been removed in 3.0. If you need this utils check out this pipe https://github.com/taiga-family/taiga-ui/tree/main/projects/core/pipes/calendar-sheet
// Note: (Taiga UI migration) getDayFromMonthRowCol has been removed in 3.0. If you need this utils check out this pipe https://github.com/taiga-family/taiga-ui/tree/main/projects/core/pipes/calendar-sheet
this.other.getDayFromMonthRowCol(1, 2, 3);
// TODO: (Taiga UI migration) formattedMonth has been removed in 3.0. Please use TUI_MONTH_FORMATTER from @taiga-ui/kit
// Note: (Taiga UI migration) formattedMonth has been removed in 3.0. Please use TUI_MONTH_FORMATTER from @taiga-ui/kit
return this.value.formattedMonth;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,27 +80,27 @@ const FILE_HTML_CHILD_COMPONENT_AFTER = `import { TuiContextWithImplicit } from
export class FileHtmlChildComponent {
tuiMigrationMinMaxLabel(context: TuiContextWithImplicit<number>): string {
const currentValue = context.$implicit;
const maxValue = 100; // TODO: (Taiga UI migration) replace with the MAX value of the input
const maxLabelText = "Max"; // TODO: (Taiga UI migration) replace with the required label
const minValue = 0; // TODO: (Taiga UI migration) replace with the MIN value of the input
const minLabelText = "Min"; // TODO: (Taiga UI migration) replace with the required label
const maxValue = 100; // Note: (Taiga UI migration) replace with the MAX value of the input
const maxLabelText = "Max"; // Note: (Taiga UI migration) replace with the required label
const minValue = 0; // Note: (Taiga UI migration) replace with the MIN value of the input
const minLabelText = "Min"; // Note: (Taiga UI migration) replace with the required label
if (currentValue === maxValue) return maxLabelText;
if (currentValue === minValue) return minLabelText;
return String(currentValue);
}
tuiMigrationInputRangeMinLabel(context: TuiContextWithImplicit<number>): string {
const currentValue = context.$implicit;
const minValue = 0; // TODO: (Taiga UI migration) replace with the MIN value of the input-range
const minLabelText = "Min"; // TODO: (Taiga UI migration) replace with the required label
const minValue = 0; // Note: (Taiga UI migration) replace with the MIN value of the input-range
const minLabelText = "Min"; // Note: (Taiga UI migration) replace with the required label
if (currentValue === minValue) return minLabelText;
return String(currentValue);
}
tuiMigrationInputRangeMaxLabel(context: TuiContextWithImplicit<number>): string {
const currentValue = context.$implicit;
const maxValue = 100; // TODO: (Taiga UI migration) replace with the MAX value of the input
const maxLabelText = "Max"; // TODO: (Taiga UI migration) replace with the required label
const maxValue = 100; // Note: (Taiga UI migration) replace with the MAX value of the input
const maxLabelText = "Max"; // Note: (Taiga UI migration) replace with the required label
if (currentValue === maxValue) return maxLabelText;
return String(currentValue);
}
Expand Down Expand Up @@ -302,10 +302,10 @@ export class InlineHtmlChildComponent {
tuiMigrationMinMaxLabel(context: TuiContextWithImplicit<number>): string {
const currentValue = context.$implicit;
const maxValue = 100; // TODO: (Taiga UI migration) replace with the MAX value of the input
const maxLabelText = "Max"; // TODO: (Taiga UI migration) replace with the required label
const minValue = 0; // TODO: (Taiga UI migration) replace with the MIN value of the input
const minLabelText = "Min"; // TODO: (Taiga UI migration) replace with the required label
const maxValue = 100; // Note: (Taiga UI migration) replace with the MAX value of the input
const maxLabelText = "Max"; // Note: (Taiga UI migration) replace with the required label
const minValue = 0; // Note: (Taiga UI migration) replace with the MIN value of the input
const minLabelText = "Min"; // Note: (Taiga UI migration) replace with the required label
if (currentValue === maxValue) return maxLabelText;
if (currentValue === minValue) return minLabelText;
return String(currentValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class AppComponent {
}
method2() {
// TODO: (Taiga UI migration) addStyle method has been removed. Use components approach
// Note: (Taiga UI migration) addStyle method has been removed. Use components approach
this.directiveStyles.addStyle(styles, 'style');
}
}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@ export class AppComponent {
`;

const AFTER = `
// TODO: (Taiga UI migration) TUI_MOBILE_AWARE has been deleted in 3.0, please use TuiMobileTabsDirective from @taiga-ui/addon-mobile
// TODO: (Taiga UI migration) Use DI-token TUI_COUNTRIES_MASKS to get phone mask by country iso code
// Note: (Taiga UI migration) TUI_MOBILE_AWARE has been deleted in 3.0, please use TuiMobileTabsDirective from @taiga-ui/addon-mobile
// Note: (Taiga UI migration) Use DI-token TUI_COUNTRIES_MASKS to get phone mask by country iso code
import {TUI_MOBILE_AWARE, COUNTRIES_MASKS} from '@taiga-ui/kit';
import {
DumbEntity,
DUMB_CONSTANT,
awesomeFunction,
TUI_LAST_DAY,
// TODO: (Taiga UI migration) TUI_DATE_FILLER has been deleted in 3.0, please use TUI_DATE_FORMAT + TUI_DATE_SEPARATOR from @taiga-ui/cdk. Read more: https://taiga-ui.dev/components/input-date
// Note: (Taiga UI migration) TUI_DATE_FILLER has been deleted in 3.0, please use TUI_DATE_FORMAT + TUI_DATE_SEPARATOR from @taiga-ui/cdk. Read more: https://taiga-ui.dev/components/input-date
TUI_DATE_FILLER,
MEGA_CONSTANT,
anotherAwesomeFunction
MagicClass,
} from '@taiga-ui/cdk';
// TODO: (Taiga UI migration) TUI_DATE_RANGE_FILLER has been deleted in 3.0, please use TUI_DATE_FORMAT + TUI_DATE_SEPARATOR from @taiga-ui/cdk. Read more: https://taiga-ui.dev/components/input-date-range
// Note: (Taiga UI migration) TUI_DATE_RANGE_FILLER has been deleted in 3.0, please use TUI_DATE_FORMAT + TUI_DATE_SEPARATOR from @taiga-ui/cdk. Read more: https://taiga-ui.dev/components/input-date-range
import {DumbEntity, TUI_DATE_RANGE_FILLER, MEGA_CONSTANT, MagicClass} from '@taiga-ui/cdk';
// TODO: (Taiga UI migration) Use DI-token TUI_COUNTRIES_MASKS to get phone mask by country iso code. Use DI-token TUI_COUNTRIES to get localized country name by its iso code
// Note: (Taiga UI migration) Use DI-token TUI_COUNTRIES_MASKS to get phone mask by country iso code. Use DI-token TUI_COUNTRIES to get localized country name by its iso code
import { COUNTRIES } from '@taiga-ui/kit';
const lol = TUI_DATE_FILLER;
Expand Down

0 comments on commit 0acf9c3

Please sign in to comment.