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

Remember current tab from previous user session

Open ShaopengLin opened this issue 11 months ago • 4 comments

#1048 introduced the feature to reopen tabs on start-up. However, on many browsers (Firefox, Chrome), the current tab is also being kept track of when restoring user sessions. It would be good UX to have this feature.

One thing to discuss is: that we are not currently reopening invalid Zim tabs, empty tabs, settings tabs, etc. Users could be on one of those tabs from the previous session, including the library tab. How should we define the behavior of our tab reopenings?

ShaopengLin avatar Mar 30 '24 20:03 ShaopengLin

One thing to discuss is: that we are not currently reopening invalid Zim tabs, empty tabs, settings tabs, etc. Users could be on one of those tabs from the previous session, including the library tab. How should we define the behavior of our tab reopenings?

Remembering these tabs is probably the right thing to do AFAP.

kelson42 avatar Apr 01 '24 09:04 kelson42

@kelson42 If we were to re-open all tabs(including invalid ones), should we have a designated, "404 not found" page? Or should we just leave it blank? Also tagging @mgautierfr since he also mentioned about this behavior back in the original issue.

ShaopengLin avatar Apr 05 '24 00:04 ShaopengLin

@kelson42 If we were to re-open all tabs(including invalid ones), should we have a designated, "404 not found" page? Or should we just leave it blank? Also tagging @mgautierfr since he also mentioned about this behavior back in the original issue.

@ShaopengLin 404 is an HTTP specific error code, which makes not much sense in our local context. But "yes" a proper error message would be better than a blank page obviously. Probably this should be done in a dedicated PR.

kelson42 avatar Apr 08 '24 19:04 kelson42

If I get it correctly, we can simply open them as blank pages at the moment. We can achieve the functionality first and then open another issue for creating dedicated error message tabs.

ShaopengLin avatar Apr 08 '24 20:04 ShaopengLin

If I get it correctly, we can simply open them as blank pages at the moment. We can achieve the functionality first and then open another issue for creating dedicated error message tabs.

I confirm. You can go ahead with the implementation.

kelson42 avatar May 30 '24 04:05 kelson42