avo icon indicating copy to clipboard operation
avo copied to clipboard

Move all Avo gems configuration inside one `Avo.configure` block

Open adrianthedev opened this issue 6 months ago • 0 comments

Feature

I don't like the decision I made when creating the configuration for the dynamic filters.

Avo.configure do |config|
  # Other Avo configurations
end

if defined?(Avo::DynamicFilters)
  Avo::DynamicFilters.configure do |config|
    config.button_label = "Advanced filters"
    config.always_expanded = true
  end
end

I think we should bring it into one block. We can do something like this.

Avo.configure do |config|
  # Other Avo configurations

  # Dynamic filters config
  config.dynamic_filters.button_label = "Advanced filters"
  config.dynamic_filters.always_expanded = true
end

All configuration initializers stay in their respective gems and avo does a safe call to add to them.

adrianthedev avatar May 22 '25 12:05 adrianthedev