buda-base / public-digital-library

http://library.bdrc.io
5 stars 6 forks source link

new etext viewer #859

Open eroux opened 7 months ago

eroux commented 7 months ago

let's make an etext viewer that is an overlay on the website, just like the image viewer. I believe we have everything we need in terms of queries but I'm not sure. In terms of design we can just reuse the image viewer / DLD design

berger-n commented 7 months ago

some progress:


needs more polishing (button to toggle the outline, fix close button in top bar, handle links from search results like this, and more to come)

eroux commented 7 months ago

wow this is really a great start!! thanks a lot!

berger-n commented 7 months ago

not far from finished here: some etext search results

simplescreenrecorder-2024-04-04_18 51 08 mkv

do you see anything else @roopeux @eroux ?

eroux commented 7 months ago

wow you did a great job, thank you so much!

I don't see anything else beyond your list, one important aspect will be downloading easily (it's a very common use case), let's make sure it's possible from the outline (as it was before).

There are a few other improvements for the etext viewer but they're not related to this issue, I'll open one or two more but they're comparatively much smaller.

berger-n commented 7 months ago

all done: link to etext from search results

a few more glitches and we're good here

berger-n commented 7 months ago

all fixed, ready to move on (to #864) [real-time edit: found one more bug, see at the bottom...]:


image

eroux commented 7 months ago

This is really great!! Yes these etexts (from Namsel, almost 10 years ago) have a lot of bugs, they should be withdrawn but I'm just waiting for the Google Books update

berger-n commented 7 months ago

(just found out that my ad blocker chrome extension prevented the etexts to be downloaded, maybe we should warn the user about that somehow?)

eroux commented 7 months ago

oh really?? weird... what extension is it? Do you understand why it blocks it?

berger-n commented 7 months ago

the extension is https://chromewebstore.google.com/detail/adblocker-stands/lgblnfidahcdcjddiepkckcfdhpknnjh?pli=1 actually it makes sense because we are programmatically triggering a click on a download link (last line):

https://github.com/buda-base/public-digital-library/blob/eb2fb94584fff5cc67384b2f7946af5016208875/src/components/App.js#L940-L958

eroux commented 7 months ago

oh I see! is there a way to avoid that? we can ask the user to click again or something perhaps?

berger-n commented 7 months ago

https://github.com/buda-base/public-digital-library/commit/3b6c09e6191fa7372d6765c9dfcae225ea8825ef adds a popup only visible when the click/download is not automatically triggered:

simplescreenrecorder-2024-04-11_14 13 11 mkv


now my problem actually was that the css of the ad blocker is not "compatible" with ours (it was hidden behind our topbar!) here's what happens now, more self-explanatory:

image


should I always enable the "Save downloaded file" popup? or assume that ad blocker developers use the highest possible z-index so that their own confirmation popup is on top of anything else on the screen :sweat_smile:

berger-n commented 7 months ago

(I mean, the ad blocker disables even the "Save downloaded file" popup if I attempt to trigger the click on the download link, so it's either all or nothing)