Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

SendLinkpage: Use plattform-style gestures instad of button #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Thaodan
Copy link
Contributor

@Thaodan Thaodan commented Jul 17, 2020

Use a Dialog and DialogHeader instead of a button to make the creation
of posts easier and more native.
Fixes a common pitfall as described in the sailfishos documentation:
https://sailfishos.org/develop/docs/silica/sailfish-application-pitfalls.html/#Using%20buttons%20instead%20of%20platform-style%20gestures

Use a Dialog and DialogHeader instead of a button to make the creation
of posts easier and more native.
Fixes a common pitfall as described in the sailfishos documentation:
https://sailfishos.org/develop/docs/silica/sailfish-application-pitfalls.html/#Using%20buttons%20instead%20of%20platform-style%20gestures
@accumulator
Copy link
Owner

It was this way a long time ago, but changed to buttons to better handle the error cases (rate limit, connection issues).
With this change, you lose your text when an error occurs.

@Thaodan
Copy link
Contributor Author

Thaodan commented Jul 17, 2020

Hm maybe a pulley menu then? Piepmatz uses a pulley menu and avoids this issue. Can't you go back a page once the error occurs?

@accumulator
Copy link
Owner

I don't think a pulley menu is any better than a normal button.

You can reopen the page when an error occurs, but you need to keep the text outside of the SendLinkPage, as it gets destroyed as that page is removed from the pagestack, and reopen that page from wherever the user is at that moment, which can be anywhere in the app.. As you can see this is a can of worms, and not an easy fix.

@Thaodan
Copy link
Contributor Author

Thaodan commented Jul 17, 2020

Hm a pulley-menu at least can depend on the condition to push the pagestack only when the api call was successful.

@HenkKalkwater
Copy link
Contributor

HenkKalkwater commented May 25, 2021

I have the same situation in my Sailfin application, where I needed to implement a login flow. What I do is when the user submits their login details, I push a new page to the stack with just a loading indicator instead of popping the current page. When the link is successfully submitted, I pop the two pages of the stack, but if an error occurs, I only pop the page with the spinner icon.

See https://github.com/HenkKalkwater/harbour-sailfin/blob/17d4b2c24bc7b8b9977e0743f0edf9d7dc4a6f01/sailfish/qml/pages/setup/LoginDialog.qml#L30

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants