starfish-app / Starfish

A Gemini browser for elementary OS.
gemini://josipantolis.from.hr/starfish/
GNU General Public License v3.0
25 stars 2 forks source link

Add two finger swipe gestures for navigation #26

Open Suzie97 opened 2 years ago

Suzie97 commented 2 years ago

Proposal

Swiping using two fingers to move back and forward would be a very nice feature to have. We should aim to make it 1:1, or else it wouldn't make much sense to adopt it.

Prior Art

Example

https://user-images.githubusercontent.com/68198116/150687900-955dd2ca-d69d-46a1-94e5-ddeabeb2e2a7.mov

Antolius commented 2 years ago

I love this suggestion and am definitely interested in doing this! In addition to improving the usage on devices with trackpad it would require some refactoring that would improve experience for all users.

Currently Gemini pages are fetched anwe whenever user navigates back/forward. In order to make gesture based navigation seamless this would have to change. A cached version of the page would need to be kept. This would make navigation snappier regardless of the way user invokes it. Plus, it would be easy to retain the scroll position when navigating back/forward, which is another nice improvement.

I'm reluctant to start work on this right away though, because of 2 reasons:

  1. If I were to implement it today I'd use libhandy to handle gestures. With migration to GTK 4 and libadwaita from elementary OS side already in progress and expected to land in q2 2022 I'd rather wait for that. Adding more libhandy code today will complicate the migration in a couple of months.
  2. I think some of the issues around adress bar (missing Gemini search + history based suggestions) and accessibility (keyboard navigation + support for screen readers) might bring more value. So I'm more inclined to work on them first.