-
Notifications
You must be signed in to change notification settings - Fork 372
Chart: new gestalt-chart package setup #3143
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
Merged
AlbertCarreras
merged 14 commits into
pinterest:master
from
AlbertCarreras:ChartPackage
Aug 22, 2023
Merged
Chart: new gestalt-chart package setup #3143
AlbertCarreras
merged 14 commits into
pinterest:master
from
AlbertCarreras:ChartPackage
Aug 22, 2023
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for gestalt ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
more more more min more more
4b4df94
to
f51b6e2
Compare
ca42c07
to
1d3cc17
Compare
rlingineni
approved these changes
Aug 21, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems Okay!
diyorbek
reviewed
Aug 22, 2023
docs/pages/web/callout copy.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this file for?
diyorbek
approved these changes
Aug 22, 2023
LGTM 👍 |
eae1d3f
to
15ad1d5
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
What changed?
Internal: new gestalt-chart package setup
DOCUMENTATION
When should you create a new gestalt- package instead of adding a new component to the existing gestalt?
Gestalt is a lightweight package with only 2 dependencies: "classnames" and "prop-types". By using the minimal amount of dependencies, we can maintain the size of the bundle small. If a new component requires external packages, it's worth isolating it in a single package so that importing Gestalt in our codebase keeps a small bundle.
When adding a new package, these are the three areas where you must do changes
####FIRST: BASIC SETUP
####Gestalt packages
create a new folder within
/packages
following the patterngestalt-<component_name>
create 2 subfolders:
/dist
and/src
create files:
/
: package.json*, and rollup.config.js*/src
: index.js*, .css, .js, and .jsdom.js./dist
: gestalt-<component_name>.js.flow*Use
/package/gestalt
or/package/gestalt-datepicker
files as templates (copy & paste).#####Gestalt configuration
/dist
do not get pushed to Github./dist
.cd ~/gestalt && yarn build
as well when you build the Gestalt Docs while developing when runningcd ~/gestalt && yarn start
.####SECOND: DEVELOP YOUR COMPONENT
#####Gestalt Packages
yarn build
####THIRD: CODE EDITORS & SANDBOXES
Add the new package to all code editors and sandboxes so they can work with your new package
Original datepicker package PR: https://github.com/pinterest/gestalt/pull/913/files#diff-528119d81e5a10738ae49f5e20d333ebc37cea63657eb9069281693e6dae0ad3