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

Component roadmap #469

Closed
14 of 16 tasks
connor-baer opened this issue Sep 13, 2019 · 6 comments
Closed
14 of 16 tasks

Component roadmap #469

connor-baer opened this issue Sep 13, 2019 · 6 comments
Labels
🎨 design Requires input from designers
Milestone

Comments

@connor-baer
Copy link
Member

connor-baer commented Sep 13, 2019

Based on an internal document which should be treated as the source of truth.

Deprecated

These components will likely be removed in the next major version.

Under review

These components are stable, but might have breaking changes in the next major version.

Experimental

These components are not stable and will likely have breaking changes in the next major version.

@connor-baer connor-baer added help wanted Looking for contributions roadmap labels Sep 13, 2019
@connor-baer connor-baer added this to the v2.0 milestone Sep 13, 2019
@fernandofleury
Copy link
Contributor

Is this the moment for us to also cleanup the default margin from some of our components? Such as the Input. Right now we are using the noMargin prop.

@connor-baer
Copy link
Member Author

connor-baer commented Sep 17, 2019

This could be the time. We should do some research on how other component libraries handle this and have a separate discussion about it.

I have an idea on how to apply spacing using Emotion 10's css prop with "mixins":

// @sumup/circuit-ui/src/styles/shared.js
import { css } from '@emotion/core';

const spacing = (theme, size = 'kilo', direction = 'bottom') => css`
  margin-${direction}: ${theme.spacings[size]};
`;

// app/src/components/ButtonWithMargin.js 
import { css } from '@emotion/core';
import styled from '@emotion/styled';
import { Button, sharedStyles } from '@sumup/circuit-ui';

const ButtonWithMargin = props => (
  <Button css={theme => sharedStyles.spacing(theme)}>Example</Button>
);

// or

const buttonStyles = ({ theme }) => css`
  sharedStyles.spacing(theme);
  color: red;
`;

const StyledButton = styled(Button)(buttonStyles);

Essentially, the "mixins" would be a way to apply shared styles without needing additional elements, such as <Spacing />. I'm not happy with the ergonomics yet, but we could iterate on it. Maybe the mixins could be part of the theme?

@fernandofleury
Copy link
Contributor

I was thinking about providing actually both.

We need to extend Spacing to support multiples of the gutter, or a custom value, media query based values.

@connor-baer
Copy link
Member Author

Ah, interesting thought! 👍

I'm gonna schedule a roadmap meeting for Circuit UI soon, let's continue the discussion then.

@connor-baer connor-baer added the 🎨 design Requires input from designers label Oct 2, 2019
@connor-baer connor-baer removed help wanted Looking for contributions roadmap labels Jan 24, 2020
@connor-baer
Copy link
Member Author

I've opened RFCs for the grid (#535) and spacing (#534).

@connor-baer
Copy link
Member Author

This issue has been superseded by the other issues mentioned above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 design Requires input from designers
Projects
None yet
Development

No branches or pull requests

2 participants