-
Notifications
You must be signed in to change notification settings - Fork 77
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
JS package reorganization #565
Conversation
Codecov Report
@@ Coverage Diff @@
## main #565 +/- ##
==========================================
+ Coverage 65.31% 65.36% +0.05%
==========================================
Files 79 79
Lines 7297 7297
==========================================
+ Hits 4766 4770 +4
+ Misses 2531 2527 -4
Continue to review full report at Codecov.
|
f9c0e9d
to
5056e90
Compare
* Layout base folder structure * rename scripts pkg to dev-scripts * Add base README * Get dev-scripts working * Wire up new transition storybook under docs/sb * Fix up .yarnrc.yml * Set up @annotated/bbox package * Add @annotated/video-player pkg * Add more stories to the storybook * Typo fix (#564) * Cleaning up todo labels (#569) * Creating required files for pypi release (#548) * Create annotated-pks.yml * Remove yarn version specificiation from install * Remove random echo statements * Update build command * Update wrapper import * Remove cra scripts from package.json * Add foreach build command * change job name Co-authored-by: Jack Urbanek <jju@fb.com>
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.
Overall I'm a huge fan of this refactor. I think this gives us a lot of room for growth moving forward, while also maintaining plenty of flexibility for people who want to use parts of annotated
for their own projects.
Some questions inline (potentially short discussions) on documentation and possibly dead commented code.
@@ -0,0 +1 @@ | |||
# shell |
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.
TODO?
@@ -0,0 +1 @@ | |||
# @annotated/dev-scripts |
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.
Also TODO? Overall I think that the structure of this lends well to us having strong component-based documentation, but I don't know how much of that you'd prefer to offload into the storybook (in which case perhaps we can do some kind of generator for these readmes, or via docusaurus?)
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.
yeah I think we need to figure out where to go from here. I do like how tools like radix and blueprintjs do their documentation, e.g. https://www.radix-ui.com/docs/primitives/components/switch
Docusaurus 2.0 has MDX integration with could allow us to write markdown docs with inline components. I'm leaning towards this option.
Definitely need to have a doc day soon lol
@@ -0,0 +1,308 @@ | |||
import React from "react"; |
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.
Would a generic version that I derived from this code be useful in this package?
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.
yes.. this looks great! the only thing is that I don't have typescript support set up yet in @annotated/dev-scripts
. I'd like to add that in, but it will most likely be a follow up PR. I'll update to your version of the PoseEditor in a follow-up PR along with that (this also makes for a great test case).
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.
Thanks for work Pratik! I'm looking forward to easily pulling in these components for the next project.
Thanks for the feedback guys. A second and third set of eyes is especially helpful in large PRs like these where it's easy to be distracted by the forest over the trees. I cleaned up comments, added some development docs for Yarn, cleaned up stray initialization artifacts from create-react-app that was used for bootstrapping the storybook, and also finished the migration and replacement of the old storybook. Also using this issue to track some of the larger documentation initiatives: #505 |
Implements #501
Overview
4 new user-facing packages added as a replacement to
annotation-toolkit
:@annotated/shell
@annotated/bbox
@annotated/keypoint
@annotated/video-player
1 new dev-facing package added:
annotated/dev-scripts
Updated Storybook w/ new packages
An updated storybook added that refers to these new packages has been added to
docs/sb
.docs/storybook
currently exists during this transition phase, and will be deleted in an upcoming PR.yarn 3 workspaces will now be required for package administration
A GitHub action has been setup to validate the monorepo configuration.
Acceptance criteria
Successfully run the storybook project with all components being pulled in from
@annotated/*
as opposed to the monolithicannotation-toolkit
package.Details & methodology
A subpackage can now invoke the build process from
dev-scripts
instead of re-implementing on it's own.Example: @annotated/shell's
package.json
:To-Do
Is this critical? Should this be timeboxed?If we cannot is there a mitigation strategy to adapt non-workspace projects to work with workspace projects?Barring all else, do we rollback and use just lerna instead, giving up on yarn workspace?@annotated/dev-scripts
. Inspo:kcd-scripts
Future Work