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

[Bug] Search Result Chapter Title #444

Closed
vedat73 opened this issue May 29, 2024 · 6 comments · Fixed by #446
Closed

[Bug] Search Result Chapter Title #444

vedat73 opened this issue May 29, 2024 · 6 comments · Fixed by #446
Labels
bug Something isn't working

Comments

@vedat73
Copy link

vedat73 commented May 29, 2024

Describe the bug

Hello, I want to show chapter title of the search results when user perform a search operation on a book. So users can see which chapter the search result belongs to.
I thought that I can get it via LocatorCollection-> links[n] -> title but unfortunately it returns an empty array.

How to reproduce?

  1. Open demo app
  2. Open a book
  3. Open search view
  4. Type a word
  5. Review search result

Readium version

2.7.1

OS version

iOS 17.2

Testing device

iPhone 15 Pro

Environment

macOS: 14.4.1
platform: arm64
Xcode 15.2

Additional context

No response

@vedat73 vedat73 added bug Something isn't working triage Triage needed by maintainers labels May 29, 2024
@mickael-menu
Copy link
Member

It is supported but with a limited scope: chapter sections inside a resource are ignored. Could you share a publication that shows the problem?

@mickael-menu mickael-menu removed the triage Triage needed by maintainers label May 29, 2024
@vedat73
Copy link
Author

vedat73 commented Jun 4, 2024

Hi @mickael-menu , so sorry for late reply. You can download the book called "Law of Wills" from OPDS -> Open Textbooks Catalog. Actually in searching, the search result does not contain chapter info. So I can't see which chapter the search result belongs to.

@mickael-menu
Copy link
Member

Thank you for reporting the issue. There was indeed a bug lurking.

#446

@vedat73
Copy link
Author

vedat73 commented Jun 4, 2024

thanks @mickael-menu for this quick fix. Can you provide a small example that I can use to get chapter title out of search results. Also can I get the fixed version as uploading the readium package in my project?

@mickael-menu
Copy link
Member

I will publish today or tomorrow a new 2.7.2 version which will contain the fix.

You can create a new chapter section in your search result list every time you see a different title in locator.title of each search result. This is not implemented in the Test App.

@vedat73
Copy link
Author

vedat73 commented Jun 4, 2024

ok, will be waiting for that. Thanks...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants