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

Refactor Accordion [Composition pattern, optimisations, contributing standards] #793

Closed
wants to merge 35 commits into from

Conversation

timoheddes
Copy link
Contributor

@timoheddes timoheddes commented Aug 17, 2023

⚠️ Please read before review ⚠️

There are a lot of changes. A lot of them are just related to making type imports and exports explicit, e.g. instead of:

import React, { FC } from 'react';

we do:

import type { FC } from 'react';
import React from 'react';

etc.

Not doing this causes warnings in your console. This change doesn't really require review. So, that leaves the primary refactor which is the Accordion component. In short, please focus on reviewing:

  • Any changes outside of react-ui library
  • Accordion in react-ui

General PR description

Asana task

This PR primarily aims to refactor Accordion to follow our standards regarding composition structure and other things. Other components like it will be updated in similar fashion in the future so that they all follow the same structure.

Updated Accordion preview

Screen.Recording.2023-08-29.at.10.02.32.mov

@vercel
Copy link

vercel bot commented Aug 17, 2023

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

Name Status Preview Comments Updated (UTC)
alpha-docs 🛑 Canceled (Inspect) Aug 31, 2023 8:27am
docs-storybook 🛑 Canceled (Inspect) Aug 31, 2023 8:27am
react-ui 🛑 Canceled (Inspect) Aug 31, 2023 8:27am
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
immutable-records ⬜️ Ignored (Inspect) Visit Preview Aug 31, 2023 8:27am
tools ⬜️ Ignored (Inspect) Visit Preview Aug 31, 2023 8:27am

Copy link
Contributor

@eileenmguo eileenmguo 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 fixing the type warnings!! It's really good to get these taken care of :) In the future I would suggest creating a separate PR for them for the sake of separating concerns so we can merge changes as soon as their ready

@webpro
Copy link
Contributor

webpro commented Aug 31, 2023

Just saying, this is valid too:

import React, { type FC } from 'react';

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