Files
react-native-devtools-frontend/front_end/core/common
Ergün Erdoğmuş b3b2afb9ac [Color] Fix small visual issues in color features
* Added a 1px margin between the text and the warning icon
* Removed vertically aligning the color-mix to middle (all the other
swatches are aligned to baseline by default so this will be too)
* Normalized `hue` to be between [0 - 360] in LCH and OKLCH

Bug: none
Change-Id: I47ac345b12f11e435fe754f97f9b3158e89b8f68
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4194333
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
Auto-Submit: Ergün Erdoğmuş <ergunsh@chromium.org>
2023-01-26 11:56:45 +00:00
..
2022-12-21 14:03:33 +00:00
2022-01-04 16:08:08 +00:00
2021-07-14 10:33:21 +00:00
2022-06-07 14:05:13 +00:00
2022-07-13 09:26:00 +00:00
2021-04-08 12:25:52 +00:00
2022-08-23 16:45:54 +00:00
2021-04-06 11:24:38 +00:00
2022-01-04 16:08:08 +00:00

Settings

Settings can alter the functionality of DevTools. Some of the settings default values can be changed with the command menu or in the settings tab. A settings registration is represented by the SettingRegistration interface, declared in common/SettingRegistration.ts.

All settings have to be registered using the function Common.Settings.registerSettingExtension which expects an object of type SettingRegistration as parameter.

As an example, take the registration of the showHTMLComments settting, which allows users to determine if HTML comments are shown in the Elements tree:

Common.Settings.registerSettingExtension({
  category:  Common.Settings.SettingCategory.ELEMENTS,
  order:  3,
  title:  ls`Show HTML comments`,
  settingName:  'showHTMLComments',
  settingType:  Common.Settings.SettingType.BOOLEAN,
  defaultValue:  true,
  options: [
    {
      value:  true,
      title:  ls`Show HTML comments`,
    },
    {
      value:  false,
      title:  ls`Hide HTML comments`,
    },
  ],
});

A controller for the each setting is added to the 'preferences' tab if they are visible, that is, they have a title and a category. They can also be set with the command menu if they have options and a category (options’ names are added as commands).