Skip to content
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

Feature: search through project with ctrl + f #53

Merged
merged 13 commits into from
Dec 3, 2022

Conversation

sillydan1
Copy link
Collaborator

@sillydan1 sillydan1 commented Nov 25, 2022

Feature - search project modal

This PR adds a new modal for finding elements in the currently opened project. This makes it much easier to find excactly the location/edge/component/update/sync etc that you need. Searches accepts regular expressions (java's regex, so users will have to manually escape special characters). If a search is not a valid regex, it will simply default to string-include.

The modal can be summoned either by selecting view > search... or by pressing ctrl + f.

Additionally, I have included some changes that makes it much easier to navigate the model when using a trackpad.

Dependencies

This PR is based on the changes from #52, so that should be merged first

Demo

Screen.Recording.2022-11-25.at.22.42.13.mov

Limitations

Right now, to keep the modal performant, it will only show a maximum of 100 (hardcoded) search results, with a priority of components, then locations, then edges. This might not be very accurate, but it's a quick and easy solution that seems to be good enough. In any case, it can be extended and/or refactored fairly easily.

@sillydan1 sillydan1 force-pushed the feature/project-search branch 2 times, most recently from aa32820 to afc6f10 Compare November 26, 2022 08:06
@sillydan1 sillydan1 changed the title Feature: project search Feature: search through project with ctrl + f Nov 26, 2022
@sillydan1 sillydan1 force-pushed the feature/project-search branch from 639846f to c74de3f Compare November 27, 2022 09:16
@sillydan1 sillydan1 requested a review from Nielswps November 27, 2022 17:17
Copy link
Contributor

@Nielswps Nielswps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 😃 Is there a reason for calling the feature SpotlightSearch like on macOS?

@sillydan1 sillydan1 force-pushed the feature/project-search branch from af0e2dd to a0efd2c Compare December 3, 2022 15:39
@sillydan1
Copy link
Collaborator Author

Looks good 😃 Is there a reason for calling the feature SpotlightSearch like on macOS?

This was mostly because that's where I got the inspiration from 😅 renamed it in a0efd2c

@sillydan1 sillydan1 merged commit fba26c3 into master Dec 3, 2022
@sillydan1 sillydan1 deleted the feature/project-search branch December 3, 2022 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants