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

Add Find / Find Next support to the Public Talks database #118

Open
ajtruckle opened this issue Dec 29, 2024 · 7 comments
Open

Add Find / Find Next support to the Public Talks database #118

ajtruckle opened this issue Dec 29, 2024 · 7 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@ajtruckle
Copy link
Owner

Is your feature request related to a problem? Please describe.
The Public Talks maintenance page in PTS includes a Find / Find Next feature (refer to the screenshot in the Additional Content section below).

In PTS, the search functionality is restricted to:

  • Date
    • Last Heard
    • Outline Date
  • Text
    • Theme
    • Notes

It would be beneficial to incorporate a Find / Find Next feature into the Public Talk Manager in MSA.

image

Describe the solution you'd like
MSA would have a broader search scope:

  • Date
    • Exclude From
    • Last Heard
    • Outline Date
  • Text
    • Theme
    • Notes
  • Number
    • Theme number
    • Count

This feature could be expanded to include additional fields from the history, such as:

  • Date (the talk was given)
  • Name (of the speaker who gave talk)
  • Name (of the congregation the speaker was from)

Additional context
Here is where Find / Find Next is located on the Public Talks maintenance page in PTS:
image

@ajtruckle ajtruckle added the enhancement New feature or request label Dec 29, 2024
@ajtruckle
Copy link
Owner Author

Relates to #102

@ajtruckle ajtruckle self-assigned this Jan 6, 2025
@ajtruckle ajtruckle added this to the 25.3.0 milestone Jan 6, 2025
@ajtruckle
Copy link
Owner Author

I have made a start on this and added support for:

  • Find by number
  • Find by text

@ajtruckle
Copy link
Owner Author

ajtruckle commented Jan 6, 2025

I have now added support for:

  • Find by date

But, there are some scenarios to keep in mind:

  1. Outline dates are formatted as"1/Month/Year" (since we don't use the day component)
  2. An outline that has not been heard will have date January 1, 1900. It is necessary to add a small amount of code to cater for that.

@ajtruckle
Copy link
Owner Author

An outline that has not been heard will have date January 1, 1900. It is necessary to add a small amount of code to cater for that.

The above issue has been addressed.

@cengizu
Copy link

cengizu commented Jan 8, 2025

@ajtruckle

Find Next/Previous This can be a nice addition. There's sufficient space to add two more buttons below others. However, it needs to stay on top of other windows to make it an efficient tool.

Areas for improvement:

  • When CTRL+F shortkey is used, it does not open Find dialog but changes the talk category only.
  • Find Next entry in the menu can be removed completely. As it will be available as a button anyway, it can be removed safely.
    -image
  • The search feature crashes the whole application. Here is at least one case:
  1. Open PT database window
  2. Use shortcut key combination: CTRL+F. This changes Talk category Faith/Spirituality.
  3. Now, click menu Search > Find ...
  4. Type any text and click find button.

@ajtruckle
Copy link
Owner Author

@cengizu
Thanks for doing some beta testing for me.

Find Next/Previous This can be a nice addition. There's sufficient space to add two more buttons below others. However, it needs to stay on top of other windows to make it an efficient tool.

Sure, but that introduces some new concepts:

  1. The Find dialog needs to be modeless, so that it can stay on top.
  2. The Find Previous logic needs to be implemented.
  3. Similar changes need to be applied to the Congregation search feature (which is more complex due to two tiers of searching - congregation / speaker).

I might implement it at some point. We'll see!

When CTRL+F hotkey is used, it does not open Find dialog but changes the talk category only.

Well spotted. I forgot to add CTRL + F to the accelerator table. Now it should function as expected.

Find Next entry in the menu can be removed completely.

I'll remove the menu button if / when I implement the extra buttons on the Find window.

The search feature crashes the whole application.

I am not getting any crashes, but it might be because I added the accelerator hotkey. I am sending you a beta and would like you to try it.

@ajtruckle
Copy link
Owner Author

@cengizu

The Find Previous logic needs to be implemented.

I asked ChatGPT what code changes would be needed to support bidirectional searching. It should be doable, if the proposed adjustments are sound! 😊 We won't know unless we try. But bidirectional searching in the congregation database will be harder.

Also, another thing we must keep in mind is that we must move the Find window to ensure the focused control is visible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants