DEV: Remove child theme settings/variables from parent compilation (#16001)

aa1442fdc3 split theme stylesheets so that every component gets its own stylesheet. Therefore, there is now no need for parent themes to collate the settings/variables of its children during scss compilation.

Technically this is a breaking change for any themes which depend on the settings/variables of their child components. That was never a supported/recommended arrangement, so we don't expect this to cause issues.
This commit is contained in:
David Taylor
2022-02-21 11:15:35 +00:00
committed by GitHub
parent c8d956374d
commit 5d6d3fb244
3 changed files with 8 additions and 56 deletions
-30
View File
@@ -565,36 +565,6 @@ HTML
expect(json["my_upload"]).to eq("http://cdn.localhost#{upload.url}")
end
it 'handles child settings correctly' do
Theme.destroy_all
expect(included_settings(theme.id)).to eq("{}")
theme.set_field(target: :settings, name: "yaml", value: "boolean_setting: true")
theme.save!
expect(included_settings(theme.id)).to match(/\"boolean_setting\":true/)
theme.settings.first.value = "false"
theme.save!
expect(included_settings(theme.id)).to match(/\"boolean_setting\":false/)
child.set_field(target: :settings, name: "yaml", value: "integer_setting: 54")
child.save!
theme.add_relative_theme!(:child, child)
json = included_settings(theme.id)
expect(json).to match(/\"boolean_setting\":false/)
expect(json).to match(/\"integer_setting\":54/)
expect(included_settings(child.id)).to eq("{\"integer_setting\":54}")
child.destroy!
json = included_settings(theme.id)
expect(json).not_to match(/\"integer_setting\":54/)
expect(json).to match(/\"boolean_setting\":false/)
end
describe "convert_settings" do
it 'can migrate a list field to a string field with json schema' do