-
Notifications
You must be signed in to change notification settings - Fork 55
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
Apply MUI theming to Register Model Form #451
Conversation
399fa3e
to
7c69950
Compare
1a667ed
to
43b0035
Compare
64b3e38
to
21b5e61
Compare
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.
Nice catch, thank you @Griffin-Sullivan ! Resize is disabled for text areas in MUI - updated the styles to reflect this.
69f59d5
to
1f87981
Compare
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.
LGTM. One enhancement code wise and a question
<div className="form-fieldset-wrapper"> | ||
{pathInput} | ||
<fieldset aria-hidden="true" className="form-fieldset"> | ||
<legend className="form-fieldset-legend"> | ||
<span>Path</span> | ||
</legend> | ||
</fieldset> | ||
</div> |
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.
I think this could be cleaner if we add a simple component for this and reuse it for each FormGroup.
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.
Even just a small component function at the top of the page if we only need it for this file. If it can be used in other places then we can make it a common component.
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.
Good point, thanks @Griffin-Sullivan! Updated this fieldset wrapper to be a reusable component.
<div className="form-fieldset-wrapper"> | ||
{modelDescriptionInput} | ||
<fieldset aria-hidden="true" className="form-fieldset"> | ||
<legend className="form-fieldset-legend"> | ||
<span>Model Description</span> | ||
</legend> | ||
</fieldset> | ||
</div> |
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.
Why does this structure need to be added? Is this how we get the label to get inserted into the TextInput? Not against anything here just looking to learn.
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.
Great question! Yes, this applies the nested label within the input border, which couldn't be achieved with pure CSS using PF's default component structure. MUI uses fieldset
to achieve this styling which we applied here to get the same look and feel on the text fields.
f033a9d
to
74bb5a2
Compare
d1d2957
to
f6f7428
Compare
Signed-off-by: Jenny <[email protected]> fix tests Signed-off-by: Jenny <[email protected]> add fieldset to custom components fix spacing issue with helper text Signed-off-by: Jenny <[email protected]> remove comment Signed-off-by: Jenny <[email protected]> fixes for text area Signed-off-by: Jenny <[email protected]> format Signed-off-by: Jenny <[email protected]> add model description fix Signed-off-by: Jenny <[email protected]> create reusable fieldset component Signed-off-by: Jenny <[email protected]> move fieldset to components Signed-off-by: Jenny <[email protected]> add prop for className Signed-off-by: Jenny <[email protected]> lint Signed-off-by: Jenny <[email protected]> fix import warnings fix TS error with FormFieldset.tsx Signed-off-by: Jenny <[email protected]> fix import order errors
ecc6885
to
d269ac3
Compare
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.
/lgtm
@lucferbux: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ederign, Griffin-Sullivan, lucferbux The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
Description
Applies theming and styles to MR UI for Registered Model Form.
Before:
After:
How Has This Been Tested?
Visual updates only - tested manually in UI. Navigate to Model Registry list view and click "Register Model" button in toolbar.
Merge criteria:
DCO
check)If you have UI changes