Bug 1216592

Summary: [Build 20231023] The shortcut Ctrl-F doesn't work as expected in gnote 45.0
Product: [openSUSE] openSUSE Tumbleweed Reporter: Grace Wang <grace.wang>
Component: GNOMEAssignee: E-mail List <gnome-bugs>
Status: CONFIRMED --- QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: dimstar, yfjiang, zcjia
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://openqa.opensuse.org/tests/3677170/modules/gnote_search_all/steps/5
Whiteboard:
Found By: openQA Services Priority:
Business Priority: Blocker: Yes
Marketing QA Status: --- IT Deployment: ---
Attachments: good-search-result with Matches column

Description Grace Wang 2023-10-26 07:47:02 UTC
## Observation

Steps:
Install and launch gnote -> Send key "Ctrl-F" to display the search bar

Actual Result:
The search bar doesn't appear. See https://openqa.opensuse.org/tests/3677170/modules/gnote_search_all/steps/5

If we simply click the "Search" button from the menu bar, then the search bar can be displayed correctly.

openQA test in scenario opensuse-Tumbleweed-DVD-x86_64-desktopapps-documentation@GraceWang571/os-autoinst-distri-opensuse#poo136208@64bit fails in
[gnote_search_all](https://openqa.opensuse.org/tests/3677170/modules/gnote_search_all/steps/5)

## Test suite description
Maintainer Yaun Ren


## Reproducible

Fails since (at least) Build [GraceWang571/os-autoinst-distri-opensuse#poo136208](https://openqa.opensuse.org/tests/3673407)


## Expected result

Last good: (unknown) (or more recent)


## Further details

Always latest result in this scenario: [latest](https://openqa.opensuse.org/tests/latest?arch=x86_64&distri=opensuse&flavor=DVD&machine=64bit&test=desktopapps-documentation%40GraceWang571%2Fos-autoinst-distri-opensuse%23poo136208&version=Tumbleweed)
Comment 1 Dominique Leuenberger 2023-10-26 10:26:25 UTC
I tried this locally

* Strated gnote
* pressed CTRL-F - A search popup appears directly under the gnote window

https://openqa.opensuse.org/tests/3677170#step/gnote_search_all/5

The popup is actually visible there - and contains the text 'welcome'
Comment 2 Grace Wang 2023-10-27 08:35:22 UTC
(In reply to Dominique Leuenberger from comment #1)
> I tried this locally
> 
> * Strated gnote
> * pressed CTRL-F - A search popup appears directly under the gnote window
> 
> https://openqa.opensuse.org/tests/3677170#step/gnote_search_all/5
> 
> The popup is actually visible there - and contains the text 'welcome'

Thanks for trying this.

Yeah, it looks like the CTRL-F can invoke a popup window, and we can also type in the keyword. 
If we press the "Enter" button following the above steps, then nothing happens, all the notes( no matter if they contain the keyword or not) are in the result list. The search function doesn't work here.

If we try to search by clicking the "Search" button -> type in keyword -> press the "Enter" button, then only the notes match the condition can be listed with a new colomn named "Matches". This is expected and super good.
From the "Matches" column we can see if the note is "title match" or "content match". Please find the attachment "good-search-result.png" for details.
IMHO, this is a good search function.
Comment 3 Grace Wang 2023-10-27 08:36:39 UTC
Created attachment 870482 [details]
good-search-result with Matches column
Comment 4 Dominique Leuenberger 2024-01-18 15:57:51 UTC
I think the issue is that CTRL-F is bound to two different searches

When the right pane is activated, it 'searches' in the Notes' Names.
If the left pane is enabled, it opens the 'top search panel and searches notes' contents.
Comment 5 Dominique Leuenberger 2024-01-18 16:03:53 UTC
https://gitlab.gnome.org/GNOME/gnote/-/issues/163 seems to be related (fixed in master, supposedly for GNOME 46)