Describe the bug
Decidim can be installed without some gems and even in the default installation, some gems are disabled by default (e.g. consultations, initiatives, elections, votings).
The decidim's application.scss stylesheet assumes all of these 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 would cause the asset compilation to fail.
To Reproduce
Steps to reproduce the behavior:
- Build the Decidim gems and install them
- Run the Decidim application generator
- Try to compile the assets
- See error
Expected behavior
I would expect that I can install Decidim without some modules available.
Screenshots
N/A
Stacktrace
N/A
Extra data (please complete the following information):
- Device: (any)
- Device OS: (any)
- Browser: (any)
- Decidim Version: 0.25.0.dev
- Decidim installation: (none?)
Additional context
When we compiled the assets through asset pipeline, these assets were dynamically imported depending which gems were available:
|
<% Decidim.component_manifests.map(&:stylesheet).compact.each do |stylesheet| %> |
|
@import "<%= stylesheet %>"; |
|
<% end %> |
|
|
|
<% Decidim.participatory_space_manifests.map(&:stylesheet).compact.each do |stylesheet| %> |
|
@import "<%= stylesheet %>"; |
|
<% end %> |
Now of course we can no longer do that as we cannot use ERB with webpack.
@ferblape maybe you have some idea how to solve this? We should probably define some dynamic SCSS variable which defines the stylesheets to be imported...
Describe the bug
Decidim can be installed without some gems and even in the default installation, some gems are disabled by default (e.g. consultations, initiatives, elections, votings).
The decidim's
application.scssstylesheet assumes all of these are available:decidim/decidim-core/app/packs/stylesheets/decidim/application.scss
Lines 4 to 12 in 6bd8053
This would cause the asset compilation to fail.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect that I can install Decidim without some modules available.
Screenshots
N/A
Stacktrace
N/A
Extra data (please complete the following information):
Additional context
When we compiled the assets through asset pipeline, these assets were dynamically imported depending which gems were available:
decidim/decidim-core/app/assets/stylesheets/decidim/application.scss.erb
Lines 4 to 10 in 3593e3f
Now of course we can no longer do that as we cannot use ERB with webpack.
@ferblape maybe you have some idea how to solve this? We should probably define some dynamic SCSS variable which defines the stylesheets to be imported...