mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
DEV: Introduce experimental type: objects
theme setting (#25538)
Why this change? This commit introduces an experimental `type: objects` theme setting which will allow theme developers to store a collection of objects as JSON in the database. Currently, the feature is still in development and this commit is simply setting up the ground work for us to introduce the feature in smaller pieces. What does this change do? 1. Adds a `json_value` column as `jsonb` data type to the `theme_settings` table. 2. Adds a `experimental_objects_type_for_theme_settings` site setting to determine whether `ThemeSetting` records of with the `objects` data type can be created. 3. Updates `ThemeSettingsManager` to support read/write access from the `ThemeSettings#json_value` column.
This commit is contained in:

committed by
GitHub

parent
8eb4bf07a6
commit
9f884cdaab
@ -41,6 +41,7 @@ class ThemeSettingsParser
|
||||
|
||||
opts[:textarea] = !!raw_opts[:textarea]
|
||||
opts[:json_schema] = raw_opts[:json_schema]
|
||||
opts[:schema] = raw_opts[:schema]
|
||||
|
||||
opts[:refresh] = !!raw_opts[:refresh]
|
||||
|
||||
|
Reference in New Issue
Block a user