-
Notifications
You must be signed in to change notification settings - Fork 94
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(form-control): move background icons to element #5531
Merged
mcoker
merged 12 commits into
patternfly:v5
from
srambach:5469-move-bg-images-to-element
May 15, 2023
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
45bc807
feat(form-control): restructure removing bg icons
srambach 00d4f8c
feat(form-control): remove comment
srambach 42671a9
feat(form-control): fix merge
srambach b14a400
feat(form-control): address quick comment items
srambach 8c027da
feat(form-control): add pf-m-status to icon
srambach 851aaca
feat(form-control): remove form control
srambach c3a9ee4
feat(form-control): remove old comment
srambach 75353f8
feat(form-control): docs and better resize
srambach 0dca624
feat(form-control): rename invalid to error
srambach 708acc0
feat(form-control): fix some nits
srambach ceecc1f
feat(form-control): fix one more nit
srambach 2f05d20
feat(form-control): placeholder, disabled, select right padding
srambach File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
src/patternfly/components/FormControl/examples/FormControl.css
This file was deleted.
Oops, something went wrong.
198 changes: 69 additions & 129 deletions
198
src/patternfly/components/FormControl/examples/FormControl.md
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<div class="{{pfv}}form-control__icon{{#if form-control-icon--IsStatus}} pf-m-status{{/if}}{{#if form-control-icon--modifier}} {{form-control-icon--modifier}}{{/if}}" | ||
{{#if form-control-icon--attribute}} | ||
{{{form-control-icon--attribute}}} | ||
{{/if}}> | ||
<i class="fas fa-{{form-control--HasIcon}}" aria-hidden="true"></i> | ||
</div> |
16 changes: 16 additions & 0 deletions
16
src/patternfly/components/FormControl/form-control-select.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<select class="{{#if form-control-select--IsExpanded}} pf-m-expanded{{/if}}{{#if form-control-select--modifier}} {{form-control-select--modifier}}{{/if}}" | ||
{{#if form-control--IsDisabled}} disabled{{/if}} | ||
{{#if form-control--IsReadonly}} readonly{{/if}} | ||
{{#if form-control--IsRequired}} required{{/if}} | ||
{{#if form-control--attribute}} | ||
{{{form-control--attribute}}} | ||
{{/if}} | ||
>{{#if @partial-block}}{{> @partial-block}}{{/if}}</select> | ||
{{#> form-control-utilities}} | ||
{{#ifAny form-control--HasIcon form-control--IsError form-control--IsSuccess form-control--IsWarning}} | ||
{{> form-control-template-status}} | ||
{{/ifAny}} | ||
<div class="{{pfv}}form-control__toggle-icon"> | ||
<i class="fas fa-caret-down" aria-hidden="true"></i> | ||
</div> | ||
{{/form-control-utilities}} |
7 changes: 7 additions & 0 deletions
7
src/patternfly/components/FormControl/form-control-template-status.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{{#if form-control--IsSuccess}} | ||
{{> form-control-icon form-control-icon--IsStatus=true form-control--HasIcon='check-circle'}} | ||
{{else if form-control--IsWarning}} | ||
{{> form-control-icon form-control-icon--IsStatus=true form-control--HasIcon='exclamation-triangle'}} | ||
{{else if form-control--IsError}} | ||
{{> form-control-icon form-control-icon--IsStatus=true form-control--HasIcon='exclamation-circle'}} | ||
{{/if}} |
6 changes: 6 additions & 0 deletions
6
src/patternfly/components/FormControl/form-control-utilities.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<div class="{{pfv}}form-control__utilities{{#if form-control-utilities--modifier}} {{form-control-utilities--modifier}}{{/if}}" | ||
{{#if form-control-utilities--attribute}} | ||
{{{form-control-utilities--attribute}}} | ||
{{/if}}> | ||
{{> @partial-block}} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,5 +1,38 @@ | ||||||||||||||||||||||
<{{controlType}} class="{{pfv}}form-control{{#if form-control--IsExpanded}} pf-m-expanded{{/if}}{{#if form-control--modifier}} {{form-control--modifier}}{{/if}}" | ||||||||||||||||||||||
{{#if form-control--attribute}} | ||||||||||||||||||||||
{{{form-control--attribute}}} | ||||||||||||||||||||||
{{/if}} | ||||||||||||||||||||||
{{#if input}}>{{else}}>{{#if @partial-block}}{{> @partial-block}}{{/if}}</{{controlType}}>{{/if}} | ||||||||||||||||||||||
<div class="{{pfv}}form-control | ||||||||||||||||||||||
{{#if form-control--IsExpanded}} pf-m-expanded{{/if}} | ||||||||||||||||||||||
{{#if form-control--IsDisabled}} pf-m-disabled{{/if}} | ||||||||||||||||||||||
{{#if form-control--IsReadonly}} pf-m-readonly{{/if}} | ||||||||||||||||||||||
{{#if form-control--IsRequired}} pf-m-required{{/if}} | ||||||||||||||||||||||
{{#if form-control--IsPlaceholder}} pf-m-placeholder{{/if}} | ||||||||||||||||||||||
{{#if form-control--IsPlain}} pf-m-plain{{/if}} | ||||||||||||||||||||||
{{#if form-control--IsSuccess}} pf-m-success{{/if}} | ||||||||||||||||||||||
{{#if form-control--IsWarning}} pf-m-warning{{/if}} | ||||||||||||||||||||||
{{#if form-control--IsError}} pf-m-error{{/if}} | ||||||||||||||||||||||
{{#if form-control--HasIcon}} pf-m-icon{{/if}} | ||||||||||||||||||||||
{{#if form-control--modifier}} {{form-control--modifier}}{{/if}} | ||||||||||||||||||||||
"> | ||||||||||||||||||||||
{{#ifEquals controlType "select"}} | ||||||||||||||||||||||
{{> form-control-select}} | ||||||||||||||||||||||
{{else}} | ||||||||||||||||||||||
<{{controlType}} | ||||||||||||||||||||||
{{#if form-control--IsDisabled}} disabled{{/if}} | ||||||||||||||||||||||
{{#if form-control--IsReadonly}} readonly{{/if}} | ||||||||||||||||||||||
{{#if form-control--IsRequired}} required{{/if}} | ||||||||||||||||||||||
{{#if form-control--attribute}} | ||||||||||||||||||||||
{{{form-control--attribute}}} | ||||||||||||||||||||||
{{/if}} | ||||||||||||||||||||||
{{#if input}}>{{else}}>{{#if @partial-block}}{{> @partial-block}}{{/if}}</{{controlType}}>{{/if}} | ||||||||||||||||||||||
{{#ifAny form-control--HasIcon form-control--IsError form-control--IsSuccess form-control--IsWarning }} | ||||||||||||||||||||||
{{#> form-control-utilities}} | ||||||||||||||||||||||
{{#ifEquals form-control--HasIcon "clock"}} | ||||||||||||||||||||||
{{> form-control-icon}} | ||||||||||||||||||||||
{{else ifEquals form-control--HasIcon "calendar-alt"}} | ||||||||||||||||||||||
{{> form-control-icon}} | ||||||||||||||||||||||
{{else if form-control--HasIcon}} | ||||||||||||||||||||||
{{> form-control-icon}} | ||||||||||||||||||||||
{{/ifEquals}} | ||||||||||||||||||||||
{{> form-control-template-status}} | ||||||||||||||||||||||
Comment on lines
+27
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit, but I think most of this is unnecessary - seems like it would work by just testing for
Suggested change
|
||||||||||||||||||||||
{{/form-control-utilities}} | ||||||||||||||||||||||
{{/ifAny}} | ||||||||||||||||||||||
{{/ifEquals}} | ||||||||||||||||||||||
</div> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Love this update!