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

Search-box Workflow Optimizations #645

Closed
fromagi opened this issue Feb 5, 2021 · 4 comments · Fixed by #639 or #946
Closed

Search-box Workflow Optimizations #645

fromagi opened this issue Feb 5, 2021 · 4 comments · Fixed by #639 or #946
Assignees
Labels
enhancement Request: New feature or improvement user interface Component: General user interface

Comments

@fromagi
Copy link

fromagi commented Feb 5, 2021

I find myself eagerly turning to novelWriter as my drafting environment of choice, though there is one area where I'd like to suggest QoL improvements -- the search bar.

  • Having the search text highlighted either: 1) when it is re-opened after being closed/minimized with populated content, and 2) if accessed via keyboard shortcut after being already open and populated.
  • A "highlight all" feature flag to visually represent all matches at a glance (and then being able to cycle through them as is currently implemented).

Expanding the presentation and fluidity of searching would be much appreciated! Thank you for sharing novelWriter with the community... I found your project after it was mentioned on /r/writing.

@fromagi fromagi added the enhancement Request: New feature or improvement label Feb 5, 2021
@vkbo
Copy link
Owner

vkbo commented Feb 5, 2021

Thanks, these are both good suggestions.

The first one is trivial, and a one-line change. I can certainly do that.

The second one is a little more complicated. Currently, the search feature is just a wrapper for the built-in "find" feature in the underlying Qt text editor. It only searches in a step-wise manner. I can probably extract the necessary information by making a dry run search first and find all the locations, but highlighting them are a bit more tricky. There are some serious performance bottlenecks between th Python and C++ side in PyQt5 when it comes to iterate over paragraphs for the highlighting class on larger documents.

But I'll have a look at it and see if I can make something work at least.

@vkbo vkbo self-assigned this Feb 5, 2021
@vkbo vkbo added this to the Release 1.2 RC 1 milestone Feb 5, 2021
@fromagi
Copy link
Author

fromagi commented Feb 5, 2021

Much appreciated on both fronts! Perhaps a decent consolation for the highlight-all bottleneck could be a counter showing "X of N" to allow writers a way to quickly ascertain the amount of hits for their given search term. My motivation here is that I often turn to this sort of impromptu search to prevent redundant word choices.

Thanks again -- I am very much looking forward to future releases.

@vkbo
Copy link
Owner

vkbo commented Feb 5, 2021

Ah, I see. Doing a dry run search will certainly get the count. That I can implement. It should be very fast too. I have it on my ideas list anyway. There's also a request for a replace all feature that will also benefit from that in #545.

@vkbo vkbo mentioned this issue Feb 6, 2021
@vkbo vkbo linked a pull request Feb 6, 2021 that will close this issue
@vkbo vkbo modified the milestones: Release 1.4 RC 1, Future Release Jul 12, 2021
@vkbo vkbo mentioned this issue Sep 13, 2021
@vkbo vkbo added the user interface Component: General user interface label Dec 31, 2021
@vkbo vkbo closed this as completed in #946 Jan 1, 2022
@vkbo
Copy link
Owner

vkbo commented Jan 1, 2022

After having postponed this for about 4 releases, I have finally added a counter to the search tool. It should be a part of release 1.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Request: New feature or improvement user interface Component: General user interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants