-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Cleaned up CreateItemModal implementation #2873
Cleaned up CreateItemModal implementation #2873
Conversation
🦋 Changeset is good to goLatest commit: 71267f3 We got this. This PR includes changesets to release 2 packages
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 |
can you also factor that out into separate package? like |
I don't think that's a good idea. These are Admin UI components. We can't keep splitting everything into smaller and smaller packages, and each new package has a cost in terms of maintainability. 🤔 |
I had it first passed as prop to eliminate two different implementation for Having each field which needs CreateItemModal and other component, dependent on |
Two different implementations? I don't understand. There's no custom implementation in the Relationship field. I agree it's not great to have the fields package depend on the admin ui, but the Relationship field already imports some stuff from the admin ui package ( I think the problem here (and it's definitely beyond the scope of this issue), is the fact that we're trying to keep everything walled off when there is need for cross-dependence. The field views are meant for the admin ui, so it makes sense for them to be able to import admin UI things. But in that case, separation of concerns dictates that either they be in the same package (not possible under the current design), they depend on one another (seems people don't want this), or we create a third package... which just makes things harder to maintain and leads to more dependency version issues like have already been seen. :/ |
there was, see #1880 |
Oh, I hadn't seen that one. |
@Vultraz I like this. I know there was a bit of prop-drilling with passing the Maybe this is ok and what we actually want to split out is just the form rendering bit inside |
Agree on splitting out a more generic modal. |
0035406
to
05cf4ab
Compare
Conflict be gone. |
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.
Approving this... but would like another pass in future at a generic modal and form generation
CreateItemModal
is no longer passed through to field views via prop. It can be imported from the admin UI package.