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

Conversation

thatblindgeye
Copy link
Contributor

Closes #4328

@patternfly-build
Copy link

patternfly-build commented Feb 16, 2023

Comment on lines 27 to 29
{{#unless progress--no-measure}}
{{> progress-status}}
{{/unless}}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we only want to remove the status element if there is no measure and no status icon. This update removes the icon from this example, which I don't think we want to do. https://patternfly-pr-5387.surge.sh/components/progress#failure-without-measure

This is the current v4 example that has an empty __status element - https://pf4.patternfly.org/components/progress#without-measure

Screenshot 2023-02-16 at 3 24 19 PM

Another small thing is that there is a margin on the status icon when there is no measure. What might be better is to turn __status into display: flex; justify-content: flex-end; align-items: flex-start; gap: var(--whatever-spacer-that-margin-uses). That will also remove any space created by whitespace between the measure and status icon, too, and let the gap serve as the only source of space between those elements.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the styling to __status, and also removed the status-icon__MarginLeft var since this is a breaking change issue and it would no longer serve any purpose.

The conditional rendering should be working as intended now.

Copy link
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

LGTM! One small formatting change, not a blocker.

Comment on lines 27 to 32
{{#if progress--no-measure}}
{{#if (concat progress--danger progress--success progress--warning)}}
{{> progress-status}}
{{/if}}
{{else}} {{> progress-status}}
{{/if}}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit

Suggested change
{{#if progress--no-measure}}
{{#if (concat progress--danger progress--success progress--warning)}}
{{> progress-status}}
{{/if}}
{{else}} {{> progress-status}}
{{/if}}
{{#if progress--no-measure}}
{{#if (concat progress--danger progress--success progress--warning)}}
{{> progress-status}}
{{/if}}
{{else}}
{{> progress-status}}
{{/if}}

@mcoker mcoker merged commit 977b226 into patternfly:v5 Feb 27, 2023
@patternfly-build
Copy link

🎉 This PR is included in version 5.0.0-alpha.19 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Progress - Don't render top progress description and status elements when empty
3 participants