feat: add smarthr-ui v94 to v95 migrator#1334
Draft
AtsushiM wants to merge 4 commits into
Draft
Conversation
smarthr-ui v95の移行ルールを追加: - LanguageSwitcher, AppLauncher, InputFileのdecorators削除 - FormDialog/ActionDialogのボタン属性をObject形式に統合 - MessageDialogのdecorators削除とcloseButton属性への統一 自動修正可能なパターン: - decorators属性の削除(LanguageSwitcher, AppLauncher, InputFile) - actionTextのみの場合はactionButtonにリネーム - 既に新属性がある場合は古い属性を削除 手動対応が必要なパターン: - 複数のボタン属性を統合(actionText + actionTheme等) - decorators.closeButtonLabelの値抽出 参考: https://github.com/kufu/smarthr-ui/releases/tag/smarthr-ui-v95.0.0 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
AppLauncherはLanguageSwitcher/InputFileとは異なり、decoratorsを単純削除するのではなく、 decorators.triggerLabelをtriggerLabel属性に移行する必要がある。 修正内容: - AppLauncher専用のチェッカーを追加 - decorators.triggerLabelの値抽出は複雑なためエラーのみ表示 - triggerLabel属性が既にある場合はdecorators削除を自動修正 - README、REFERENCE、テストケースを更新 参考: kufu/smarthr-ui#6233 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- actionText + actionTheme/actionDisabledの場合、Object形式へ自動変換
- decorators.closeButtonLabelから値を自動抽出(引数なしの関数のみ)
- () => "OK" → "OK"
- () => variable → {variable}
- () => getLabel() → {getLabel()}
- () => obj.prop → {obj.prop}
- テストケースを追加(関数呼び出し、オブジェクトプロパティなど)
- README.mdとREFERENCE.mdを更新
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- extractDecoratorValue関数を使用して値を抽出
- 固定値(リテラル)の場合 → decoratorsを削除(IntlProviderに任せる)
- 動的な値(変数、関数呼び出しなど)の場合 → triggerLabel属性に移行
- テストケースを追加(固定値、動的な値、引数あり、BlockStatementなど)
- README.mdとREFERENCE.mdを更新
例:
- () => "Apps" → decorators削除
- () => featureName → triggerLabel={featureName}
- () => getLabel() → triggerLabel={getLabel()}
- () => labels.app → triggerLabel={labels.app}
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
smarthr-ui v94→v95の移行ルールを追加しました。
対応する破壊的変更
LanguageSwitcher, AppLauncher, InputFile: decorators属性の削除
FormDialog, ActionDialog: ボタン属性をObject形式に統合
actionText,actionTheme,actionDisabled→actionButtoncloseDisabled→closeButtondecorators.closeButtonLabel→closeButtonMessageDialog: decorators削除とcloseButton属性への統一
decorators.closeButtonLabel→closeButton自動修正可能なパターン
手動対応が必要なパターン
実装方針
複雑な変換が必要な場合、完全な自動修正を目指すと実装が複雑になりすぎるため、段階的なアプローチを採用しました:
Test plan
参考
🤖 Generated with Claude Code