Currently, there are 2 hardcoded sets of screen sizes to pick from: 1 small (called "simple") and 1 more complete set.
A lot of the things needed to support user created screen sizes are already there, in terms of code structure, so this should be relatively straightforward. It can also take inspiration of other similar user managed sets of data (the UI arrangement, name replacements), though those are also in somewhat early state of development.
Intended functionality
Support either a single set on top of the 2 existing, or any amount of user created sets
The defaults sets should probably also be editable/removable
Allow saving the current screen dimensions to a set
Specify the "importance" of a screen size (similar to how there's now a simple set and a more complete set, could be used to show it as a screen switcher or not)
The following component consumes the screenoptions, but won't need changes here. However the styles may need to be adapted to deal with arbitrary amounts of options. Currently the "all screen options" case often results in style issues.
Currently, there are 2 hardcoded sets of screen sizes to pick from: 1 small (called "simple") and 1 more complete set.
A lot of the things needed to support user created screen sizes are already there, in terms of code structure, so this should be relatively straightforward. It can also take inspiration of other similar user managed sets of data (the UI arrangement, name replacements), though those are also in somewhat early state of development.
Intended functionality
Current code
https://github.com/Inwerpsel/use-theme-editor/blob/72df0ad273000d62f082f3041b01de6d5e2c2741/src/state/index.ts#L18-L21
https://github.com/Inwerpsel/use-theme-editor/blob/72df0ad273000d62f082f3041b01de6d5e2c2741/src/components/ui/ScreenSwitcher.jsx#L8-L18
The following component consumes the screenoptions, but won't need changes here. However the styles may need to be adapted to deal with arbitrary amounts of options. Currently the "all screen options" case often results in style issues.
https://github.com/Inwerpsel/use-theme-editor/blob/72df0ad273000d62f082f3041b01de6d5e2c2741/src/components/inspector/VariableScreenSwitcher.jsx#L31-L45