Add a generic ProgressBar component to wicket-extensions

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

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

@reiern70 đang làm issue này rồi.

Từ ngày 1/10/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Wicket has no general-purpose progress bar. UploadProgressBar is tied to file uploads, so applications that need to show the progress of some work (a background job, an import, a multi-step process) each build their own markup and CSS.

This proposes org.apache.wicket.extensions.markup.html.progress.ProgressBar, a small CSS-only component:

  • Model: an IModel<? extends Number> holding a percentage. Values are rounded and clamped to 0–100.
  • Indeterminate: a null model value renders an indeterminate bar, for work whose end is unknown ("working on it"): no percentage, only an animated striped bar. isIndeterminate() tells which state the bar is in.
  • Markup: attached to a . It renders a native element (no value attribute when indeterminate) and a label such as 42%. Existing class attributes on the tag are kept. The same markup is available as a string from ProgressBar.markup(value) and ProgressBar.indeterminateMarkup(), for example as the template of a column rendered in the browser.
  • Content Security Policy: no inline style; the width comes from the progress element itself, so the bar works under a strict CSP.
  • Accessibility: the native progress element carries the value for assistive technology; the visible label is aria-hidden.
  • Styling: the look comes from wicket-progress-bar.css, contributed by the component. It uses the classes wicket-progress-bar, wicket-progress-bar-value and wicket-progress-bar-label, so applications can restyle it. The filled part is striped and the stripes move; the animation stops when the user prefers reduced motion. The label is bold on a chip of the track's color, so it stays readable over the filled part and on dark pages. Colors come from the shared themes of wicket-extensions (org.apache.wicket.extensions.theme) where a theme applies, with a neutral default otherwise.
  • Updating: the component re-renders like any other, so target.add(progressBar) in an Ajax or web socket request updates it.
Ngôn ngữ chính
Java
Star
800
Fork
437
Merge trung bình
21 giờ 36 phút
Pull request đã merge (30 ngày)
167

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 apache/wicket

Tất cả issue của apache/wicket

Issue tương tự

Thêm issue về Java

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.