Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Extract strict_helpers_enabled? to component-local config #2092

Draft
wants to merge 24 commits into
base: introduce-component-local-config
Choose a base branch
from

Commits on Oct 8, 2024

  1. Use ActiveSupport::Configurable to cascade config

    ViewComponent::Base itself will always use the defaults. Any classes inheriting from ViewComponent::Base will cascade config down using InheritableOptions, only specifying any overrides.
    Generate options being on their own "layer of config is currently unresolved - it might be that config needs to be a new object inheriting from InheritableOptions that has method accessors for everything in that namespace.
    
    This was initially written to support extracting the incoming strict_helpers_enabled? option, but applies to everything.
    boardfish committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    71c23c6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4b4ba76 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0ba800b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a655192 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f56832e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2531907 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1f40e96 View commit details
    Browse the repository at this point in the history
  8. Remove component-local config for now

    No settings actually use it, but this would be the way to introduce it once we come to need it.
    boardfish committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    4c89cbc View commit details
    Browse the repository at this point in the history
  9. Lint

    boardfish committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    2c0daf6 View commit details
    Browse the repository at this point in the history
  10. Update changelog

    boardfish committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    161cee3 View commit details
    Browse the repository at this point in the history
  11. add: use_helper to base

    reeganviljoen authored and boardfish committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    43e1373 View commit details
    Browse the repository at this point in the history
  12. add: changelog entry

    reeganviljoen authored and boardfish committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    5357491 View commit details
    Browse the repository at this point in the history
  13. add: strict helpers

    reeganviljoen authored and boardfish committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    65d8b93 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    f257c84 View commit details
    Browse the repository at this point in the history
  15. revert "fix: linting errors"

    reeganviljoen authored and boardfish committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    6511a91 View commit details
    Browse the repository at this point in the history
  16. fix tests

    reeganviljoen authored and boardfish committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    da9a3e7 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    b76beaa View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    fa526d1 View commit details
    Browse the repository at this point in the history
  19. add: test for missing coverage

    reeganviljoen authored and boardfish committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    29f888a View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    d3fa703 View commit details
    Browse the repository at this point in the history
  21. update changelog

    reeganviljoen authored and boardfish committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    5a5727a View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    c4a0d94 View commit details
    Browse the repository at this point in the history
  23. Use ActiveSupport::Configurable to cascade config

    ViewComponent::Base itself will always use the defaults. Any classes inheriting from ViewComponent::Base will cascade config down using InheritableOptions, only specifying any overrides.
    Generate options being on their own "layer of config is currently unresolved - it might be that config needs to be a new object inheriting from InheritableOptions that has method accessors for everything in that namespace.
    
    It seems like this solution is now applicable to everything, not just strict_helper_enabled?
    boardfish committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    4e5301b View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    e8bc4ef View commit details
    Browse the repository at this point in the history