Skip to content

Move all Avo gems configuration inside one Avo.configure block #3872

@adrianthedev

Description

@adrianthedev

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Triage

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions