-
Notifications
You must be signed in to change notification settings - Fork 26
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
refactor: move components src to corresponding packages folders #1224
Conversation
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/commercetools/ui-kit/e4s98mpx3 |
71bb003
to
b310565
Compare
b310565
to
f0d03fa
Compare
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.
I'm wondering if we can maybe flatten the list of packages? For instance, not having packages/buttons/*
but instead packages/icon-button
, and so on.
What do you think?
I see. Should we also do it for all the Fields and Inputs components? |
If we decide to, we should do it for all packages yes. See for yourself maybe if the codebase is still readable with the packages flatten. |
The list of folders gets really long and quite disorganised, especially because of the inputs and fields are many and won't be listed sequentially. Personally, I think I prefer keeping the groups we have now, the same way as they are grouped together in Storybook. They're easier to find on the component tree and also easier to grasp how many of each "type" do exist (useful for when all the components of a certain "type" need to be refactored). Unless we flatten components like:
into
This would at least keep sorted together... But honestly I still prefer keeping them grouped in folders. |
Yeah ok let's go with that for now. Thanks for looking into it |
@@ -1,7 +1,7 @@ | |||
import React from 'react'; | |||
import { Link } from 'react-router-dom'; | |||
import { render } from '../../../test-utils'; | |||
import { PlusThinIcon } from '../../icons'; | |||
import { PlusThinIcon } from '@commercetools-uikit/icons'; |
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.
Wondering if these (in .spec.js
and .story.js
) should be added to devDependencies
.
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.
It's not necessary, the ui-kit packages are available anyway, the other deps can be added to the root package.json as dev deps
f0d03fa
to
7624e71
Compare
7624e71
to
a353b5b
Compare
a353b5b
to
4fb7f22
Compare
@jonnybel this has been open for a while. I can pick it up and get it ready to merge. We also don't need to migrate all components at once, we can do it step by step. |
4fb7f22
to
9cb5ca2
Compare
I rebased with master and fixed the readmes and packages setup. I think this should be good to go now. |
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.
This is good from my side. I suggest to merge this and continue the migration in separate steps.
Yes, migrating all the components takes quite a while and I agree we could merge this for now and continue on another PR. Thanks a lot for the additional fixes! 🙏 |
Summary
Start moving some of the components from
src/components/**
topackages/components/**/src
.I'm keeping each component "move" on different commits, so it's easier to review and find errors.
Work in progress.Components moved in this PR:
...
It will take a while to move all the components and fix the import paths and dependencies, so I'm opening this PR to be open to suggestions and remarks. Also for the VRTs to run and ensure everything is going well.