perry-js / perry

Painless and agnostic front-end bug reporting. Collect logs, errors, clicks, and session data easily.
https://perry-js.netlify.com/
MIT License
46 stars 5 forks source link

Refactor: move away from rebass and styled-components #51

Open armand1m opened 5 years ago

armand1m commented 5 years ago

We are currently having problems integrating into our CI due to mismatches between preact API and a few dependencies we have.

Rebass used to work well with Preact before 3.x was released and made use of features like React.forwardRef which are not available in preact-compat.

Also, styled-components nowadays makes use of React.createContext, which is also not available in preact-compat.

(Even tho the preact team is working in Preact X, which will make this features available, is still in alpha stages and we cannot rely on it.)

So this issue aims to track the development of the few components the Perry Widget actually needs in order to work.

I suggest moving to https://github.com/emotion-js/emotion since it seems to use a more agnostic approach for CSS-in-JS.

Here is a checklist so we can track this better:

Primitives

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/71209277-refactor-move-away-from-rebass-and-styled-components?utm_campaign=plugin&utm_content=tracker%2F99808836&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F99808836&utm_medium=issues&utm_source=github).
armand1m commented 5 years ago

The UI is currently broken because we forced and removed those packages.

I will start working in these components today later.