-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store styling settings to project #1877
Comments
These are the settings we store currently in the project workspace: <component name="com.vaadin.designer2.intellij.settings.SizePresetsSettingsComponent">
<option name="sizePresets">
<list>
<SizePreset>
<option name="caption" value="Phone" />
<option name="height" value="568" />
<option name="width" value="320" />
</SizePreset>
<SizePreset>
<option name="caption" value="Tablet" />
<option name="height" value="1024" />
<option name="width" value="768" />
</SizePreset>
<SizePreset>
<option name="caption" value="Desktop" />
<option name="height" value="900" />
<option name="width" value="1440" />
</SizePreset>
</list>
</option>
</component>
<component name="designer2.settings">
<option name="applicationTheme" value="src/main/webapp/frontend/styles/shared-styles.html" />
<option name="autodetectServerAddress" value="true" />
<option name="componentTheme" value="MATERIAL" />
<option name="lastJavaLocation" value="$PROJECT_DIR$/src/main/java" />
<option name="lastTemplateLocation" value="$PROJECT_DIR$/src/main/webapp/frontend/src/views" />
<option name="serverIp" value="192.168.10.36" />
<option name="serverPort" value="56548" />
</component> Settings such as server IP and port are user specific and thus not something we want to store into VCS. Size presets may be good to store in VCS. Theme settings clearly need to be stored into VCS so that they do not have to be manually reset after project import and that they transfer between developers and designers. Settings that should be stored into VCS need to be stored in files separate from settings that are not intended to be stored into VCS - so that the unwanted settings can be easily excluded from commits. Therefore, there may be several Designer related files in |
I feel that when weighing ease of use against powerful features, in this case, I would go with ease of use. That is, store only the styling settings. Storing viewport sizes sounds like a good idea, but I can imagine a few edge cases which would require conflict resolution. |
Three approaches can be used to separate the non-VCS and VCS settings:
In particular, the theme settings would go into Currently, all settings are stored in IDE, so the natural next step to implement is option 3. |
The format of the file can be JSON as parsers are readily available in all target environments.
|
To simplify JSON parsing, the settings could be stored in the JSON file alternatively like this:
|
I think option 3 is good enough. We don't need to touch what IDEs already handled. The simpler version of JSON structure looks fine, it could help to reduce nested objects after parsing. |
Settings created in #1868 and #1869 should be stored in the filesystem in the project folder
.vaadin/designer
The text was updated successfully, but these errors were encountered: