-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Associate popover with foldermanager #1396
Conversation
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.
I think that it's a good idea but it's really distracting as it is now because of how the popover keeps shrinking and growing from the centre.
On my machine I've tried to manually set the pointed_to
property of the popover so that the popover is near the top of the sidebar:
The popover grows and shrinks from the top now however, the initial position of the popover is wrong if the app starts with the sidebar hidden:
Change I made to achieve this:
public FuzzySearchPopover (Gee.HashMap<string, Services.SearchProject> pps, Scratch.MainWindow window) {
Object (
modal: true,
relative_to: window.sidebar,
constrain_to: Gtk.PopoverConstraint.WINDOW,
width_request: 500,
current_window: window,
position: Gtk.PositionType.LEFT,
pointing_to: Gdk.Rectangle () { x = window.sidebar.get_allocated_width (), y = 36 }
);
//...
I think that if the issue with the initial position is solved then this is okay to merge
@colinkiama Thanks for looking at this. I considered pointing to a fixed rectangle but as you say it does not work so well if the sidebar is hidden. We could point to the left-hand edge of the window or move the rectangle before showing the popover (but that feels hacky). I'll work on this some more. |
@colinkiama I have changed it so that the popover points to the top left corner of the document now, whether or not the sidebar is open. Its not ideal but I do not think it worth doing more at this stage. It will have to be reworked anyway when moved to main code and/or ported to Gtk4. In Gtk4 there is more control over the positioning and appearance of popovers. |
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.
I agree
* Added a fuzzy search modal * Fixed indent * Use accent color for selection * Listen to git change * Use async fuzzy finder and ignore paths from .gitignore * Resize dialog * Added scrolling by up/down arrows * Check project content on each search to get all changes * Add basic debouncing and cancellation for each search query * Add cancellable checks to all loops during fuzzy search * Increase fuzzy search results update speed * Fix long delay before fuzzy finder dialog opens - Fuzzy finder paths indexed when plugin is activated - Fuzy finder dialog now opens instantly * Fix vala-lint errors in fuzzy-search plugin directory * Prevent fuzzy search dialog from opening if there are no projects opened * Clicking on fuzzy search results loads the clicked result * Fuzzy search results across multiple projects are disambiguated using the project name before file path * Update fuzzy search debug logs * Improve Fuzzy Search Accuracy - Combine file name and file paths in fuzzy finder * Ignore dot-prefixed directories in fuzzy search * Update debug messaging for fuzzy search * Fix code style warnings in fuzzy search plugin * Update license and copyright info for Fuzzy Finder plugin * Add end method to project path parsing async call * Fix vala-lint errors * Improve fuzzy matching - Fix issue how matches are added to list of matches - Stop using a combined score. Prefer filename based matches when available - Stop including directory separator in separator bonus * Change fuzzy search keyboard shortcut to 'ALT + F' * Remove unused GitManager signals * Files that cannot be opened in Code are filtered out of fuzzy search * Render fuzzy search items with list boxes * Add mouser hover styling to fuzzy search items * Handle Fuzzy Search key presses with EventControllerKey * Now using popover to show fuzzy search * Add title label to fuzzy search popover * Remove unused window size and positining code * Prevent focus on fuzzy item results * Fuzzy search results for current project are prioritised * Expose fuzzy find function and accelerator in sidebar action menu (#1395) * Add Fuzzy Find menuitem to sidebar * Consistently use "Find Project Files" * Move SearchProject to separate file * Fix lint * Remove menuitem on deactivation of "Find Project Files" plugin * Associate popover with foldermanager (#1396) * Associate popover with foldermanager * Remove deprecated PopoverConstraint * Add folder_item_change plugin manager hook in preparation for background indexing * Allow search project parsing to be cancellable * Create indexer and add methods for adding and removing files and directories to search project class * Use fuzzy search indexer for fuzzy search results * Update indexer debug logs * Update license info and comments in Fuzzy Search Project * Remove old fuzzy search indexer testing logs --------- Co-authored-by: Marvin Ahlgrimm <[email protected]> Co-authored-by: Jeremy Wootten <[email protected]>
I am not sure about this one. The issue I am trying to address is where the popover should point if the foldermanager or searchbar is hidden. Feel free to reject.