nova-detached-actions icon indicating copy to clipboard operation
nova-detached-actions copied to clipboard

Fix selected resources issue

Open adrianmihaila opened this issue 2 years ago • 1 comments

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

Nova Detached Actions

  • 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.

adrianmihaila avatar Sep 07 '22 13:09 adrianmihaila

ping @the-alichemist

chrillep avatar Nov 15 '22 13:11 chrillep