View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0018449 | MMW 5 | Extensions framework | public | 2021-10-21 15:22 | 2021-12-18 01:35 |
Reporter | drakinite | Assigned To | |||
Priority | urgent | Severity | minor | Reproducibility | N/A |
Status | closed | Resolution | reopened | ||
Product Version | 5.0.2 | ||||
Target Version | 5.0.2 | Fixed in Version | 5.0.2 | ||
Summary | 0018449: Enable skin options via info.json so skin developers don't have to write code | ||||
Description | As most skin designers are not developers, it does not make much sense to force them to write code in order to make their skins configurable. We should add the option to generate configuration panels from a "skin_options" attribute in their info.json. Should carry an array with each configurable attribute. Example JSON: { "skin_options": [ { "type": "color", "title": "Text color", "variable": "@textColor", "default": "#ffffff" }, { "type": "color", "title": "Highlight color", "variable": "warningColor", "default": "white" }, { "type": "dropdown", "title": "Font size", "variable": "@baseFontSize", "default": "11", "options": [ "9", "11", "13" ] }, { "type": "dropdown", "title": "Font size (2nd example)", "variable": "@baseFontSize", "default": "11", "options": { "9": "Small", "11": "Medium", "13": "Large" } }, { "type": "radio", "default": "compactEnabled", "title": "Compact mode", "options": { "compactEnabled": { "title": "Enable Compact Mode", "variables": { "baseFontSize": "12px", "waveformHeight": "24px", "baseIconSize": "22px" } }, "compactDisabled": { "title": "Disable Compact Mode", "variables": { "baseFontSize": null, "waveformHeight": null, "baseIconSize": null } } } } ] } | ||||
Tags | No tags attached. | ||||
Fixed in build | 2517 | ||||
|
Note: When writing documentation on this feature, we/I need to explain how to rectify a crash in the case of an invalid LESS variable. 1) either delete persistent.json or delete the problematic string inside the customLESS.values array 2) delete the problematic precompiledLESS file in the temp directory |
|
Added feature in 2512, along with: - Improved app load time. - Changed Monkey Groove to have an automatic config panel instead of a config.html and config.js. Same commit as in 0017880. |
|
Feedback from TIV73 (https://www.mediamonkey.com/forum/viewtopic.php?f=27&t=100488): 1) Skins with info.json config panels should show up in the "configurable" addons section. Clicking the gear should open the skin config panel through the same method as 0018483 2) "Modified options are persisted as n_[type] (like 3_color, 2_radio, etc.) in persistent.json, which could lead to inconsistent values if the order of elements is changed after their value has been set. I wanted to highlight it since it happened to me when I set up the options, and it could lead to issues and inconsistend behavior down the road if addon authors change the layout customization settings in future updates." 3) "I would love to see an option to either pick up the default values directly from a less file, or make it possible to remove a stored value if the user clicks the reset changes button instead of assigning a static default value. Consider the following use case: A user tries out different skin color settings, but decides that they ultimately like the default value best, so they click the reset changes button. Some time later, the addon author finds out that the default value is hard to read in some places and pushes an update that changes the default in the their info.js and less files. The user installs the update, but since the reset changes button sets a static value instead of removing the option alltogether they will not get the new default." Currently unsure how best to implement 2; requesting feedback from TIV73. |
|
Fixed in 2517. 1) Autogenerated config panels now show up in the same place as regular config panels, and open on app install. 2) Options are now saved according to the following pattern: For radio: radio_(formatted version of title), e.g. for CodeMonkey: radio_active_tab_background For all others: (type)_(variable), e.g. for Monkey Groove: color_@warningColor 3) Saving skin options now "flushes" old customLESS values (New, optional third parameter to setLessValues) |
|
Verified 2528 no issues found. |