Skip to content

Move kaminari templates to active_admin folder#8190

Merged
javierjulio merged 2 commits into
masterfrom
kaminari-templates-migration
Dec 28, 2023
Merged

Move kaminari templates to active_admin folder#8190
javierjulio merged 2 commits into
masterfrom
kaminari-templates-migration

Conversation

@javierjulio

Copy link
Copy Markdown
Member

Since we have many partials now that users will be able to copy and modify, it would help to have the Kaminari templates live under the same app/views/active_admin directory. Kaminari has a views_prefix option that we should use over the theme option. I've tested this with our locally generated dev app to simulate a host using either Kaminari defaults or their own partial overrides, and those have no impact on ActiveAdmin Kaminari templates and vice versa so this is a safe change.

Since it will be expected for users to extract many partials in v4, it would help to have all templates under the active_admin folder. Previously, we had Kaminarin in the default location but Kaminari has a views_prefix option we can set.

https://github.com/kaminari/kaminari#multiple-templates

With this that means the our custom templates can now live in app/views/active_admin/kaminari and be within the active_admin folder along side all other templates that can be extracted.
I've tested with our generated app that if it specifies its own Kaminari templates or doesn't, it still won't pick up the ActiveAdmin theme so we are good.
@javierjulio javierjulio self-assigned this Dec 28, 2023
@codecov

codecov Bot commented Dec 28, 2023

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (54bcf81) 99.03% compared to head (17ca342) 99.03%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8190   +/-   ##
=======================================
  Coverage   99.03%   99.03%           
=======================================
  Files         151      151           
  Lines        4150     4150           
=======================================
  Hits         4110     4110           
  Misses         40       40           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@javierjulio javierjulio merged commit 8c783e2 into master Dec 28, 2023
@javierjulio javierjulio deleted the kaminari-templates-migration branch December 28, 2023 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant