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

Convert StateComponent to support functional colors internally #269

Merged

Conversation

srt32
Copy link
Contributor

@srt32 srt32 commented Feb 23, 2021

supports #232

Instead of green, red, purple we now support open, closed, merged.

We still support the old colors until functional colors have fully
landed into Primer CSS.

closes primer#232

Instead of green, red, purple we now support open, closed, merged.

We still support the old colors until functional colors have fully
landed into Primer CSS.
@vercel
Copy link

vercel bot commented Feb 23, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/primer/view-components/HKZtYr7rNnSx3Z6W4dfRHGnd4RQH
✅ Preview: https://view-component-git-fork-srt32-st-convert-state-component-0bed7b.vercel.app

@vercel vercel bot temporarily deployed to Preview February 23, 2021 17:43 Inactive
@vercel vercel bot temporarily deployed to Preview February 23, 2021 17:46 Inactive
@vercel vercel bot temporarily deployed to Preview February 23, 2021 17:47 Inactive
@vercel vercel bot temporarily deployed to Preview February 23, 2021 17:49 Inactive
@srt32 srt32 marked this pull request as ready for review February 23, 2021 17:49
stories/primer/state_component_stories.rb Outdated Show resolved Hide resolved
app/components/primer/state_component.rb Outdated Show resolved Hide resolved
app/components/primer/state_component.rb Show resolved Hide resolved
Co-authored-by: Manuel Puyol <manuelpuyol@github.com>
@vercel vercel bot temporarily deployed to Preview February 23, 2021 18:00 Inactive
srt32 and others added 2 commits February 23, 2021 11:00
Co-authored-by: Manuel Puyol <manuelpuyol@github.com>
Co-authored-by: Manuel Puyol <manuelpuyol@github.com>
@vercel vercel bot temporarily deployed to Preview February 23, 2021 18:02 Inactive
Co-authored-by: Manuel Puyol <manuelpuyol@github.com>
@vercel vercel bot temporarily deployed to Preview February 23, 2021 20:25 Inactive
@vercel vercel bot temporarily deployed to Preview February 23, 2021 20:29 Inactive
app/components/primer/state_component.rb Outdated Show resolved Hide resolved
app/components/primer/state_component.rb Show resolved Hide resolved
@@ -43,7 +43,7 @@ Component for rendering the status of an item.
| Name | Type | Default | Description |
| :- | :- | :- | :- |
| `title` | `String` | N/A | `title` HTML attribute. |
| `color` | `Symbol` | `:default` | Background color. One of `:default`, `:green`, `:red`, or `:purple`. |
| `color` | `Symbol` | `:default` | Background color. One of `:open`, `:closed`, `:merged`, `:default`, `:green`, `:red`, or `:purple`. |
Copy link
Contributor

Choose a reason for hiding this comment

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

It's a little odd to have this argument named color, as that's also a system argument. But perhaps that's a concern for another time 😄

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is part of the conversation about splitting system_arguments into different things

@vercel vercel bot temporarily deployed to Preview February 23, 2021 21:07 Inactive
@vercel vercel bot temporarily deployed to Preview February 23, 2021 21:09 Inactive
@vercel vercel bot temporarily deployed to Preview February 25, 2021 18:37 Inactive
@vercel vercel bot temporarily deployed to Preview February 25, 2021 18:39 Inactive
@vercel vercel bot temporarily deployed to Preview February 25, 2021 18:45 Inactive
@srt32 srt32 changed the title Convert StateComponent to support functional colors Convert StateComponent to support functional colors internally Feb 25, 2021
@srt32
Copy link
Contributor Author

srt32 commented Feb 25, 2021

This PR has me thinking..... given we don't bundle primer/css with this library, if consumers of this gem are consuming the old version of primer css, then this change would be breaking since they don't have the new functional classes defined yet. How do we want to approach this?

@joelhawksley
Copy link
Contributor

This PR has me thinking..... given we don't bundle primer/css with this library, if consumers of this gem are consuming the old version of primer css, then this change would be breaking since they don't have the new functional classes defined yet. How do we want to approach this?

@srt32 good point. There are only 4 other public users of the library: https://github.com/primer/view_components/network/dependents?package_id=UGFja2FnZS0xMzY1MzYwNjkz, so I'm tempted not to worry about it too much. I do think we should point this out in the changelog for the release, as the first entry.

It might also be worth adding a note about the implicit dependency to the primer.style/view-components landing page 🤔

@srt32
Copy link
Contributor Author

srt32 commented Feb 25, 2021

Is css-next as a private repo a typical workflow we do? Ideally we could point at a version of primer/css that anyone could consume.

@srt32
Copy link
Contributor Author

srt32 commented Feb 25, 2021

We also do call out the dependency already ;)

https://primer.style/view-components/#dependencies

@vercel vercel bot temporarily deployed to Preview February 25, 2021 19:50 Inactive
CHANGELOG.md Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview February 25, 2021 19:51 Inactive
CHANGELOG.md Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview February 25, 2021 19:55 Inactive
CHANGELOG.md Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview February 25, 2021 19:56 Inactive
CHANGELOG.md Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview February 25, 2021 19:57 Inactive
@srt32 srt32 merged commit 7c40b79 into primer:main Feb 25, 2021
@srt32 srt32 deleted the st-convert-state-component-to-functional-colors branch February 25, 2021 20:16
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.

None yet

4 participants