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

NewButton -> Button2 #1730

Merged
merged 9 commits into from
Dec 17, 2021
Merged

NewButton -> Button2 #1730

merged 9 commits into from
Dec 17, 2021

Conversation

pksjce
Copy link
Collaborator

@pksjce pksjce commented Dec 14, 2021

No visual changes. Just filename and component name changes.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@pksjce pksjce requested review from a team and siddharthkp December 14, 2021 05:06
@changeset-bot
Copy link

changeset-bot bot commented Dec 14, 2021

🦋 Changeset detected

Latest commit: 32a4ad0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Dec 14, 2021

size-limit report 📦

Path Size
dist/browser.esm.js 56.33 KB (-2.05% 🔽)
dist/browser.umd.js 56.68 KB (-1.96% 🔽)

@pksjce pksjce added the skip changeset This change does not need a changelog label Dec 14, 2021
@@ -7,5 +7,5 @@

// Components
export * from './ActionList2'
export * from './NewButton'
export * from './Button2'
Copy link
Member

Choose a reason for hiding this comment

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

thank you ❤️

src/index.ts Outdated
export {NewButton} from './NewButton'
export type {NewButtonProps} from './NewButton'
export {Button2} from './Button2'
export type {Button2Props} from './Button2'
Copy link
Member

@siddharthkp siddharthkp Dec 14, 2021

Choose a reason for hiding this comment

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

should we remove this from the main bundle and only ship it in drafts? based on this proposal

import {ButtonProps, IconButtonProps} from './types'
// change this when moving to released state
export type {ButtonProps as Button2Props, IconButtonProps}
export const Button2 = Object.assign(Button, {
Copy link
Member

Choose a reason for hiding this comment

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

How do you feel about exporting this as Button instead of Button2. The scoping would happen with the import statement instead of name. See also

import {Button} from '@primer/react
and
import {Button} from '@primer/react/drafts

@colebemis
Copy link
Contributor

@pksjce This change should probably have a changeset since we want this PR to trigger a new release

@pksjce pksjce merged commit a9dc6f2 into main Dec 17, 2021
@pksjce pksjce deleted the pk/new-button-filenames branch December 17, 2021 00:50
@primer-css primer-css mentioned this pull request Dec 17, 2021
pksjce added a commit that referenced this pull request Dec 20, 2021
* Rename new button stuff

* Update tests

* Export Button component

* Change button2 storybook name

* Create fuzzy-meals-explain.md
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