Repository navigation
Conversation
shellui update replaces a component but leaves the app's pages on the old API, so the build breaks. migrate reads the project's .razor and .cs files (not the installed components or build output), shows each changed line and asks before writing; --dry-run only shows, --yes writes without asking and is required outside an interactive terminal. Migrations, from the release notes' upgrade sections: - input: Input.InputVariant.X -> InputVariant.X - date-picker / time-picker: SelectedDate / SelectedTime (with Changed and @bind-) -> Value, on those tags only, so Calendar is untouched - pagination: OnPageChange -> CurrentPageChanged, unless the tag binds CurrentPage - calendar: reports SelectedDateChanged handlers that take a DateTime instead of DateTime?; nothing is rewritten Fixes #58
Each migration, tag scoping (Calendar left alone, > inside a quoted value), the bound-CurrentPage exception, skipping installed components and obj, the Calendar note and an up-to-date app.
Applied with shellui migrate pagination.
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
This branch has not been deployed
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.
Fixes #58.
shellui updatereplaces a component but leaves your pages on the old API, so the build breaks.shellui migratefixes the known cases:It reads the project's own
.razorand.csfiles. It skips the installed components underComponentsPath(update rewrites those) andbin,objandnode_modules. It shows each changed line, and nothing is written without a yes.Migrations, taken from the release notes' upgrade sections:
inputInput.InputVariant.X→InputVariant.Xdate-pickerSelectedDate/SelectedDateChanged/@bind-SelectedDate→Value/ValueChanged/@bind-Value, on<DatePicker>tags only, soCalendaris untouchedtime-pickerSelectedTimeon<TimePicker>paginationOnPageChange→CurrentPageChanged, except on a tag that bindsCurrentPage(that would set it twice)calendarSelectedDateChangedhandlers that take aDateTime(nowDateTime?). Not rewritten, since the handler body may need changes too.Tag rewrites scan to the tag's closing
>outside quotes, so attributes spread over several lines and>inside a quoted value are handled.Checked end to end in a fresh
dotnet new blazorapp:input,date-picker,time-picker,paginationandcalendarwith the local CLI, then wrote a page in the old API. It failed to build.migrate --dry-runshowed the four rewrites and flagged the Calendar handler.--yesin a pipe, nothing was written (exit 1).--yesrewrote the page. After fixing the flagged handler, the app built with 0 errors and 0 warnings, and a second run said "Nothing to migrate".On the demo app it found one real case, the deprecated
Pagination.OnPageChange, which is migrated here.Tests: 540 passing on net8.0 and net10.0, 0 warnings.