Move shared component stylesheets to shared folder

We had an inconsistency where most stylesheets associated to a component
would have the same relative path as their component, so if we had a
component in `app/components/admin/whatever`, its associated stylesheet
would be in `app/assets/stylesheets/admin/whatever`.

There was one exception to this rule: stylesheets for components in
`app/components/shared/` were placed in `app/assets/stylesheets/`. The
reason was that we thought "well... if they're in the root folder,
they're shared". However, this is confusing because in the root folder
there are also stylesheets that aren't associated to a component.

So we're creating the `app/assets/stylesheets/shared/` folder. This also
means we don't have to manually add every stylesheet in this folder the
the `application.scss` file.

We aren't the same for JavaScript files because with JavaScript we still
don't have a clear association between JavaScript files and components.
Only a couple of them (`advanced_search.js` and `check_all_none.js`)
would be good candidates, and the one for the advanced search form
doesn't even use the `.advanced-search-form` selector that we use in the
CSS file.
This commit is contained in:
Javi Martín
2024-04-12 14:06:11 +02:00
parent c367f21705
commit 8272b7e9c3
10 changed files with 1 additions and 9 deletions

View File

@@ -22,28 +22,19 @@
@import "mixins/*";
@import "admin";
@import "advanced_search";
@import "annotator_overrides";
@import "autocomplete_overrides";
@import "avatar";
@import "banner";
@import "check_all_none";
@import "comments_count";
@import "datepicker_overrides";
@import "layout";
@import "participation";
@import "milestones";
@import "pages";
@import "dashboard";
@import "in_favor_against";
@import "legislation";
@import "legislation_process";
@import "legislation_process_form";
@import "map_location";
@import "moderation_actions";
@import "notification_item";
@import "community";
@import "search_results_summary";
@import "stats";
@import "sticky_overrides";
@import "tags";
@@ -61,6 +52,7 @@
@import "sdg/**/*";
@import "sdg_management/*";
@import "sdg_management/**/*";
@import "shared/**/*";
@import "subscriptions";
@import "widgets/**/*";