discourse/app/assets/javascripts/admin/addon/components
Alan Guo Xiang Tan cdba864598
DEV: Support description for properties in objects schema (#26172)
Why this change?

When editing a objects typed theme setting, the input fields which are
rendered should include a description so that the user knows the purpose
of the field which they are changing.

What does this change do?

This change adds support for adding description to each property in the
schema for an object by following a given convention in the locale file.

For a schema like this:

```
objects_setting:
  type: objects
  schema:
    name: section
    properties:
      name:
        type: string
        required: true
      links:
        type: objects
        schema:
          name: link
          properties:
            name:
              type: string
              required: true
              validations:
                max_length: 20
            url:
              type: string
```

Description for each property in the object can be added like so:

```
en:
  theme_metadata:
    settings:
      objects_setting:
        description: <description> for the setting
        schema:
          properties:
            name: <description for the name property>
            links:
              name: <description for the name property in link>
              url: <description for the url property in link>
```

If the a description is not present, the input field will simply not
have an description.

Also note that a description for a theme setting can now be added like
so:

```
en:
  theme_metadata:
    settings:
      some_other_setting: <This will be used as the description>
      objects_setting:
        description: <This will also be used as the description>
```
2024-03-15 07:47:42 +08:00
..
form-template DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
modal DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
report-filters DEV: remove slightly less trivial {{action}} usages (#24289) 2023-11-13 13:29:20 +01:00
schema-theme-setting DEV: Support description for properties in objects schema (#26172) 2024-03-15 07:47:42 +08:00
site-settings UX: Display setting description for objects typed theme setting (#26152) 2024-03-13 12:38:21 +08:00
ace-editor.hbs UX: Show loading spinner while loading dependencies for ace-editor (#26099) 2024-03-11 06:56:17 +08:00
ace-editor.js UX: Show loading spinner while loading dependencies for ace-editor (#26099) 2024-03-11 06:56:17 +08:00
admin-backups-logs.hbs
admin-backups-logs.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
admin-config-area-sidebar-experiment.hbs DEV: Make admin experimental sidebar config more forgiving (#24236) 2023-11-07 13:20:57 +10:00
admin-config-area-sidebar-experiment.js FEATURE: filter additional keywords for the sidebar (#26148) 2024-03-14 12:28:08 +11:00
admin-editable-field.hbs DEV: Update DButton uses (#23333) 2023-08-31 11:49:35 +02:00
admin-editable-field.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
admin-form-row.hbs FIX: Add checkbox-label to more checkbox label elements (#24174) 2023-10-31 08:57:50 +01:00
admin-form-row.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
admin-graph.js DEV: Fix ember/require-super-in-lifecycle-hooks (#24007) 2023-10-19 13:47:45 +02:00
admin-nav.gjs DEV: Sort imports 2023-10-10 21:46:54 +01:00
admin-penalty-history.hbs
admin-penalty-history.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
admin-penalty-post-action.hbs DEV: remove trivial {{action}} usages (#24278) 2023-11-08 10:53:06 +01:00
admin-penalty-post-action.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
admin-penalty-reason.hbs DEV: Use class attribute instead of @class arg (#24804) 2023-12-12 13:09:05 +01:00
admin-penalty-reason.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
admin-penalty-similar-users.hbs DEV: remove slightly less trivial {{action}} usages (#24289) 2023-11-13 13:29:20 +01:00
admin-penalty-similar-users.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
admin-plugin-config-area.gjs DEV: Single admin plugin page for consistent admin plugin UX (#26024) 2024-03-13 13:15:12 +10:00
admin-plugin-config-page.gjs DEV: Single admin plugin page for consistent admin plugin UX (#26024) 2024-03-13 13:15:12 +10:00
admin-plugins-list-item.gjs FEATURE: filter additional keywords for the sidebar (#26148) 2024-03-14 12:28:08 +11:00
admin-plugins-list.gjs DEV: Fix "ember/no-empty-glimmer-component-classes" lint (#24629) 2023-11-29 15:14:30 +01:00
admin-report-chart.hbs
admin-report-chart.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
admin-report-counters.hbs
admin-report-counters.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
admin-report-counts.hbs
admin-report-counts.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
admin-report-inline-table.hbs
admin-report-inline-table.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
admin-report-per-day-counts.hbs
admin-report-per-day-counts.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
admin-report-radar.hbs DEV: Add support for radar charts when displaying reports. (#24274) 2023-11-08 10:48:12 -03:00
admin-report-radar.js DEV: Add support for radar charts when displaying reports. (#24274) 2023-11-08 10:48:12 -03:00
admin-report-stacked-chart.hbs
admin-report-stacked-chart.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
admin-report-storage-stats.hbs
admin-report-storage-stats.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
admin-report-table-cell.hbs
admin-report-table-cell.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
admin-report-table-header.hbs DEV: Update DButton uses (#23333) 2023-08-31 11:49:35 +02:00
admin-report-table-header.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
admin-report-table-row.hbs
admin-report-table-row.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
admin-report-table.hbs DEV: remove slightly less trivial {{action}} usages (#24289) 2023-11-13 13:29:20 +01:00
admin-report-table.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
admin-report-trust-level-counts.hbs
admin-report-trust-level-counts.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
admin-report.hbs DEV: remove trivial {{action}} usages (#24278) 2023-11-08 10:53:06 +01:00
admin-report.js DEV: Don't use attrs (#24323) 2023-11-27 12:16:31 +01:00
admin-theme-editor.hbs DEV: remove slightly less trivial {{action}} usages (#24289) 2023-11-13 13:29:20 +01:00
admin-theme-editor.js DEV: Fix "no-setter-return" lint (#24585) 2023-11-28 10:49:49 +01:00
admin-user-field-item.hbs DEV: Use fn+mut instead of action+mut (#26057) 2024-03-06 18:05:03 +01:00
admin-user-field-item.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
admin-watched-word.hbs DEV: remove trivial {{action}} usages (#24278) 2023-11-08 10:53:06 +01:00
admin-watched-word.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
cancel-link.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
color-input.hbs DEV: Use class attribute instead of @class arg (#24804) 2023-12-12 13:09:05 +01:00
color-input.js DEV: Don't use attrs (#24323) 2023-11-27 12:16:31 +01:00
dashboard-new-feature-item.gjs DEV: Convert truth-helpers to a v2 addon and simplify imports (#26029) 2024-03-05 15:24:47 +00:00
dashboard-new-features.gjs UX: add gift emoji styling for new features (#24523) 2023-11-27 09:32:28 +11:00
dashboard-period-selector.gjs DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
dashboard-problems.hbs DEV: Update DButton uses (#23333) 2023-08-31 11:49:35 +02:00
dashboard-problems.js
email-styles-editor.hbs DEV: Update DButton uses (#23333) 2023-08-31 11:49:35 +02:00
email-styles-editor.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
embeddable-host.hbs DEV: Use fn+mut instead of action+mut (#26057) 2024-03-06 18:05:03 +01:00
embeddable-host.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
embedding-setting.hbs
embedding-setting.js DEV: Fix "no-setter-return" lint (#24585) 2023-11-28 10:49:49 +01:00
emoji-value-list.hbs DEV: remove trivial {{action}} usages (#24278) 2023-11-08 10:53:06 +01:00
emoji-value-list.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
file-size-input.gjs DEV: Add file_size_restriction site setting type (#24704) 2023-12-13 16:22:48 -07:00
flag-user-lists.hbs
flag-user-lists.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
flag-user.hbs
flag-user.js
highlighted-code.hbs DEV: Modernise highlightjs loading (#24197) 2023-11-10 20:39:48 +00:00
highlighted-code.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
inline-edit-checkbox.hbs DEV: Update DButton uses (#23333) 2023-08-31 11:49:35 +02:00
inline-edit-checkbox.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
install-theme-item.hbs
install-theme-item.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
ip-lookup.hbs DEV: revert missing license for maxmind changes (#24538) 2023-11-24 11:31:11 +11:00
ip-lookup.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
moderation-history-item.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
permalink-form.hbs DEV: Use fn+mut instead of action+mut (#26057) 2024-03-06 18:05:03 +01:00
permalink-form.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
plugin-commit-hash.hbs FIX: Improve admin plugin list and modernize code (#23256) 2023-08-28 10:48:59 +10:00
plugin-commit-hash.js FIX: Improve admin plugin list and modernize code (#23256) 2023-08-28 10:48:59 +10:00
resumable-upload.hbs
resumable-upload.js
screened-ip-address-form.hbs DEV: Use fn+mut instead of action+mut (#26057) 2024-03-06 18:05:03 +01:00
screened-ip-address-form.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
secret-value-list.hbs DEV: Use class attribute instead of @class arg (#24804) 2023-12-12 13:09:05 +01:00
secret-value-list.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
setting-validation-message.hbs
setting-validation-message.js
silence-details.hbs DEV: Use class attribute instead of @class arg (#24804) 2023-12-12 13:09:05 +01:00
silence-details.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
simple-list.hbs DEV: remove slightly less trivial {{action}} usages (#24289) 2023-11-13 13:29:20 +01:00
simple-list.js DEV: Update custom array implementations for Ember 5 compatibility (#24435) 2023-11-20 13:26:46 +00:00
site-customization-change-details.hbs
site-customization-change-details.js
site-customization-change-field.hbs
site-customization-change-field.js
site-setting.hbs UX: Display setting description for objects typed theme setting (#26152) 2024-03-13 12:38:21 +08:00
site-setting.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
site-text-summary.hbs DEV: Update DButton uses (#23333) 2023-08-31 11:49:35 +02:00
site-text-summary.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
staff-actions.hbs
staff-actions.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
tags-uploader.hbs
tags-uploader.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
theme-setting-editor.js DEV: Allow typed objects theme settings to be saved via settings editor (#26100) 2024-03-11 08:42:12 +08:00
theme-setting-relatives-selector.js
theme-settings-editor.hbs FEATURE: JSON editor for theme settings (#21647) 2023-07-27 13:48:59 -04:00
theme-settings-editor.js DEV: Allow typed objects theme settings to be saved via settings editor (#26100) 2024-03-11 08:42:12 +08:00
theme-translation.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
theme-upload-add.hbs UX: update appropriate btn-flat instances to btn-transparent (#25945) 2024-02-29 11:47:07 +01:00
theme-upload-add.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
themes-list-item.hbs FEATURE: delete multiple inactive themes/components (#23788) 2023-10-08 21:35:53 +00:00
themes-list-item.js FEATURE: filter themes and components (#25105) 2024-01-04 14:29:08 +11:00
themes-list.hbs UX: update appropriate btn-flat instances to btn-transparent (#25945) 2024-02-29 11:47:07 +01:00
themes-list.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
value-list.hbs DEV: remove trivial {{action}} usages (#24278) 2023-11-08 10:53:06 +01:00
value-list.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
version-checks.hbs
version-checks.js
watched-word-form.hbs UX: clean up some label and form inconsistencies, reduce excess bolding (#25701) 2024-02-15 11:27:51 -05:00
watched-word-form.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
watched-word-uploader.hbs
watched-word-uploader.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
webhook-event-chooser.hbs FEATURE: granular webhooks (#23070) 2023-10-09 03:35:31 +00:00
webhook-event-chooser.js DEV: Fix "no-setter-return" lint (#24585) 2023-11-28 10:49:49 +01:00
webhook-event.hbs
webhook-event.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
webhook-events.hbs
webhook-events.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
webhook-status.hbs
webhook-status.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00