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

Dynamic stylesheet includes with Webpacker #8115

Merged
merged 4 commits into from Jun 11, 2021

Conversation

ahukkanen
Copy link
Contributor

@ahukkanen ahukkanen commented Jun 8, 2021

🎩 What? Why?

The Decidim asset compilation will fail if all Decidim gems are not available in the bundle because the application.scss assumes all these gems are available:

@import "stylesheets/decidim/accountability/accountability";
@import "stylesheets/decidim/budgets/budgets";
@import "stylesheets/decidim/conferences/conferences";
@import "stylesheets/decidim/consultations/consultations";
@import "stylesheets/decidim/initiatives/initiatives";
@import "stylesheets/decidim/elections/elections";
@import "stylesheets/decidim/votings/votings";
@import "stylesheets/decidim/proposals/proposals";
@import "stylesheets/decidim/surveys/surveys";

This works fine when Decidim is installed from GitHub (because they are all available in the repository) but it fails when it is installed e.g. through RubyGems in the future.

See further explanations from #8109.

This PR proposes a solution to this problem by moving the stylesheet import configurations to the module's assets.rb.

📌 Related Issues

Testing

See #8109

📋 Checklist

  • CONSIDER adding a unit test if your PR resolves an issue.
  • ✔️ DO check open PR's to avoid duplicates.
  • ✔️ DO keep pull requests small so they can be easily reviewed.
  • ✔️ DO build locally before pushing.
  • ✔️ DO make sure tests pass.
  • ✔️ DO make sure any new changes are documented in docs/.
  • ✔️ DO add and modify seeds if necessary.
  • ✔️ DO add CHANGELOG upgrade notes if required.
  • ✔️ DO add to GraphQL API if there are new public fields.
  • ✔️ DO add link to MetaDecidim if it's a new feature.
  • AVOID breaking the continuous integration build.
  • AVOID making significant changes to the overall architecture.

@leio10 leio10 merged commit f4ec504 into decidim:develop Jun 11, 2021
@ahukkanen ahukkanen deleted the feature/dynamic-stylesheet-includes branch June 11, 2021 11:50
@andreslucena andreslucena added type: internal PRs that aren't necessary to add to the CHANGELOG for implementers and removed target: developer-experience labels Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-review module: core type: internal PRs that aren't necessary to add to the CHANGELOG for implementers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Webpacker compilation fails if all core gems are not available
4 participants