-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
When users open the qmlformat configuration panel for the first time, they are greeted with a blank text editor. There is no indication of what can go into the editor, or where to find information.
Although more documentation is now available (see QTCREATORBUG-32964 ), this is still insufficient for a decent UX. The GUI itself should guide the user to configure qmlformat correctly.
Below are some ideas on how to improve the UX.
Preferred approach: The GUI shows all possibilities and restricts the user's ability to enter invalid input
Even if the configuration data is stored as an INI file, the GUI really shouldn't present itself as a raw INI editor. Rather, it should present a table of all possible options, and let the user set the desired value via (check|spin|combo)boxes, just like the Qt Designer's property editor.
Default values can be obtained via the output of qmlformat --write-detaults
(This is a quick mockup made via Qt Designer; (check|spin|combo)boxes would be nicer)
Alternative approach: The GUI provides assistance for using the raw text editor
If we keep the raw text editor, then we need to provide assistive tools:
- The editor should be auto-initialized with the output of qmlformat --write-detaults
- Provide auto-completion to nudge users towards accepted keys/values (Suggested by fabiankosmale at https://bugreports.qt.io/browse/QTCREATORBUG-32964?focusedId=886710&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-886710 )
- Provide warnings if the user enters invalid keys/values (suggested by sami.shalayel at https://bugreports.qt.io/browse/QTCREATORBUG-33299?focusedId=903453&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-903453 )
Bonus
Ideally, the IDE would also gracefully handle differences between qmlformat versions, and be able to automatically adapt to new options added to future versions of qmlformat (without requiring any modifications to the IDE itself). For example:
- The IDE should query qmlformat itself to find out what options are supported
- The IDE should avoid problems related to passing newer options to older versions of qmlformat (e.g. when a project uses an older LTS kit)
- relates to
-
QTCREATORBUG-32964 Document how to use the new "Global qmlformat Configuration"
-
- Closed
-
- resulted from
-
QTCREATORBUG-33299 qmlformat previewer: Show effects of FunctionSpacing
-
- Closed
-