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

Apply PF Breaking Change Best Practices to MUI Theme Stylesheet #484

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

jenny-s51
Copy link
Contributor

@jenny-s51 jenny-s51 commented Oct 16, 2024

Description

Updates theming overrides to align with PF breaking change standards.

How Has This Been Tested?

N/A, refactoring only.
To test modal refactoring updates:

  1. Model Registry list view -> Actions menu on table row -> "Archive model"
  2. Model Registry list view -> Actions menu next to "Register Model" button in toolbar -> Click "View Archived Models" -> Archived models list view -> Actions menu on table row -> "Restore Model"
  3. Model Registry list view -> Click on model -> Versions Tab -> Actions menu on table row -> Click "Archive model version"
  4. Model Registry list view -> Click on model -> Versions Tab -> Actions menu next to "Register Model" button in toolbar -> Click "View Archived Versions"-> Archived versions list view -> Actions menu on table row -> "Restore Version"

Merge criteria:

  • All the commits have been signed-off (To pass the DCO check)
  • The commits have meaningful messages; the author will squash them after approval or in case of manual merges will ask to merge with squash.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work.
  • Code changes follow the kubeflow contribution guidelines.

If you have UI changes

  • The developer has added tests or explained why testing cannot be added.
  • Included any necessary screenshots or gifs if it was a UI change.
  • Verify that UI/UX changes conform the UX guidelines for Kubeflow.

@jenny-s51 jenny-s51 marked this pull request as draft October 16, 2024 20:43
@github-actions github-actions bot added Area/UI and removed size/M labels Oct 16, 2024
@jenny-s51 jenny-s51 force-pushed the apply-pf-standards branch 2 times, most recently from eb538ed to cb09832 Compare October 17, 2024 18:53
@jenny-s51 jenny-s51 changed the title [WIP] Apply PF Breaking Change Best Practices to MUI Theme Stylesheet Apply PF Breaking Change Best Practices to MUI Theme Stylesheet Oct 17, 2024
@jenny-s51 jenny-s51 marked this pull request as ready for review October 17, 2024 18:59
Copy link
Contributor

@alexcreasy alexcreasy left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution Jenny! I haven't tested this out yet, just read through the code, but it looks good.

There are just a few tiny changes related to checking in Red Hat references to the community codebase to take care of.

I'll update this if I find anything during testing :)

@@ -237,21 +242,24 @@
}

.pf-v6-c-form-control input {
// TODO: https://issues.redhat.com/browse/RHOAIENG-14702,
Copy link
Contributor

Choose a reason for hiding this comment

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

Small nit, we shouldn't check Red Hat references into the community codebase, could you remove the link to the internal JIRA please? :)

clients/ui/frontend/src/style/MUI-theme.scss Outdated Show resolved Hide resolved
Copy link
Contributor Author

@jenny-s51 jenny-s51 left a comment

Choose a reason for hiding this comment

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

Thank you for reviewing @alexcreasy - updated the stylesheet to apply your feedback.

@lucferbux
Copy link
Contributor

lucferbux commented Oct 18, 2024

@jenny-s51 I was trying to spot which css is overriding the button corner radious, but running it i've spotted this issue:
Screenshot 2024-10-18 at 17 03 46
I'm sorry i cannot add it in the right line 😅

The attribute is --pf-v6-c-button--BorderRadius: 50%

@jenny-s51
Copy link
Contributor Author

jenny-s51 commented Oct 18, 2024

Nice catch, thanks @lucferbux ! I've pushed a fix for the buttons and am still investigating as the modals will require some refactoring make sure the Alert in the modal is rendered and themed correctly. DashboardModalFooter currently uses Stack andActionsList around the buttons to render the Alert like this:

Screenshot 2024-10-18 at 5 03 01 PM

When using a form input in a modal, the PF recommendation is to render Alerts at the top of the form. Currently working on updating the modals to apply this change.

Copy link
Contributor Author

@jenny-s51 jenny-s51 left a comment

Choose a reason for hiding this comment

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

Updated from the deprecated PF5 model to use the PF6 modal and refactored the components per PF6 standards. The action buttons now have the correct shape (cc @lucferbux ), and the alert is shown at the top of the modal form per the design guidelines: https://staging-v6.patternfly.org/components/forms/form/design-guidelines#error-validation-on-submission

Screenshot 2024-10-24 at 1 27 23 PM

Signed-off-by: Jenny <32821331+jenny-s51@users.noreply.github.com>

update comment

Signed-off-by: Jenny <32821331+jenny-s51@users.noreply.github.com>

link to JIRA ticket

Signed-off-by: Jenny <32821331+jenny-s51@users.noreply.github.com>

remove ticket references

Signed-off-by: Jenny <32821331+jenny-s51@users.noreply.github.com>

fix styling bug with modal buttons, removes unneeded components from modal footer

fix styling bug with modal buttons, removes unneeded components from modal footer

Signed-off-by: Jenny <32821331+jenny-s51@users.noreply.github.com>

modal refactor, WIP

WIP, refactor modals to apply recommended PF component structure

refactor remaining modals

refactor remaining modal

format

remove unused comment

revert comment

Signed-off-by: Jenny <32821331+jenny-s51@users.noreply.github.com>

fix tests

Signed-off-by: Jenny <32821331+jenny-s51@users.noreply.github.com>

fix import order
Copy link
Contributor

@lucferbux lucferbux left a comment

Choose a reason for hiding this comment

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

/lgtm

So far breaking down some components into constants is a really great pattern, we are breaking a little bit the 1:1 match with downstream but checking the latest changes is not that big of a deal and would benefit in the future.

@ederign @alexcreasy could you guys take a look and approve?

Copy link

@lucferbux: changing LGTM is restricted to collaborators

In response to this:

/lgtm

So far breaking down some components into constants is a really great pattern, we are breaking a little bit the 1:1 match with downstream but checking the latest changes is not that big of a deal and would benefit in the future.

@ederign @alexcreasy could you guys take a look and approve?

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.

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ederign, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ederign
Copy link
Member

ederign commented Oct 28, 2024

/lgtm

@google-oss-prow google-oss-prow bot added the lgtm label Oct 28, 2024
@google-oss-prow google-oss-prow bot merged commit 6ce2832 into kubeflow:main Oct 28, 2024
16 checks passed
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.

4 participants