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

Proposal for themes #1810

Closed
nicolas-brousse opened this issue Oct 23, 2020 · 1 comment
Closed

Proposal for themes #1810

nicolas-brousse opened this issue Oct 23, 2020 · 1 comment
Labels
feature new functionality that’s not yet implemented views-and-styles how administrate looks and is interacted with

Comments

@nicolas-brousse
Copy link

First thanks for this pretty light gem.

I'm opening this issue for a proposal about themes.

We plan for a project to make a full custom theme/template for administrate. This seems not a problem since administrate views seems easily overwritable.
But the fact that we will still install gem that install jquery, momentjs, sass, etc, for nothing (since we plan to use webpacker and other libraries) is a bit noisy.

I was thinking about a separate gem for the theme part that contains stylesheets and javascripts. And so update the README to tell user to install the two gem by default.

  • administrate + administrate_theme
  • Or administrate-core + administrate (that contains theme and depends on administrate-core)

What do you think about?

@nickcharlton
Copy link
Member

There's been some ongoing discussion around how we handle Sprockets vs. Webpacker, which is documented in #1617, broadly the answer here is that I'd expect new projects to be using Webpacker, but we need to continue to support Sprockets (basically until a version or two after it's removed from Rails, as we do with everything). I'd expect that the solution to this problem involves an extra hook/method call to provide the option for which frontend pipeline is being used in something like config/application.rb.

As for JavaScript dependencies, I'd like to simplify this dependency graph too. This has been discussed in #1469.

I don't think having a separate gem for the purposes of adding a theme is a direction the project should do in; users can override views if they like using the generators (which I'd expect to be a less frequent use case) and adding another gem would add to the maintenance burden of maintaining not just this project but various associated plugins, too.

As for how you'd implement this anyway, I can imagine doing something similar to how Kaminari has themes or how Oath generators is built.

@nickcharlton nickcharlton added feature new functionality that’s not yet implemented views-and-styles how administrate looks and is interacted with labels Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature new functionality that’s not yet implemented views-and-styles how administrate looks and is interacted with
Projects
None yet
Development

No branches or pull requests

2 participants