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
Show layout names rather than keys in Preferences UI #792
Conversation
Also rename some variables/functions to distinguish between keys and names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great change. A couple comments, but overall looks good.
BinarySpacePartitioningLayout.self | ||
] | ||
|
||
static var layoutByKey: [String: Layout.Type] = Dictionary(uniqueKeysWithValues: zip( layoutClasses.map { ($0.layoutKey) }, layoutClasses )) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line Length Violation: Line should be 120 characters or less: currently 144 characters (line_length)
The Travis build failed with |
I reran it. It seems like it was a transient Travis failure and not the tests. |
Also rename some variables/functions to explicitly distinguish between layout keys and
names (avoid ambiguous term
layoutString
). If you want, I can split this into two separate PRs, but I figured they are quite related.This should be a UI change only; functionality should not be affected. For instance, preferences storage is still by layout key, not layout name; it's just displayed as layout names.
With this PR, the layout keys should be entirely invisible to the average user, unless I'm missing something. This is advantageous for layouts where the key bears little resemblance to the name, e.g. key
middle-wide
with name3Column Middle
.