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

show results on the ctrl+f highlighter without clicking #1696

Merged
merged 8 commits into from
Mar 14, 2023

Conversation

sratslla
Copy link
Contributor

fixes #1521

image

@sratslla sratslla changed the title I1521 show results on the ctrl+f highlighter without clicking Mar 12, 2023
@ReimarBauer
Copy link
Member

ReimarBauer commented Mar 12, 2023

with one view open it is exact as wanted. But we can open any view multiple times and also different views. When there are more occurencies we should better select which is wanted, see example

example

somehow the result is also interesting. This would mean highlight all occurencies of ... may be we should have an option.

Besides navigation a user to a button/text I was also thinking about using this in the tutorials. On different OS,Screen,Desktops the fonts are different. I want to simplify the navigation for pyautogui, e.g.

I can send the keystroke to pyautogui and then look for:
pag.locateCenterOnScreen(picture('view', 'hightligted.png'))

Please can you take care that when it is multiple times in the selection to force the user to choose.

For the other case (highlight multiple times) we would need a checkbox to enable this.

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

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

please have a look on an example with multiple times a view opened or different views.
Is that possible to limit to exact one occurency?

@sratslla
Copy link
Contributor Author

sratslla commented Mar 12, 2023

Good Evening @ReimarBauer
I will look into the code and try to limit it to one occurrence.
To be sure these are the changes requested?
-> add a checkbox (highlight multiple times)(if True) to implement the filter as it is working now.
-> checkbox (highlight multiple times)(if False) the user has to manually go and click on the item to highlight it
OR
only the first window in the shortcut window changes color for other window the user have to go and click on the item
-> in the case of only one view opening the filter should behave as it is working now.

@ReimarBauer
Copy link
Member

ReimarBauer commented Mar 12, 2023

Moin Shubh Gaur :)

thx. for looking into this.

-> add a checkbox (highlight multiple times)(if True) to implement the filter as it is working now. : Yes
-> checkbox (highlight multiple times)(if False) the user has to manually go and click on the item to highlight it (False,, should be default checked), Yes
-> in the case of only one view opening the filter should behave as it is working now. Yes

Currently the Or option with first window may become confusing. In many cases it would mean to click on an other too, but the first is visible already. That would need extra communication.

Thx

(Meaning of Moin, https://moinmo.in/MoinMoinEtymology, it is a timeless greetings, didn't know timezones ;) )

@sratslla
Copy link
Contributor Author

Great! Will get back to you by tomorrow.
I am from India about 4:30 hrs ahead of you (2:25 am here).

@ReimarBauer
Copy link
Member

Great! Will get back to you by tomorrow. I am from India about 4:30 hrs ahead of you (2:25 am here).

Good night :)

@ReimarBauer
Copy link
Member

For changing the ui_shortcut.ui please use the designer command and convert is to a py script by pyuic5. Both are in the environment installed.

@sratslla
Copy link
Contributor Author

I am looking into why the tests failed.

@sratslla
Copy link
Contributor Author

Hi
I looked into why the test develop was failing, so now when we change the state of the new checkbox we want it to trigger the filter_shortcuts but the state change function[self.cbHighlight.stateChanged.connect(self.filter_shortcuts)](Line 163) can not pass the text parameter to the filter_shortcuts method. So I edited the method to assign the value of text inside the method itself to integrate the new Checkbox feature.

Why the test is failing:-
image
when we run Line 103 the filter_shortcuts method is called and the text is assigned "Nothing", but inside the method, the text variable is reassigned [text = self.leShortcutFilter.text()](Line 302). as a result the treeWidget is not empty and the assert at Line 104 failed.

Fixes
-> We can change the way we are calling the filter_shortcuts method in the test_msui.py file

@sratslla
Copy link
Contributor Author

I will make a commit for the same

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

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

one last change, descriptive default, for avoiding a doc string

@ReimarBauer
Copy link
Member

Hi I looked into why the test develop was failing, so now when we change the state of the new checkbox we want it to trigger the filter_shortcuts but the state change function[self.cbHighlight.stateChanged.connect(self.filter_shortcuts)](Line 163) can not pass the text parameter to the filter_shortcuts method. So I edited the method to assign the value of text inside the method itself to integrate the new Checkbox feature.

Why the test is failing:- image when we run Line 103 the filter_shortcuts method is called and the text is assigned "Nothing", but inside the method, the text variable is reassigned [text = self.leShortcutFilter.text()](Line 302). as a result the treeWidget is not empty and the assert at Line 104 failed.

Fixes -> We can change the way we are calling the filter_shortcuts method in the test_msui.py file

great analyses and good solution :)

@ReimarBauer
Copy link
Member

ReimarBauer commented Mar 14, 2023

This functionality is now much better than before. One last cosmetic change please. It is more about what gets into our mind when we in a year or later read again the lines.

@sratslla
Copy link
Contributor Author

Sure! will do that.

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

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

Thx

@ReimarBauer ReimarBauer merged commit 31d5e31 into Open-MSS:develop Mar 14, 2023
@sratslla sratslla deleted the i1521 branch March 14, 2023 14:45
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.

show results on the ctrl+f highlighter without clicking
2 participants