Skip to content

Update to MUI 7 #4139

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

Merged
merged 8 commits into from
Jun 19, 2025
Merged

Update to MUI 7 #4139

merged 8 commits into from
Jun 19, 2025

Conversation

marlo-longley
Copy link
Member

@marlo-longley marlo-longley commented Apr 11, 2025

This was mostly created using MUI's codemods.
The Grid2 component has moved back into the Grid namespace. That is the biggest change.
(for testing purposes, also included is @lutzhelm's syntax for externalizing peer dependencies but I can slice this out into another PR.)

Visually, the changes seem to have no impact, but of course more eyes are better!

I am interested in this upgrade because of the solution for better ESM support: mui/material-ui#45495. This will fix some issues reported during plugin integration such as #4136

If this is approved and merged and we cut a new alpha release, I have PRs drafted locally for several plugins to support this change. And some like image-tools seem to require zero changes to support 7.

@marlo-longley marlo-longley marked this pull request as ready for review April 11, 2025 16:16
Copy link

codecov bot commented Apr 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.91%. Comparing base (48ca7e0) to head (dfdc629).
Report is 15 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4139      +/-   ##
==========================================
- Coverage   94.91%   94.91%   -0.01%     
==========================================
  Files         324      324              
  Lines       16147    16142       -5     
  Branches     2533     2531       -2     
==========================================
- Hits        15326    15321       -5     
  Misses        816      816              
  Partials        5        5              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@lutzhelm lutzhelm left a comment

Choose a reason for hiding this comment

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

Not an entire review, just wanted to leave this here for them moment.

(Thanks for figuring out a solution.)

Copy link
Contributor

@lutzhelm lutzhelm left a comment

Choose a reason for hiding this comment

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

Otherwise, I found no issues.

I was also able to use this in the share, download and image-tools plugins and had no trouble with tests or builds.

@marlo-longley
Copy link
Member Author

@lutzhelm when you reviewed this yesterday did you still encountering the centering issues? I cannot reproduce them.

@lutzhelm
Copy link
Contributor

@marlo-longley The "Show collection" button still appears aligned to the left for me. I also had a colleague check the preview with Chrome on Windows - same behavior.
On the other hand, the "Welcome to Mirador" label on a blank workspace appears centered as intended.

@dnoneill
Copy link
Collaborator

The resource location input is really scrunched.
Screenshot 2025-05-28 at 4 15 27 PM

How it looks on main
Screenshot 2025-05-28 at 4 15 56 PM

@lutzhelm
Copy link
Contributor

lutzhelm commented Jun 2, 2025

@dnoneill Another mystery of different behaviors for different people. The resource location input looks the same to me on main, the mui7 branch and in version 3 in Firefox and Chrome on Ubuntu. Did you use a local install for the mui7 screenshot? And what browser / OS did you use?

@marlo-longley
Copy link
Member Author

marlo-longley commented Jun 2, 2025

Honestly I am confused. I am making a list of the remaining visual issues here.

  • Show Collection button off-center
    -- Lutz and Alberto see this, Marlo can't reproduce
Screenshot 2025-06-02 at 10 57 18 AM
  • ManifestList layout issues
    -- Lutz reports, Marlo thinks this is fixed
  • ManifestListItemError -- compressed/wrapping in undesired way
    -- Lutz reports, Marlo can't reproduce
Screenshot 2025-06-02 at 11 03 08 AM
  • Resource location input too narrow
    -- Niqui and Marlo see the issue, but Lutz can't reproduce
Screenshot 2025-06-02 at 11 03 00 AM

@marlo-longley
Copy link
Member Author

@dnoneill I added a new commit to address the ManifestItem input width issue. I was seeing the issue too (thanks for catching it). But I understand that Lutz was never able to see it.

@marlo-longley
Copy link
Member Author

@lutzhelm I addressed all the design issues in the checklist. Thanks for your help earlier today.

@lutzhelm
Copy link
Contributor

lutzhelm commented Jun 6, 2025

Thanks @marlo-longley, I can confirm that ManifestList and ManifestListItemError look good now, as well as the iiif resource input. However, the "Show Collection" button still appears aligned to the left for me.

@marlo-longley
Copy link
Member Author

@lutzhelm thanks for catching that. It should be fixed now.

Copy link
Contributor

@lutzhelm lutzhelm left a comment

Choose a reason for hiding this comment

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

Hi @marlo-longley, I'm sorry this took so long, but I noticed some differences between the stable version and this branch that should probably be addressed at some point - and then I got caught in a lot of other things.

Basically, the appearance on small screens is difference. In previous versions, some elements had been moved to a second Grid row. I added some notes about the IIIF resource input field, but it is similar for the ManifestListItem and the ManifestListItemError - I just did not find the time to look into this more thoroughly.

I'd be fine if these issues would fixed later.

@marlo-longley
Copy link
Member Author

@lutzhelm I addressed most of your concerns about small screens. Thanks for the continued reviews. Here is how it looks now.

Screenshot 2025-06-18 at 12 09 59 PM Screenshot 2025-06-18 at 12 07 42 PM

@lutzhelm
Copy link
Contributor

Thanks, @marlo-longley, it all looks way better now. I'll take another look at the code tomorrow to complete the review. I'd be fine with merging this PR with or without he offset for the resource input button grids.

@lutzhelm lutzhelm merged commit d55b9cb into main Jun 19, 2025
9 checks passed
@lutzhelm lutzhelm deleted the mui7 branch June 19, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants