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

Remove styled-component #1147

Merged
merged 56 commits into from
Sep 9, 2024
Merged

Remove styled-component #1147

merged 56 commits into from
Sep 9, 2024

Conversation

dtrucs
Copy link
Collaborator

@dtrucs dtrucs commented May 29, 2024

No description provided.

@dtrucs dtrucs changed the base branch from main to develop June 5, 2024 12:39
Base automatically changed from develop to main June 6, 2024 15:10
@dtrucs dtrucs force-pushed the RemoveStyledComponent branch from c60fa0a to da8857e Compare June 6, 2024 15:19
@dtrucs dtrucs changed the base branch from main to develop June 6, 2024 15:19
Base automatically changed from develop to main June 10, 2024 15:22
@dtrucs dtrucs force-pushed the RemoveStyledComponent branch from da8857e to 88bb3dd Compare June 20, 2024 08:17
@dtrucs dtrucs force-pushed the RemoveStyledComponent branch from 88bb3dd to 9241458 Compare July 9, 2024 10:06
@dtrucs dtrucs force-pushed the RemoveStyledComponent branch from 9241458 to fc917dc Compare July 18, 2024 13:39
@dtrucs dtrucs changed the title Draft: Remove styled-component Remove styled-component Jul 22, 2024
@dtrucs dtrucs requested a review from a team July 22, 2024 08:20
Comment on lines +47 to +62
<div
className={cn(
'content-WYSIWYG',
'[&>ol]:my-2 desktop:[&>ol]:my-4 [&>ol]:ml-3',
'[&>ol]:border-l-3 [&>ol]:border-primary3',
'[&>ol>li]:relative [&>ol>li]:pl-12 [&>ol>li]:-ml-4 [&>ol>li]:mt-4 first:[&>ol>li]:mt-0 desktop:[&>ol>li]:mt-10 [&>ol>li]:[counter-increment:steps]',
'before:[&>ol>li]:absolute before:[&>ol>li]:left-0 before:[&>ol>li]:top-1/2 before:[&>ol>li]:-translate-y-1/2',
'before:[&>ol>li]:mr-4 desktop:before:[&>ol>li]:mr-6',
'before:[&>ol>li]:content-[counter(steps)] before:[&>ol>li]:rounded-full before:[&>ol>li]:size-7',
'before:[&>ol>li]:flex before:[&>ol>li]:items-center before:[&>ol>li]:justify-center',
'before:[&>ol>li]:text-sm before:[&>ol>li]:text-white before:[&>ol>li]:bg-redMarker',
'before:[&>ol>li]:shadow-md',
)}
>
{parse(descriptionHtml)}
</div>
Copy link
Member

Choose a reason for hiding this comment

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

I'd leave a ListWithSteps component written like:

const ListWithSteps = ({ className = '', ...props }) => (
  <div
    className={cn(
      className,
      'content-WYSIWYG',
      '[&>ol]:my-2 desktop:[&>ol]:my-4 [&>ol]:ml-3',
      '[&>ol]:border-l-3 [&>ol]:border-primary3',
      '[&>ol>li]:relative [&>ol>li]:pl-12 [&>ol>li]:-ml-4 [&>ol>li]:mt-4 first:[&>ol>li]:mt-0 desktop:[&>ol>li]:mt-10 [&>ol>li]:[counter-increment:steps]',
      'before:[&>ol>li]:absolute before:[&>ol>li]:left-0 before:[&>ol>li]:top-1/2 before:[&>ol>li]:-translate-y-1/2',
      'before:[&>ol>li]:mr-4 desktop:before:[&>ol>li]:mr-6',
      'before:[&>ol>li]:content-[counter(steps)] before:[&>ol>li]:rounded-full before:[&>ol>li]:size-7',
      'before:[&>ol>li]:flex before:[&>ol>li]:items-center before:[&>ol>li]:justify-center',
      'before:[&>ol>li]:text-sm before:[&>ol>li]:text-white before:[&>ol>li]:bg-redMarker',
      'before:[&>ol>li]:shadow-md',
    )}
    {...props}
  />
);

then:

<ListWithSteps>{parse(descriptionHtml)}</ListWithSteps>

@@ -19,7 +18,7 @@ export const DetailsGear: React.FC<DetailsGearProps> = ({ className, text }) =>
<BackPack />
</div>
<div className="text-greyDarkColored desktop:font-bold text-Mobile-C2 desktop:text-P1 my-auto">
<HtmlText>{parse(text)}</HtmlText>
<div className="content-WYSIWYG">{parse(text)}</div>
Copy link
Member

Choose a reason for hiding this comment

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

As HtmlText is used multiple times, i would have leave it, but simply re-authored like:

const HtmlText = ({ className = '', ...props }) => (
  <div
    className={cn(className, 'content-WYSIWYG')}
    {...props}
  />
);

frontend/src/stylesheet.ts Outdated Show resolved Hide resolved
frontend/tailwind.config.js Outdated Show resolved Hide resolved
@dtrucs dtrucs force-pushed the RemoveStyledComponent branch 2 times, most recently from a32ad79 to 34f8a5f Compare August 8, 2024 11:08
@dtrucs dtrucs force-pushed the RemoveStyledComponent branch from 34f8a5f to 0afd8a0 Compare August 22, 2024 14:39
@dtrucs dtrucs changed the base branch from main to develop August 23, 2024 13:31
dtrucs and others added 27 commits August 23, 2024 16:17
Co-authored: Benjamin Marguin <benjamin.marguin@makina-corpus.com>
Co-authored-by: mab <benjamin.marguin@makina-corpus.com>
@dtrucs dtrucs force-pushed the RemoveStyledComponent branch from 0afd8a0 to 0ddcfd8 Compare August 23, 2024 15:17
@dtrucs dtrucs merged commit b163590 into develop Sep 9, 2024
2 checks passed
@dtrucs dtrucs deleted the RemoveStyledComponent branch September 9, 2024 07:58
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.

2 participants