[New Component] Stepper (Wizard) with per-step validation

Đang mở
#1,336 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
15/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
bootstrap, csharp
Lĩnh vực
frontend

Hướng nghiên cứu

The work is a new component under blazorbootstrap/Components/Stepper/, and the issue says the existing Tabs component is the nearest reference, so read that first. Demo pages and the docs page docs/docs/05-components/stepper.mdx are the other touchpoints. Done means the must-have checklist, the demo page scenarios and the Server and WebAssembly checks all pass, which is a multi-step design effort rather than a first-timer task.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area-forms area-stepper new component

Summary

Add a Stepper component that guides users through a multi-step process (checkout, onboarding, setup wizard) with optional per-step form validation.

Motivation

Stepper/wizard is one of the most up-voted component requests across the Blazor UI ecosystem. Blazor Bootstrap users currently build it manually on top of Tabs. The key ask is validating each step's form before moving forward.

Proposed API (draft)

<Stepper @bind-ActiveStepIndex="step" Linear="true" Orientation="Orientation.Horizontal"
         OnStepChanging="OnStepChangingAsync" OnFinish="SubmitAsync">
    <StepperStep Title="Account" IconName="IconName.Person" EditContext="accountContext">
        ...
    </StepperStep>
    <StepperStep Title="Address" Optional="true">...</StepperStep>
    @if (needsPayment)
    {
        <StepperStep Title="Payment">...</StepperStep>
    }
    <StepperStep Title="Review">...</StepperStep>
</Stepper>

Must-have features (v1)

  • Orientation (Horizontal, Vertical).
  • Step header: number (default), IconName, or HeaderTemplate; Title and Description.
  • Linear mode (cannot skip ahead) and non-linear mode (click any header).
  • Per-step EditContext: advancing validates the current step and blocks on errors.
  • OnStepChanging (async, cancellable via event args) and OnStepChanged.
  • @bind-ActiveStepIndex; methods NextAsync, PreviousAsync, GoToAsync(index), ResetAsync.
  • Step states: Completed, Active, Error, Disabled, Optional, Skippable.
  • Conditional steps: steps added/removed at runtime re-index correctly.
  • Built-in Back / Next / Finish buttons with text parameters and ActionsTemplate override; OnFinish event.

Accessibility

  • Step list rendered as an ordered list; active header has aria-current="step".
  • Step state (completed, error) announced in text, not by color only.
  • Focus moves to the step panel heading on step change.

Out of scope (later)

  • Responsive collapse of headers into "Step 2 of 5".
  • Summary/review step helper.

Acceptance criteria

  • Component in blazorbootstrap/Components/Stepper/.
  • XML docs on all public parameters, methods, and events.
  • Demo page covering: horizontal, vertical, linear, non-linear, validation per step, cancel step change, optional/skippable, conditional steps, custom headers, custom actions.
  • Verified in Server and WebAssembly demo hosts.
  • Docs page docs/docs/05-components/stepper.mdx.
  • Builds for .NET 8, 9, 10.
Ngôn ngữ chính
HTML
Star
1.2k
Fork
111
Merge trung bình
4 phút
Pull request đã merge (30 ngày)
55

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của vikramlearning/blazorbootstrap

Tất cả issue của vikramlearning/blazorbootstrap

Issue tương tự

Thêm issue về Web Dev

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.