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

fix(Progress): prevented empty desc and status from rendering #5387

Merged
merged 3 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/patternfly/components/Progress/progress.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,16 @@
{{#if progress--attribute}}
{{{progress--attribute}}}
{{/if}}>
{{> progress-description}}
{{> progress-status}}
{{#if progress__description}}
{{> progress-description}}
{{/if}}
{{#if progress--no-measure}}
{{#if (concat progress--danger progress--success progress--warning)}}
{{> progress-status}}
{{/if}}
{{else}}
{{> progress-status}}
{{/if}}
{{> progress-bar}}
{{#if progress__helper-text}}{{> progress-helper-text}}{{/if}}
{{> @partial-block}}
Expand Down
7 changes: 5 additions & 2 deletions src/patternfly/components/Progress/progress.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
--pf-c-progress__bar--Height: var(--pf-global--spacer--md);
--pf-c-progress__bar--BackgroundColor: var(--pf-global--BackgroundColor--light-100); // the bar always needs white under it so that the semi-transparent color shows correctly
--pf-c-progress__measure--m-static-width--MinWidth: 4.5ch; // 4.5 because the % character is wider than a 0
--pf-c-progress__status--Gap: var(--pf-global--spacer--sm);
--pf-c-progress__status-icon--Color: var(--pf-global--Color--100); // the status icon default color is the default text color
--pf-c-progress__status-icon--MarginLeft: var(--pf-global--spacer--sm);
--pf-c-progress__bar--before--Opacity: .2; // one-off change in opacity to allow progress bar to automatically coordinate with the indicator color
--pf-c-progress__indicator--Height: var(--pf-c-progress__bar--Height);
--pf-c-progress__indicator--BackgroundColor: var(--pf-c-progress__bar--before--BackgroundColor);
Expand Down Expand Up @@ -158,15 +158,18 @@

// the progress__status is displayed in the upper right
.pf-c-progress__status {
display: flex;
align-items: flex-start;
justify-content: flex-end;
grid-column: 2 / 3;
grid-row: 1 / 2;
text-align: right;
word-break: break-word;
gap: var(--pf-c-progress__status--Gap);
}

// the progress__status-icon is an icon displayed always in the upper right
.pf-c-progress__status-icon {
margin-left: var(--pf-c-progress__status-icon--MarginLeft);
color: var(--pf-c-progress__status-icon--Color);
}

Expand Down