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

Move form-render dependency from common package to ui package #443

Open
aaronmcdavid opened this issue Mar 11, 2024 · 3 comments
Open

Move form-render dependency from common package to ui package #443

aaronmcdavid opened this issue Mar 11, 2024 · 3 comments

Comments

@aaronmcdavid
Copy link

Is your feature request related to a problem? Please describe.

Alibab's form-render package has a set of dependencies that are both not current and not relevant to the generation of PDFs. To prevent the unnecessary incorporation of old, unused packages, this dependency can be moved closer to where it is needed.

Describe the solution you'd like

Move the form-render dependency out of the common package to the ui package. This also appears to entail a move of the types PropPanelSchema and PropPanelWidgetProps to the ui package. These seem to have no bearing on the common package.

Describe alternatives you've considered

I've also submitted a request to alibaba for them to update form-render, but it still includes a React color picker component, which doesn't seem necessary to generate PDFs.

Additional context

No response

@hand-dot
Copy link
Collaborator

ref: #410

@hand-dot
Copy link
Collaborator

Hey @aaronmcdavid !
Thank you for the suggestion.
There have been reports of a similar issue in the past.
I want to address this issue.

But the reason form-render is in the common package is because the schema package needs form-render's types for the definition of plugins it uses.
And the schema package is used in the generator package.

I don't think our current approach is the best.
As you said, there are dependencies that are not relevant to PDF generation, which is not good.

However, if we move it to the ui package, we need to think about how to use form-render's types in the schema package.

The most ideal solution would be for form-render to use the latest @rc-component/color-picker.
Could we possibly wait for a response to your issue for a while?


ref: alibaba/x-render#1496

@sebimarkgraf
Copy link

@hand-dot Did you consider vendoring the types from antd that are really needed in the common package?

This could allow your current approach while removing a lot of the issues that come from having antd installed completely

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

No branches or pull requests

3 participants