Revert "DEV: Use separate files for theme component stylesheets (#12214)" (#12224)

This reverts commit f57a49c2f97c78865a4ad806339a2f847d6bc98c.

This had some unexpected side effects, needs some more work.
This commit is contained in:
Penar Musaraj
2021-02-26 08:20:39 -05:00
committed by GitHub
parent 4b0496b2fc
commit e74bdfdf8e
6 changed files with 31 additions and 41 deletions

View File

@ -315,7 +315,8 @@ class Theme < ActiveRecord::Base
if all_themes
message = theme_ids.map { |id| refresh_message_for_targets(targets, id) }.flatten
else
message = refresh_message_for_targets(targets, theme_ids).flatten
parent_ids = Theme.where(id: theme_ids).joins(:parent_themes).pluck(:parent_theme_id).uniq
message = refresh_message_for_targets(targets, theme_ids | parent_ids).flatten
end
MessageBus.publish('/file-change', message)
@ -371,7 +372,7 @@ class Theme < ActiveRecord::Base
end
def list_baked_fields(target, name)
theme_ids = Theme.transform_ids([id], extend: false)
theme_ids = Theme.transform_ids([id])
self.class.list_baked_fields(theme_ids, target, name)
end