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

Content and form page style refactor with utrecht components #268

Merged
merged 39 commits into from
Oct 10, 2022

Conversation

dutchcelt
Copy link
Contributor

@dutchcelt dutchcelt commented Sep 21, 2022

Covered items in two pages: Content and Formulieren.
The styles have been split out into mixins.

See issue: #265

@dutchcelt dutchcelt force-pushed the feature/rvo-style-refactor-with-utrecht-components branch 5 times, most recently from b01e2df to 4b7ec81 Compare September 26, 2022 09:10
@dutchcelt
Copy link
Contributor Author

Added breadcrumb component to this PR. Probably should have been separate PR.

@dutchcelt dutchcelt force-pushed the feature/rvo-style-refactor-with-utrecht-components branch 5 times, most recently from 8469b91 to b2ec213 Compare September 29, 2022 12:28
@Robbert Robbert force-pushed the feature/rvo-style-refactor-with-utrecht-components branch from b2ec213 to d871588 Compare September 30, 2022 10:12
@dutchcelt dutchcelt force-pushed the feature/rvo-style-refactor-with-utrecht-components branch 2 times, most recently from 3f05e3f to caef8f6 Compare October 3, 2022 12:38
@Robbert Robbert requested a review from sushitommy October 3, 2022 14:20
@Robbert Robbert force-pushed the feature/rvo-style-refactor-with-utrecht-components branch 6 times, most recently from 721bf31 to 67d2502 Compare October 4, 2022 06:45
Copy link
Contributor

@sushitommy sushitommy left a comment

Choose a reason for hiding this comment

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

Hey Egor, nice work! Ik zie dat je een hoop dingen gefixt hebt. En mooi te zien dat het goed werkt met de React components van Utrecht. Ik heb nog wat vragen/puntjes, zie de review. En wellicht ook goed om nog even kort wat dingen door te spreken (later deze week)?

? 'subtle-button'
: null
}
hint={kind === 'warning' || kind === 'warning-subtle' ? 'warning' : null}
>
{showIcon === 'before' && iconMarkup}
Copy link
Contributor

Choose a reason for hiding this comment

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

Ik krijg een lint error: This JSX tag's 'children' prop expects a single child of type 'ReactNode', but multiple children were provided. Misschien Fragment gebruiken?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We zouden idd een fragment kunnen toevoegen. Ik test het wel eerst.

Copy link
Member

Choose a reason for hiding this comment

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

I think it might have to do with children?: React.ReactNode;, allowing one instead of many children. I have updated all the property definitions to use PropsWithChildren from React to fix this.

<span className="rvo-form-field__label-text">{labelText}</span>
<FormField className="rvo-form-field rvo-layout-column rvo-layout-gap--sm">
<div className="rvo-form-field__label rvo-layout-column rvo-layout-gap--2xs">
<FormLabel className="rvo-form-field__label-text" htmlFor={fieldId}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Ik krijg hier een lint error 'Property 'className' does not exist on type 'FormLabelProps & { children?: ReactNode; } & RefAttributes'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wellicht zie ik iets over het hoofd, ik kan deze niet reproduceren. Is er een specifiek lint script die ik kan draaien?

Copy link
Member

@Robbert Robbert Oct 5, 2022

Choose a reason for hiding this comment

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

@tomjonkman Ik heb tsc --noEmit toegevoegd als extra check om voor dit soort fouten de required PR checks te laten falen, maar ook daar komt deze warning niet naar boven... (en className zou gewoon in de props horen te zitten, als ik zo naar de FormLabel code van Utrecht kijk)

@@ -13,7 +13,7 @@ interface IIconProps {
classNames?: string[];
}

export const iconColors = ['hemelblauw', 'wit', 'zwart'];
export const iconColors = ['', 'hemelblauw', 'wit', 'zwart'];
Copy link
Contributor

Choose a reason for hiding this comment

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

Waarom heb je de lege optie toegevoegd?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dit is een change van @Robbert, ik zal het even nalopen.

Copy link
Member

Choose a reason for hiding this comment

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

De default is nu dat de icon var(--utrecht-icon-color) gebruikt currentColor en de kleur van de omgeving aanneemt, daarvoor is het color argument optioneel. Op deze manier kunnen componenten via --utrecht-icon-color: currentColor de kleur van de icon beinvloeden zonder de preciese selector te weten waarvan de background-color aangepast moet worden.

We kunnen de icon color voor stories op zich standaard instellen op hemelblauw, maar ik wil niet de indruk wekken dat een kleur kiezen verplicht is.

.rvo-tag--default .rvo-icon {
background-color: var(--rvo-tag-default-icon-color);
}

// Info
.rvo-tag--info {
Copy link
Contributor

Choose a reason for hiding this comment

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

De icons in Tag krijgen nog niet de juiste kleur, klopt dat?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ik zal deze ook nalopen.

@@ -0,0 +1,70 @@
@mixin alerts {
Copy link
Contributor

Choose a reason for hiding this comment

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

Algemeen puntje: Ik ben benieuwd waarom deze mixins op deze manier en plek zijn gedefinieerd. En waarom gebruiken we hier niet de design tokens zoals gedefinieerd in alert.tokens.json?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ik heb de opzet van de demopages/common/style.scss bestand overgenomen en opgesplitst in losse bestanden om ze 1 voor 1 over te zetten of om te zetten in bestaande design system oplossingen. De mixin aanpak is zodat ik een ander base class kan gebruiken naast de bestaande opzet. Zo voorkom ik ook duplicaat code in storybook tijdens ontwikkelen. (Ik zag de originele RVO styling de NL DS styling overschrijven in Storybook terwijl de RVO code niet werd aangeroepen.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Het lijkt er nu wel op dat ik de mixins niet meer nodig heb. Dus heb ik het behoorlijk terug kunnen brengen.

@Robbert Robbert force-pushed the feature/rvo-style-refactor-with-utrecht-components branch from e3d1cc9 to 76e44a6 Compare October 5, 2022 13:59
@vercel
Copy link

vercel bot commented Oct 5, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
rvo ❌ Failed (Inspect) Oct 8, 2022 at 11:20AM (UTC)

@dutchcelt dutchcelt force-pushed the feature/rvo-style-refactor-with-utrecht-components branch from f0dcca5 to b7d2d80 Compare October 6, 2022 10:24
@Robbert Robbert force-pushed the feature/rvo-style-refactor-with-utrecht-components branch from b7d2d80 to 37ece45 Compare October 6, 2022 12:20
@Robbert Robbert force-pushed the feature/rvo-style-refactor-with-utrecht-components branch from 7097850 to c757b77 Compare October 7, 2022 12:20
@Robbert Robbert merged commit c3e2a43 into main Oct 10, 2022
@Robbert Robbert deleted the feature/rvo-style-refactor-with-utrecht-components branch October 10, 2022 08:18
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.

3 participants