edrlab / thorium-reader

A cross platform desktop reading app, based on the Readium Desktop toolkit
https://www.edrlab.org/software/thorium-reader/
BSD 3-Clause "New" or "Revised" License
1.64k stars 145 forks source link

OPDS publication feed sometimes several EPUB download links, must discriminate with label or other info? #1952

Open danielweck opened 1 year ago

danielweck commented 1 year ago

https://m.gutenberg.org/ebooks.opds/

Screenshot 2023-07-07 at 06 59 00 Screenshot 2023-07-07 at 06 58 49
panaC commented 1 month ago

https://streamer.edrlab.org/opds-v1-v2-convert/https%3A%2F%2Fm.gutenberg.org%2Febooks%2F73614.opds

            "links": [
                {
                    "type": "application/epub+zip",
                    "title": "EPUB3 (E-readers incl. Send-to-Kindle)",
                    "rel": "http://opds-spec.org/acquisition",
                    "href": "https://www.gutenberg.org/ebooks/73614.epub3.images"
                },
                {
                    "type": "application/epub+zip",
                    "title": "EPUB (older E-readers)",
                    "rel": "http://opds-spec.org/acquisition",
                    "href": "https://www.gutenberg.org/ebooks/73614.epub.images"
                },
                {
                    "type": "application/x-mobipocket-ebook",
                    "title": "Kindle",
                    "rel": "http://opds-spec.org/acquisition",
                    "href": "https://www.gutenberg.org/ebooks/73614.kf8.images"
                },
                {
                    "type": "application/x-mobipocket-ebook",
                    "title": "older Kindles",
                    "rel": "http://opds-spec.org/acquisition",
                    "href": "https://www.gutenberg.org/ebooks/73614.kindle.images"
                },
                {
                    "type": "application/atom+xml;profile=opds-catalog",
                    "title": "Readers also downloaded…",
                    "rel": "related",
                    "href": "/ebooks/73614/also/.opds",
                    "__href__": "https://streamer.edrlab.org/opds-v1-v2-convert/https%3A%2F%2Fm.gutenberg.org%2Febooks%2F73614%2Falso%2F.opds"
                },
                {
                    "type": "application/atom+xml;profile=opds-catalog",
                    "title": "By Baring-Gould, S. (Sabine)…",
                    "rel": "related",
                    "href": "/ebooks/author/1766.opds",
                    "__href__": "https://streamer.edrlab.org/opds-v1-v2-convert/https%3A%2F%2Fm.gutenberg.org%2Febooks%2Fauthor%2F1766.opds"
                }
            ],

we should print the title from link as download indication.

cf codebase :

https://github.com/edrlab/thorium-reader/blob/82ce80e845c02ac903b93cb00eca870d89d986f4/src/renderer/library/components/dialog/publicationInfos/opdsControls/OpdsControls.tsx#L102

panaC commented 1 month ago

image

danielweck commented 1 month ago

Sorry but I believe the hover tooltip is not a good UX design pattern, just a hacky workaround that is poorly discoverable, forcing the user to explore the buttons with a pointing device (doesn't even work for keyboard users who are not screen reader users). @Hoppipollala how could we show the additional title information which could be of arbitrary length? (haven't we already solved a similar problem elsewhere...I can't remember)