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
Settings Search #1312
base: main
Are you sure you want to change the base?
Settings Search #1312
Conversation
|
@luah5 : Registrazione.schermo.2023-06-13.alle.12.55.26.mov
|
|
@luah5 : When selecting an element I don't think @austincondiff wants the whole group to be selected, at least macOS Ventura doesn't do that, it only selects the single element. Registrazione.schermo.2023-06-13.alle.21.45.14.movFor point 2) I think it is useful to understand where the property is, then you need to hear what others think ask @austincondiff. |
|
@Angelk90 I'd agree with out that it should probably flash or jump out at you in some way. System settings doesn't do this though so we might save this for another PR. Regardless, my guess is It is selecting all the related items because they all point to the same location, so they are all selected. We need to think of a workaround to this so only the item that is clicked is selected. |
|
@luah5 : The thing that the whole group remains selected does not convince me. Registrazione.schermo.2023-06-15.alle.11.19.52.mov |
CodeEdit/Utils/Extensions/String/String+camelCaseToProperWord.swift
Outdated
Show resolved
Hide resolved
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.
Nice work! I noticed some issues:
- Tab selection state isn't kept
- I should be able to go through the search results by pressing the up and down arrow keys
- It is difficult to search for settings because the search keywords don't match the "real" labels of the settings
This is a good base, but I think it needs improvements. I strongly suggest using settings labels instead of variable names as keywords. This is what will need to happen anyway.
Not doing that now is a bit pointless, as the work from this PR would be removed later on. I would also like to avoid complaints from users about search not being accurate / predictable
| private func populatePages() -> [SettingsPage] { | ||
| var pages: [SettingsPage] = [] | ||
| let settingsData: SettingsData = SettingsData() | ||
|
|
||
| pages = createPageAndSettings( | ||
| settingsData.general, | ||
| parent: SettingsPage(.general, baseColor: .gray, icon: .system("gear")), | ||
| prePages: pages | ||
| ) | ||
| pages = createPageAndSettings( | ||
| settingsData.accounts, | ||
| parent: SettingsPage(.accounts, baseColor: .blue, icon: .system("at")), | ||
| prePages: pages | ||
| ) | ||
| pages = createPageAndSettings( | ||
| settingsData.theme, | ||
| parent: SettingsPage(.theme, baseColor: .pink, icon: .system("paintbrush.fill")), | ||
| prePages: pages | ||
| ) | ||
| pages = createPageAndSettings( | ||
| settingsData.textEditing, | ||
| parent: SettingsPage(.textEditing, baseColor: .blue, icon: .system("pencil.line")), | ||
| prePages: pages | ||
| ) | ||
| pages = createPageAndSettings( | ||
| settingsData.terminal, | ||
| parent: SettingsPage(.terminal, baseColor: .blue, icon: .system("terminal.fill")), | ||
| prePages: pages | ||
| ) | ||
| pages = createPageAndSettings( | ||
| settingsData.sourceControl, | ||
| parent: SettingsPage(.sourceControl, baseColor: .blue, icon: .symbol("vault")), | ||
| prePages: pages | ||
| ) | ||
| pages.append(SettingsPage(.location, baseColor: .green, icon: .system("externaldrive.fill"))) | ||
|
|
||
| return pages | ||
| } |
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 very confusing pattern to build your pages. Consider letting the createPageAndSettings function return an array and combine all arrays afterwards
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.
How would that look like in code?
|
@luah5 When there is no search text input, the menu item color needs to be primary. It looks like it is defaulting to secondary. It should only be secondary when there is text input into the search field. |
|
@austincondiff , @luah5 : When the possibility of having CE in multiple languages will be enabled later and there will be all the translations, how will this system work at the moment? |
|
So, I'm putting this PR back into Draft because as highlighted by @Wouter01's review comments something has to happen with naming. I'll post more in the discord, regarding what progress I'm making. |
…ttings translation and add locationsSettings for better search results
fix merge conflicts
Could you show a video, does the tab selection need to be kept across sessions with
Re implementing that feature makes the search results group again
Fixed.
Fixed. |

Description
This PR adds support for searching settings in CE's settings, it works very similar to the way System Settings searches.
Related Issues
Checklist
Screenshots
shot.mov