-
Notifications
You must be signed in to change notification settings - Fork 0
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
Pros & Cons of NPM package namespaces #1
Comments
@vobu - feel free to join the discussion |
This new approach wouldn't render old custom libs useless nor break them. It's just a better approach which makes custom controls integration smoothier and fixes some of the current problems, most notorious being: multiple versions and extra configuration. Another benefit: it opens the door for people start experimenting with ES modules. The problem for individual deployment could be solved deploying a custom component wrapping the custom pkgs one uses. |
Also, this would finally enable a much easier integration with storybooks 😍 Already expected in: #4 |
@mauriciolauffer - thanks for joining the discussion and your feedback. Rgd. storybook -> I will continue my experiments over the weekend. Last weekend I already got a UI5 Button running - but to support it properly, with JS/XML code, a plugin needs to be written. I found one https://github.com/leon-vg/storybook-ui5/ but this is also a very basic one. I wanted to understand the possibilities of writing a storybook plugin better. It would be really cool to just use it on top of any library or custom control project. Rgd. pros/cons: one thing I see a bit negative with the pure NPM package approach is that you can't hide the folder structure of the repository. Typically, you organize your project in folders |
Storybook I've done some work inspired by storybook-ui5, but making it more similar to @storybook/html and cleaned up a little bit (for the sake of maintainability). I've removed some of the overhead (using react to create root elements) and made it work with ui5 objects as well, eg, new sap.m.Button(), it was working only with xml string. Have a look at my forked branch: https://github.com/mauriciolauffer/storybook-ui5/tree/feat-ui5-obj The most important file in the project is app/ui5/src/client/preview/render.ts, everything else is just boilerplate. An example on how to consume it can be found in examples/ui5-kitchen-sink.
|
PS: after we run some tests and make more changes, I'm going to create a PR with our changes in storybook-ui5. |
just chiming in with .02€, admitting that I've only heard from storybook through here. |
Storybooks aren't meant to prototype UIs, as BUILD was. It's a automated testing tool for UI components, actions, visual regression, etc. For instance, you could use it to test your ui5 control accessibility, visual regression (the button colour/font/etc looks different after a change)... Where it could overlap with BUILD is the ability to deploy the storybooks as an standalone webapp and share with your team to gather feedback. However, you don't have the option to drag&drop UI elements to build a whole app. |
For custom control packages namespaces and package name both are valid but package name has the following pros and cons:
Pros:
Cons:
The text was updated successfully, but these errors were encountered: