Unfortunately, in this pull request, I did a lot of changes, but I hope that it will be approved despite of that. From redesigning the components architecture to improving the flow of loading of actions, and fixing multiple issues.
Redesign the component's architecture
Rename the ResourceDetail nova-component into ResourceDetailView to better express what kind of component it is.
Rename the IndexActions component into ActionButtonGroup to transform it into a reusable component and better express what this component contains.
Rename the InvisibleActions component into InvisibleActionsDropdown to better express what kind of component it is.
Delete the DetailActions component and reuse the ActionButtonGroup instead of it.
Improvements
Use the actions that came from the Nova parent's components, filtering them by detachedAction property and pass them to ActionButtonGroup and ActionSelector or DetailActionDropdown components. This improvement will help us to be able to use canSee and canRun after a resource was selected.
Show standalone detached actions without selecting a resource.
Fixing issues
Fix webpack mix alias issue.
Keep actions in the initial order(remove .reverse() calling).
Fix selected resource issue, passing the Nova parent's selectedResources into ActionButtonGroup.
Reload the listing or the detail page after the action was executed by using @actionExecuted directive.
Unfortunately, in this pull request, I did a lot of changes, but I hope that it will be approved despite of that. From redesigning the components architecture to improving the flow of loading of actions, and fixing multiple issues.
Redesign the component's architecture
ResourceDetail
nova-component intoResourceDetailView
to better express what kind of component it is.IndexActions
component intoActionButtonGroup
to transform it into a reusable component and better express what this component contains.InvisibleActions
component intoInvisibleActionsDropdown
to better express what kind of component it is.DetailActions
component and reuse theActionButtonGroup
instead of it.Improvements
detachedAction
property and pass them toActionButtonGroup
andActionSelector
orDetailActionDropdown
components. This improvement will help us to be able to usecanSee
andcanRun
after a resource was selected.Fixing issues
.reverse()
calling).selectedResources
intoActionButtonGroup
.@actionExecuted
directive.