Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(progress-bar): Missing --mdc-linear-progress-active-indicator-shape property for progress-bar #28554

Open
uus-dev opened this issue Feb 7, 2024 · 1 comment
Labels
area: material/progress-bar feature This issue represents a new feature or feature request rather than a bug or bug fix P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@uus-dev
Copy link

uus-dev commented Feb 7, 2024

Feature Description

Currently if I want to change the shape of the progress bar to be round like, I only have the --mdc-linear-progress-track-shape to set the track shape, but not the same option for the shape of the active-indicator, which will still be square.
Also, only setting the --mdc-linear-progress-track-shape, will result in the active indicator overflowing, leaving me with an inconsistent progress-bar (see 1st picture)

Hence that leaves me with the better option of just setting the border-radius of the mat-progress-bar element itself, because this doesn't cause the active-indicator to overflow. In this case the --mdc-linear-progress-track-shape becomes redundant.

  1. Screenshot with --mdc-linear-progress-track-shape: 4px;, causing the active-indicator to overflow:
image
  1. Screenshot with --mdc-linear-progress-track-shape: 4px; and border-radius: 4px, rendering the --mdc-linear-progress-track-shape redundant:
image
  1. Screenshot with only border-radius: 4px; leaving me with an almost round progress bar, except that the active-indicator is not actually round.
image

So there need to be an option to set the --mdc-linear-progress-active-indicator-shape like for other components, so that the active-indicator can be made round, as shown in the Token and Specs section in the Material 3 specification

Use Case

This would enable a very relevant an normal use case that is also shown in the Token and Specs section in the Material 3 specification.

@uus-dev uus-dev added feature This issue represents a new feature or feature request rather than a bug or bug fix needs triage This issue needs to be triaged by the team labels Feb 7, 2024
@andrewseguin andrewseguin added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent area: material/progress-bar and removed P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent needs triage This issue needs to be triaged by the team area: material/progress-bar labels Feb 27, 2024
@danieljancar
Copy link

danieljancar commented Dec 17, 2024

Whats the status of this issue?

@use '@angular/material' as mat;

.progress-bar-wrapper {
 display: flex;
 align-items: center;

 @include mat.progress-bar-overrides((
    active-indicator-height: 10px,
    track-height: 10px,
    track-shape: 100px
  ))
}

Image

Should defo be fixed pls 🚀❤


Workaround

.myClass {
  .mat-mdc-progress-bar {
    border-radius: 4px; 
  }

  @include mat.progress-bar-overrides(
    (
      active-indicator-height: 10px,
      track-height: 10px,
      track-shape: 4px,
      // active-track-shape..
    )
  );
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/progress-bar feature This issue represents a new feature or feature request rather than a bug or bug fix P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

No branches or pull requests

3 participants