avo icon indicating copy to clipboard operation
avo copied to clipboard

Add the default_controls helper for customizable controls.

Open Paul-Bob opened this issue 1 year ago • 7 comments

Feature

Add a helper that set the default controls on customizable controls. For example if I want to keep all the index controls and add a random link I should be able to do something like this.

self.index_controls = -> {
  default_controls
  # or with exclude which would exclude one of the default buttons
  default_controls(exclude: :delete_button)
  # or with only which would only keep those buttons
  default_controls(only: [:delete_button, :edit_button])
  link_to "Fish.com", "https://fish.com", icon: "heroicons/outline/academic-cap", target: :_blank
}

The exclude and only options are optional and nice to have's. They would help the user to better order the default controls.

Current workarounds

Check how to declare the default controls and declare them 1 by 1

Screenshots or screen recordings

Additional context

### Tasks
- [ ] Implement `default_controls` helper
- [ ] Improve documentation with snippets of defaults for all customizable controls
- [ ] Improve documentation and be more explicit that custom controlls overrides the defaults
- [ ] Default controls should respect authorization rules (ex: Pundit

Paul-Bob avatar Aug 31 '23 08:08 Paul-Bob

The one thing I'm afraid of is that you can only add links to the start or end of the default controls, but sure. let's do it!

adrianthedev avatar Sep 09 '23 12:09 adrianthedev

This issue has been marked as stale because there was no activity for the past 15 days.

github-actions[bot] avatar Sep 25 '23 01:09 github-actions[bot]

The one thing I'm afraid of is that you can only add links to the start or end of the default controls, but sure. let's do it!

I think yes, maybe insert in the array with some custom logic, but the goal of this feature is exactly that: to have all default controls and append or prepend to it custom controls.

Paul-Bob avatar Sep 25 '23 04:09 Paul-Bob

This issue has been marked as stale because there was no activity for the past 15 days.

github-actions[bot] avatar Oct 12 '23 01:10 github-actions[bot]

Closing this because there was no activity for the past 15 days. Feel free to reopen if new information pops up ✌️

github-actions[bot] avatar Oct 27 '23 01:10 github-actions[bot]

Closing this because there was no activity for the past 15 days. Feel free to reopen if new information pops up ✌️

github-actions[bot] avatar Nov 12 '23 01:11 github-actions[bot]

This issue has been marked as stale because there was no activity for the past 15 days.

github-actions[bot] avatar Dec 13 '23 01:12 github-actions[bot]