-
-
Notifications
You must be signed in to change notification settings - Fork 516
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
Unify declaration of third-party dependencies #2991
Conversation
# Conflicts: # nicegui/elements/scene.js # nicegui/elements/scene.py
Here's an attempt to summaries the different kind of dependencies (current main branch):
|
# Conflicts: # nicegui/elements/echart.py
@rodja I decided to include this PR in 2.0.0, because it will probably add a deprecation warning for using the old library parameters, which is kind of a breaking change. Releasing it in 2.0.0 allows for user code and other packages like nicegui-highcharts to adopt while upgrading from NiceGUI 1.x to 2.x. Do you have an idea where to put information about custom elements in the documentation? And what do you think about the deprecation warning? I find it a bit annoying if you, e.g., have something like nicegui-highcharts installed, which still uses the old parameters. On the other hand, it requires NiceGUI 1.x at the moment, so there is an incompatibility that needs to be resolved. So the warning seems appropriate. |
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.
Looks good to me.
About the documentation: The example "is_even" is not very descriptive. Maybe we should rename it to "node_module_integration"? And we need to add both examples to examples.py
. And maybe a brief part in "Configuration & Deployment" could describe the general idea and provide links to the two examples...
Currently there are three ways to include JavaScript libraries when subclassing UI elements:
libraries
,exposed_libraries
andextra_libraries
. This PR experiments with usingexposed_libraries
only, which seems to work for all elements. A new "signature pad" example demonstrates how to use NPM to define and install JavaScript dependencies in a NiceGUI project.Open tasks:
libraries
andextra_libraries
parametersexposed_libraries
with a more intuitive name, likedependencies