You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A significant part of community building around IDEs, involves the sharing of colour schemes, but doing so with RIDE currently involves manual surgery on ones prefs.json. See this comment to a broader issue.
While RIDE currently stores all user-made schemes in the user's prefs.json, IDEs often have a folder where schemes live as separate files. For the purposes of this discussion, let's call it /schemes/.
Should the 7 built-in schemes be represented as files?
Preferably, there should exist a GUI way to import a scheme from e.g. a downloaded file, in addition to the "advanced" method of dropping files into /schemes/.
We probably want to keep all the users active settings in their prefs.json so a viable approach might be to merge all the schemes from /schemes/ into prefs.json at startup time.
Since any custom scheme created from within RIDE lives in prefs.json, we need a method to export schemes to a file that can then be shared.
A possible interface could be as follows:
The two new buttons open file selection boxes. Export would extract the current scheme from prefs.js and place it into a a file (by default called ${currentSchemeName}.json). Import would allow choosing a file which would then be validated and if both valid and not conflicting with an existing scheme name (we could add (1) to the name if it conflicts), merged into prefs.js, also choosing that scheme as the new current scheme.
Based on the code in #749, it looks like it should be fairly simple to add this. Pop-up file selection dialogs are vailable via D.el.dialog.showOpenDialogSync.
This discussion was converted from issue #750 on July 27, 2021 07:31.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
A significant part of community building around IDEs, involves the sharing of colour schemes, but doing so with RIDE currently involves manual surgery on ones prefs.json. See this comment to a broader issue.
While RIDE currently stores all user-made schemes in the user's prefs.json, IDEs often have a folder where schemes live as separate files. For the purposes of this discussion, let's call it /schemes/.
Preferably, there should exist a GUI way to import a scheme from e.g. a downloaded file, in addition to the "advanced" method of dropping files into /schemes/.
We probably want to keep all the users active settings in their prefs.json so a viable approach might be to merge all the schemes from /schemes/ into prefs.json at startup time.
Since any custom scheme created from within RIDE lives in prefs.json, we need a method to export schemes to a file that can then be shared.
A possible interface could be as follows:
The two new buttons open file selection boxes. Export would extract the current scheme from prefs.js and place it into a a file (by default called
${currentSchemeName}.json
). Import would allow choosing a file which would then be validated and if both valid and not conflicting with an existing scheme name (we could add(1)
to the name if it conflicts), merged into prefs.js, also choosing that scheme as the new current scheme.An example scheme file:
Based on the code in #749, it looks like it should be fairly simple to add this. Pop-up file selection dialogs are vailable via
D.el.dialog.showOpenDialogSync
.Beta Was this translation helpful? Give feedback.
All reactions