accumulator / Quickddit

Reddit client for Jolla's SailfishOS, Ubuntu Touch and Nokia N9
GNU General Public License v3.0
53 stars 21 forks source link

Show confirmation dialog when opening subreddit from link #21

Closed nodevel closed 8 years ago

nodevel commented 8 years ago

The current design of Quickddit, where subreddits are always shown on the first page of the PageStack make sense, as it limits the memory usage. However, the behavior where upon clicking on a subreddit URL all pages get popped from the PageStack is quite annoying when you are reading a comment section and click on a link without clear distinction where it leads. Instead of a URL dialog being opened or a new post/user page, all progress is lost when the URL leads to a subreddit.

What about creating a new dialog which would ask the user if they really want to open the subreddit URL, notifying them that their reading progress in the current thread will be lost?

This would eliminate many annoying situations and lost progress.

PS: I can contribute this dialog myself in a few days, but some discussion is needed, so that's why I'm opening this issue.

accumulator commented 8 years ago

This is something that's been bugging me too from the start.

The confirmation dialog is a possibility. I think however that it's hard to get aesthetically right, because Accept is a swipe-left, ending up in a page that cannot be swiped-right.

I'm more leaning towards pushing subreddit pages onto the PageStack like all other content pages. This is quite some refactoring work though (the main/subredditpage is currently pretty much a singleton).

nodevel commented 8 years ago

I see - I thought there was some good reason for the current behavior (like memory constraints), but if there is none, I would be all for pushing subreddit pages onto the PageStack instead.

A dialog is not something I demand, it was just an idea for a compromise, but you do have a good point with the aesthetic inconsistency. In case you decide against pushing the subbreddit pages, or in the meanwhile, what about a RemorsePopup instead of the dialog? That would solve the inconsistency problem and it would be a textbook usage of the RemorsePopup as this is essentially what it was made for.

EDIT: Just to add - I really want to thank you for your work on Quickddit and also express full support of the direction where you are taking it. Such a conservative approach and programming with the aesthetics in mind is invaluable.

accumulator commented 8 years ago

I'm working in a branch on de-singleton-izing the subreddit page, and the nastiest issues have been refactored already. There's still references here and there to 'the' mainpage, but they are not very hard to refactor. So I probably will go immediately for the PageStack solution.

Memory use is something to keep an eye on, but I don't expect an increase under 'normal' use. The model data is not very different compared to other pages, and it's already possible to create a deep stack with a bit of clicking (link/comment - user - link/comment etc)

nodevel commented 8 years ago

That sounds great.

In such case, I suppose you plan on attaching the current attachedPage even to nested subreddit pages? I think it is necessary, as it would be cumbersome to go all the way back to the first page just to change subreddit. If this is the case, I would keep the PageStack 'replace' behavior for opening subreddits and multireddits from these attachedPages (where by replacing I mean replacing just the currently open subreddit, not the whole stack), so users can still keep the number of pages in the PageStack to minimum if they wish. Opening subreddit links from comments/posts would have the new 'push' behavior as we discussed above.

szopin commented 8 years ago

+1 for stacking, it's not that often happening, but navigating back to where one was can be kind of tricky (if not impossible if from downvoted thread)

accumulator commented 8 years ago

merged in be45e7c242cd70f0237da0fb99c6f440cb0bdc48