-
Notifications
You must be signed in to change notification settings - Fork 34
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
Adding new widgets to existing Vue components is not made easy #1319
Comments
Here is a button package https://github.com/dillingham/nova-button/ 🌮 👍 |
I see, so they implemented a button as a separate field, rather than having to override the resource row actions. That's definitely good to see, and alleviates some of my concerns around (1). However, do you have any recommendations regarding (2) and (3)? |
Make a tool for 2, use detail only actions for 3. Step 4: remember this is an opinionated admin panel not a design framework. And ask questions on discord not on bug tracking :) |
|
Here's a number of examples:
1) Resource Table Row
If I wanted to create a package that added a new type of button to be placed on all resource rows, I would have to override the entire resource row component. If another package then wanted to add its own button to resource rows, these two packages would come into conflict.
This would require the developer to override their own resource row to provide the shared modification of each package. Doing so may force them to maintain changes from Nova and both packages.
2) Index Toolbar
The triage of Action Select, Lenses, Filters, and Delete menu are all part of the native Index Vue component. This means that if I wanted to create a package to add a new type of widget (for example, a custom "Create" action that doesn't accept any models as input), I would have to override the entire Index Vue component.
Doing so would immediately cause conflict with any other packages that modify the Index Vue component. It also means that the package developer would have to accommodate any changes made to the native Index Vue component within their own package.
3) Detail Toolbar
Again, adding a new type of widget (that intentionally would not be designed as a resource tool), would require overriding the entire Detail Vue component.
--
Am I totally off base here, or is adding entirely new concepts to Nova subject to a very high risk of compatibility and support issues?
A lot of what I've mentioned here seems solvable. I would think that having a dedicated Vue component to wrap around a lot of the widget-based content, such that one could append to the wrapper without having to modify it, would be extremely valuable.
The text was updated successfully, but these errors were encountered: