IceCubesApp icon indicating copy to clipboard operation
IceCubesApp copied to clipboard

swipe actions improvements

Open sothawo opened this issue 2 years ago • 7 comments

ok, changes for swipe actions:

settings

I added a new settings for Swipe actions and in there a section for swipe actions on posts (I can think of more places where it might be handy to configure swipes)

Screenshot 2023-02-11 at 13 41 31 Screenshot 2023-02-11 at 13 43 10

I'm not quite content with the wording for the 4 swipe entries (swipe left outer, swipe left inner) but have no better idea currently. It would be nice as well to have the icons in the picker entries, probably need to add them with the Text in some view.

I have defined an enum for these values that can provide the symbol names and display label keys, perhaps it might make sense to use this at other places as well so we would have the labels and icon names in one place to maintain; but that should be a different PR then.

I store this 4 values in the user preferences, would it be better to put them in a struct and serialize/deserialize that when the preferences are written?

display

For the outer one I used the tintColor, the inner one is gray. Alas it seems not to be possible to have the icons in a not-filled style, I would have liked to show the state of bookmarked faved etc in there. And I did not find a way to change the color of the icon/text in the swipes to something different than white.

The text is in the swipes for me during development, should I take it out or can we leave it in there?

left side

Screenshot 2023-02-11 at 13 44 09

right side

Screenshot 2023-02-11 at 13 44 19

Localizations for all languages besides en have not yet been added, waiting until all necessary changes are done

sothawo avatar Feb 11 '23 12:02 sothawo

Just noticed: I should the current hard coded settings as default values

sothawo avatar Feb 11 '23 13:02 sothawo

Here are some examples of how others handle this kind of customisation. I am just posting these here for inspiration for the next iteration of the settings page.

Fastmail application

IMG_3326

ProtonMail

IMG_3325

TickTick

IMG_3323

EvilOne avatar Feb 11 '23 14:02 EvilOne

As for swipe xxx outer/inner, perhaps we can go for the text that the FastMail example uses?

EvilOne avatar Feb 11 '23 14:02 EvilOne

Another future feature is not allowing users to select the same swipe gesture multiple times. For instance, I can do this today:

CleanShot 2023-02-11 at 08 45 11@2x

Sorry about the rambling here.

EvilOne avatar Feb 11 '23 14:02 EvilOne

As for swipe xxx outer/inner, perhaps we can go for the text that the FastMail example uses?

Like this one the best from the examples; although it seems that the SwiftUI "short" action does not really trigger the action, it just shows the two entries.

sothawo avatar Feb 11 '23 16:02 sothawo

Could you please copy all the new Localizable.strings entries to the other languages? Otherwise, other languages get things like this.

CleanShot 2023-02-11 at 08 33 51@2x

I know, as I wrote, I wanted to wait until the PR is alright, converted to a draft PR until it's ready

sothawo avatar Feb 11 '23 16:02 sothawo

btw is there a way to have the "short" action, the "inner" one to be triggered by just swiping out the short way?

sothawo avatar Feb 11 '23 17:02 sothawo

I don't think so. Love this ^

Dimillian avatar Feb 11 '23 19:02 Dimillian

btw is there a way to have the "short" action, the "inner" one to be triggered by just swiping out the short way?

I don't think it is possible using the stock controls.

seanlifetime avatar Feb 11 '23 19:02 seanlifetime

Apple doesn't mention it anywhere on their page:

https://developer.apple.com/documentation/swiftui/view/swipeactions(edge:allowsfullswipe:content:)

seanlifetime avatar Feb 11 '23 19:02 seanlifetime

I reworked the setting and now have this solution:

image

Seems to be more understandable

sothawo avatar Feb 11 '23 20:02 sothawo

This is really good! Making a few fixes and merging!

Dimillian avatar Feb 11 '23 20:02 Dimillian

Like the screen! Nice job!

EvilOne avatar Feb 11 '23 22:02 EvilOne

thanks!

sothawo avatar Feb 11 '23 22:02 sothawo