Repository navigation
fix: bring the Stepper, Input, Textarea, Sheet and Drawer templates up to the package - #68
Merged
Merged
Conversation
The CLI Stepper gains the data-driven StepItems mode, and the parts read ActiveStep instead of the CurrentStep parameter, so the stepper no longer overwrites a parameter it doesn't own. StepItem ships as a new stepper-models template that stepper depends on. Part of #52
The Input template nested InputVariant inside the component, so callers had to write Input.InputVariant.Error, and Textarea had no variant at all. Both now match the package: input-variants and textarea-variants templates in Components/UI/Variants, like button-variants, and Textarea gains Variant, ReadOnly, OnFocus and OnBlur. Part of #52
…hemselves Like the package, they now use the compositional parts when Title and Description are both empty, so Compositional="true" is no longer needed. The flag still works. Part of #52
Adds them to both sync theories, parses the new stepper-models, input-variants and textarea-variants templates, and checks that the compositional Stepper shows the active step after Next. Part of #52
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 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.
Part of #52. The last batch where the package copy wins. After this, 210 of 217 components match their CLI template, and the rest are recorded as allowed drift (CopyButton, CommandPalette, InputOTP, SidebarProvider, AppSidebar, and Resizable, which is #67).
StepItemsmode. The parts readActiveStepinstead of theCurrentStepparameter, so the stepper stops overwriting a parameter it doesn't own.StepItemships in a new hiddenstepper-modelstemplate thatstepperdepends on.InputVariantinside the component, so you had to writeInput.InputVariant.Error. Textarea had no variants. Both now use newinput-variants/textarea-variantstemplates inComponents/UI/Variants, likebutton-variants. Textarea also gainsReadOnly,OnFocusandOnBlur. If someone wroteInput.InputVariant.Error, that becomesInputVariant.Errorwhen they re-addinput.TitleandDescriptionare empty, like the package does.Compositional="true"still works but isn't needed.Tests: 426 passing, 0 warnings. All five are now in both sync theories, the three new templates are in the parse test, and there's a behaviour test for the compositional Stepper.
Checked in a real app (a fresh
dotnet new blazorin %TEMP%, local CLIinit --yes+add stepper input textarea sheet drawer): builds with 0 warnings. Sheet and Drawer open from their parts with no flag. Both Stepper modes advance and show Confirm on the last step.InputVariant.Errorresolves without the nesting.Known issue, not new: the Error variant's red border loses to
border-input, becauseShell.Cnkeeps both border colours. The old template had the same issue, and #51 fixes it.