Skip to content

MudStepper: Fix some bugs and improve documentation#9989

Merged
henon merged 11 commits intoMudBlazor:devfrom
henon:stepper-fixes
Oct 12, 2024
Merged

MudStepper: Fix some bugs and improve documentation#9989
henon merged 11 commits intoMudBlazor:devfrom
henon:stepper-fixes

Conversation

@henon
Copy link
Contributor

@henon henon commented Oct 12, 2024

Description

Follow-up to PRs #9911, #9925 and #9931

This PR fixes the following issues in MudStepper

  • Stepper should jump over disabled steps
  • Add a navigation control example
  • Fix bug: dynamically added steps not immediately rendered
  • Hide skip button if step is not skippable
  • Allow to configure action button icons
  • Separate the next and complete action buttons (even though both call the same API). But they are styled differently (text and icon) and shown under mutually exclusive circumstances.

To see all issues catalogged for MudStepper see #9928

Docs changes:

Less boring/repetitive second example

image

Customization example has better action buttons now

image
image
image

New controlled navigation example

image
image
image

How Has This Been Tested?

unit && visually

Type of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (fix or improvement to the website or code docs)

Checklist

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

@henon henon added bug Unexpected behavior or functionality not working as intended hacktoberfest Hacktoberfest 2021 hacktoberfest-accepted Issues and PRs which were accepted as Hacktoberfest submissions hacktoberfest2024 labels Oct 12, 2024
@henon henon requested a review from ScarletKuro October 12, 2024 14:26
@codecov
Copy link

codecov bot commented Oct 12, 2024

Codecov Report

Attention: Patch coverage is 80.95238% with 4 lines in your changes missing coverage. Please review.

Project coverage is 90.91%. Comparing base (28bc599) to head (56d8423).
Report is 553 commits behind head on dev.

Files with missing lines Patch % Lines
...c/MudBlazor/Components/Stepper/MudStepper.razor.cs 77.77% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #9989      +/-   ##
==========================================
+ Coverage   89.82%   90.91%   +1.08%     
==========================================
  Files         412      407       -5     
  Lines       11878    12610     +732     
  Branches     2364     2458      +94     
==========================================
+ Hits        10670    11464     +794     
+ Misses        681      587      -94     
- Partials      527      559      +32     

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

@henon
Copy link
Contributor Author

henon commented Oct 12, 2024

Even better explanation of the navigation control event
image

@danielchalmers
Copy link
Member

  • Skip button isn't shown on the first step
  • Maybe "Reset" should be "First" or something similar to avoid the implication that it resets all the data in the steps
  • Reset button is always enabled if Step 1 has an error
  • In "Controlling navigation", I would think the next steps would be disabled until the prerequisite is complete, instead of showing a modal telling you since it already has validation errors

@henon
Copy link
Contributor Author

henon commented Oct 12, 2024

  • Skip button isn't shown on the first step

That is expected. The first step is not skippable in the docs. I changed that the SkipButton is only shown if the step is skippable. I think that is better UI. For most steppers the button will never be shown because they have no skippable steps and I think that is good.

  • Maybe "Reset" should be "First" or something similar to avoid the implication that it resets all the data in the steps

The reset button is actually only for the docs so that users can revert to the initial state. In real life you'd not need it.

  • Reset button is always enabled if Step 1 has an error

This is expected.

  • In "Controlling navigation", I would think the next steps would be disabled until the prerequisite is complete, instead of showing a modal telling you since it already has validation errors

Yeah, good point. But we currently can't do that with the existing design. We'll need to add more API to the event to distinguish between the stepper just checking if the action would be allowed and an actual attempt by the user.

@henon henon merged commit 06bd49a into MudBlazor:dev Oct 12, 2024
ScarletKuro pushed a commit that referenced this pull request Oct 12, 2024
@henon henon deleted the stepper-fixes branch November 12, 2024 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unexpected behavior or functionality not working as intended hacktoberfest Hacktoberfest 2021 hacktoberfest2024 hacktoberfest-accepted Issues and PRs which were accepted as Hacktoberfest submissions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants