Skip to content

MudProgressLinear: Add ShowBackground#12443

Merged
danielchalmers merged 8 commits intoMudBlazor:devfrom
91378246:feature/add-pb-transparent-background-option
Jan 18, 2026
Merged

MudProgressLinear: Add ShowBackground#12443
danielchalmers merged 8 commits intoMudBlazor:devfrom
91378246:feature/add-pb-transparent-background-option

Conversation

@91378246
Copy link
Contributor

@91378246 91378246 commented Jan 14, 2026

This PR adds the parameter ShowBackground to MudProgressLinear which allows you to hide the background of the pb:
image

@mudbot mudbot bot changed the title Add TransparentBackground to progress linear MudProgressLinear: Add TransparentBackground Jan 14, 2026
@mudbot mudbot bot added the enhancement Adds a new feature or enhances existing functionality (not fixing a defect) in the main library label Jan 14, 2026
@91378246
Copy link
Contributor Author

@ScarletKuro What does the ParameterStateAttribute do or when should I use it? Haven't seen it in other components before:

[AttributeUsage(AttributeTargets.Property)]
public class ParameterStateAttribute : Attribute
{
    public ParameterUsageOptions ParameterUsage { get; set; } = ParameterUsageOptions.All;
}

[Flags]
public enum ParameterUsageOptions
{
    None = 0,
    Read = 1 << 1,
    Write = 1 << 2,
    All = Read | Write
}

Copy link
Member

@danielchalmers danielchalmers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable. Could you revert the other changes/cleanup to keep the diff minimal?

@91378246
Copy link
Contributor Author

@danielchalmers For future PRs: Should I always create a separate PR for cleanups or do you don't want cleanups at all?

@danielchalmers
Copy link
Member

danielchalmers commented Jan 14, 2026

@danielchalmers For future PRs: Should I always create a separate PR for cleanups or do you don't want cleanups at all?

We usually don't do separate PRs - might make the changes when the code in a PR naturally touches those areas. Like if this was a bigger feature it would blend in fine, but for something small it's nice to have bite-sized PRs.

@ScarletKuro
Copy link
Member

@ScarletKuro What does the ParameterStateAttribute do or when should I use it? Haven't seen it in other components before:

This is when you use ParameterState. Adding [ParameterState] enables our analyzer to flag cases where someone reads from or writes to the component parameter directly instead of using the ParameterState field.
https://github.com/search?q=repo%3AMudBlazor%2FMudBlazor+%5BParameter%2C+ParameterState%5D&type=code

The other options don’t do anything yet, except that None disables the analyzer. The rest are intended for a future source generator, which will apply the attributes automatically rather than requiring them to be added manually.

Copy link
Member

@danielchalmers danielchalmers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, let's flip it from TransparentBackground to ShowBackground. The implementation looks good 👍

@91378246
Copy link
Contributor Author

image

Copy link
Member

@danielchalmers danielchalmers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! If you could update title/description I'll merge

@91378246 91378246 changed the title MudProgressLinear: Add TransparentBackground MudProgressLinear: Add ShowBackground Jan 18, 2026
@danielchalmers danielchalmers merged commit 5ae08e8 into MudBlazor:dev Jan 18, 2026
5 checks passed
@danielchalmers
Copy link
Member

Thank you!

This was referenced Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Adds a new feature or enhances existing functionality (not fixing a defect) in the main library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants