CodeEdit
CodeEdit copied to clipboard
[WIP] Resolved issues in search-results #534
Dev note 🛠
I started working on this issue and found out that after clicking on a search result we open whole file (instead of file with desired line of code). I found it hard to fix all of color issues without a little bit of hacking (🪝 ).
Current implementation of FindNavigatorResultList
doesn't catch selection events within the same file so I'm considering refactoring it something similar to ProjectNavigator
- OutlineGroup. WDYT?
Description
Changes
- Fixed issues with colors in search results
- Fixed: text in the search field is removed from the input field when you switch panels.
- Refactored
FindNavigatorResultFileItem
- extracted large parts to separate subviews
Related Issue
- #534
Checklist
- [x] I read and understood the contributing guide as well as the code of conduct
- [x] My changes generate no new warnings
- [x] My code builds and runs on my machine
- [x] I documented my code
- [ ] Review requested
Screenshots
Light Mode
Before | After |
---|---|
![]() |
![]() |
Dark Mode
Before | After |
---|---|
![]() |
![]() |
Looks good. We need to preserve the transparency of unbolded text in your results though.
Two related things that need to be looked at...
- We need to be using a selection material instead of a color for the background of your selection. See #530.
- The breadcrumb selector above the input is not spaced correctly and the inputs themselves have a slightly different style compared to Xcode.
@zuziakaxel : As you can see from the pictures it looks different.
![Schermata 2022-04-26 alle 09 11 32](https://user-images.githubusercontent.com/20476002/165243026-4101e193-8113-4111-a222-0cda01ae06b4.png)
![Schermata 2022-04-26 alle 09 11 52](https://user-images.githubusercontent.com/20476002/165243036-8348867b-8f46-40dc-871c-fa3d34ccd4f8.png)
I don't know if it's the font or the bold. Other related text is also different in font.
@austincondiff : What do you think?
- You could put the icon color of the file when it is not selected.
- I also noticed one more thing, search the same word on both xcode and codeEdit, the results on the files should be the same data in the same way.
I'm not talking about the ignore case (upper and lower case) which has not yet been implemented.
I talk about the order of the files, for example the first file given on xcode is
AboutView
on codeEdit isWelcomeView
. How come this difference, what is based.
Agreed. Please add the appropriate icon color in that is used in the project navigator and tab bar.
Update: Still working on it. I need to refactor FindNavigatorResultList
from:
List
ForEach
DisclosureGroup
ForEach
to:
List
OutlineGroup
Because previous implementation was supporting only selecting whole file (not a specific search result), therefore adjusting selection style for single "cell" was not possible.
@zuziakaxel This PR is still in draft status and it is three weeks old. To avoid this getting stale I just wanted to check on the status of this PR.
FYI, the unmatched text is too prominent, especially in dark mode.
Any updates on this?
Hey @zuziakaxel! This PR looks like it might be stale if you don't mind I'm going to take it over and finish it up.
Closing this due to #703. Thanks for the help @zuziakaxel! Your initial work gave me a great boost.