kiwix-js icon indicating copy to clipboard operation
kiwix-js copied to clipboard

The window title should be set to the article title (coming from the iframe)

Open sharun-s opened this issue 8 years ago • 9 comments

This way setting bookmarks and finding the the right tab when multiple tabs are open gets more user friendly. Right now it is just set to Kiwix.

sharun-s avatar Jul 09 '17 19:07 sharun-s

I suppose you're talking about the title tag of the whole window/tab, because the title tag of the iframe is already set (by the content itself), and mostly unused. It's probably easy to read it from the iframe and set it to the window.

Regarding handling bookmarks, it would also require to read and handle this URL parameter, to read and display the corresponding content. But we once again face the issue of ZIM file selection, that must be done by the user before anything else.

mossroy avatar Jul 10 '17 11:07 mossroy

Yup should be a easy fix. Maybe the kiwi favicon can be added too. I just logged it to not forget. I have a couple bookmarks setup in the bookmark bar using the #275 url technique. Using it mostly for testing.

sharun-s avatar Jul 10 '17 14:07 sharun-s

We need to do that in a generic way, that would be compatible with any content injection mode (jQuery, ServiceWorker, etc). Maybe something like https://stackoverflow.com/questions/2429045/iframe-src-change-event-detection#answer-24726977 would work : observing the title tag of the iframe content, and change the window title when it is modified

mossroy avatar Jan 14 '18 11:01 mossroy

I would like to work on this issue

vasusharma7 avatar Mar 03 '20 03:03 vasusharma7

I think we need to give a bit of thought to what the effect of this in app context would be. In browser context, it might make sense, but are we sure it's what is required in app context, including extensions? Apps are often separate processes that run in a framework, with the title set by an app manifest, and the app's window title and icon should be stable. If, when running in browser context, we think of Kiwix still as an app, then we probably shouldn't mess with the window title. It would be good to clarify our aims when running Kiwix in browser context.

Jaifroid avatar Mar 03 '20 09:03 Jaifroid

Yes, it won't be good to set the title in app manifest..that won't look good I guess but on browser it will provide readability and more convenience when more than two tabs are opened. Just an example - Google Colab also provides with same feature - the tab name is updated with the notebook name on which the user is working which is really helpful at times.

vasusharma7 avatar Mar 05 '20 02:03 vasusharma7

@Jaifroid : maybe we could let @vasusharma7 implement it, if it's not long/complicated. It would let us all see what the implications would be in all contexts.

mossroy avatar Mar 07 '20 10:03 mossroy

Yes, of course!

Jaifroid avatar Mar 07 '20 10:03 Jaifroid

Thanks for guiding.I will implement the changes and let you know soon.

vasusharma7 avatar Mar 08 '20 18:03 vasusharma7