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

Rewriting most remaining MUI usage #2905

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

Conversation

olemartinorg
Copy link
Contributor

Description

I had some time between issues, so I started pulling in one end to see how many of our MUI imports I could rewrite in a fairly short amount of time. I think this should be most of the low-hanging fruit.

Related Issue(s)

Verification/QA

  • Manual functionality testing
    • I have tested these changes manually
    • Creator of the original issue (or service owner) has been contacted for manual testing (or will be contacted when released in alpha)
    • No testing done/necessary
  • Automated tests
    • Unit test(s) have been added/updated
    • Cypress E2E test(s) have been added/updated
    • No automatic tests are needed here (no functional changes/additions)
    • I want someone to help me make some tests
  • UU/WCAG (follow these guidelines until we have our own)
    • I have tested with a screen reader/keyboard navigation/automated wcag validator
    • No testing done/necessary (no DOM/visual changes)
    • I want someone to help me perform accessibility testing
  • User documentation @ altinn-studio-docs
    • Has been added/updated
    • No functionality has been changed/added, so no documentation is needed
    • I will do that later/have created an issue
  • Support in Altinn Studio
    • Issue(s) created for support in Studio
    • This change/feature does not require any changes to Altinn Studio
  • Sprint board
    • The original issue (or this PR itself) has been added to the Team Apps project and to the current sprint board
    • I don't have permissions to do that, please help me out
  • Labels
    • I have added a kind/* label to this PR for proper release notes grouping
    • I don't have permissions to add labels, please help me out

@olemartinorg olemartinorg added the kind/other Pull requests containing chores/repo structure/other changes label Jan 13, 2025
@olemartinorg olemartinorg self-assigned this Jan 13, 2025
Copy link
Contributor

@cammiida cammiida left a comment

Choose a reason for hiding this comment

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

Veldig nice! Skal ikke sette en stopper for noen ting, men hadde vært supernice om du brukte Designsystemet sine komponenter sånn at vi slipper å refaktorere dette igjen senere 😄 Tror også Percy-endringene er greie

Copy link
Contributor

Choose a reason for hiding this comment

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

Det finnes en Spinner i Designsystemet allerede. Skulle vi heller brukt den? 😄 Vet at den er brukt flere andre steder i hvert fall.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ja, jeg har ikke sett på CircularProgress og gjort noe med den enda (derav 'most' i tittelen på PRen). Helt enig på generell basis at det er best å bruke designsystemet sine komponenter. 🙌

prop={props.summaryDataObject[name]}
/>
export const AltinnSummaryTable = ({ summaryDataObject }: IAltinnSummaryTableProps) => (
<table className={classes.table}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Hvorfor ikke Designsystemet Table-komponent? 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fordi denne tabellen, rent utseendemessig, er heeelt basic. Det er såvidt det er en tabell engang. Jeg prøvde først å bare lage denne visningen med noen div-elementer og css grid, men det ble mye knot. Alt ble veldig mye enklere når jeg bare gjorde den om til en helt vanlig table. Med designsystemet måtte jeg ha overstyrt massevis av styling for å få den til å se ut som en simpel tabell (altså gitt at den skulle se lik ut), så det ville jo vært mot hensikten.

Jeg synes godt vi kan bytte ut denne greia med noe annet i fremtiden, men jeg er usikker på om tabellen fra designsystemet er riktig det heller. Men ingen poeng i å endre utseendet på den nå i forbindelse med fjerning av MUI.

) : (
<List classes={{ root: classes.list }}>
<ul className={classes.list}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Her også, hvorfor ikke Designsystemet sin List? 🙈

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, her undersøkte jeg ikke like nøye, men basert på utseendet til denne tror egentlig man like godt kunne ha brukt p-tagger eller noe. 😅 Med andre ord, den har nærmest ikke noe utseende, så jeg tror designsystemet bare hadde vært i veien (gitt at den skal se lik ut som før).

Copy link
Contributor

@paal2707 paal2707 left a comment

Choose a reason for hiding this comment

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

Bra jobba, ser bra ut. 👏 Egentlig en kommentar, forslag om å legge altinnAppTheme variabler som css variabler for å bevare gjenbrukbarheten :)

src/components/AltinnSpinner.module.css Outdated Show resolved Hide resolved
src/components/altinnParty.module.css Outdated Show resolved Hide resolved
margin-bottom: 0.75rem;
border-radius: 0;
background-color: #e3f7ff;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.25);
Copy link
Contributor

Choose a reason for hiding this comment

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

Samme her

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tenker jeg dropper å lage en variabel på akkurat den. Den blir brukt nøyaktig 2 plasser, og bare i denne filen. Tidligere hadde den en variabel for hele box-shadow, men jeg ser ikke helt poenget.

src/components/altinnParty.module.css Outdated Show resolved Hide resolved
src/components/molecules/AltinnInformationPaper.module.css Outdated Show resolved Hide resolved
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
26.67% Condition Coverage on New Code (required ≥ 45%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/other Pull requests containing chores/repo structure/other changes
Projects
Status: 🔎 Review
Development

Successfully merging this pull request may close these issues.

3 participants