Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deletable listboxrow? #375

Open
cassidyjames opened this issue Mar 13, 2020 · 2 comments
Open

Deletable listboxrow? #375

cassidyjames opened this issue Mar 13, 2020 · 2 comments
Labels
Needs Design Waiting for input from the UX team Priority: Wishlist Not a bug; but a new feature or enhancement

Comments

@cassidyjames
Copy link
Contributor

cassidyjames commented Mar 13, 2020

A pattern we're using in three places now is a listbox with deletable items, including the little spin-out delete button. It would need to be the listbox as well as the row. The CSS is also currently duplicated, and could either be pulled into Granite (for this widget) or just into the stylesheet.

@cassidyjames cassidyjames added Priority: Wishlist Not a bug; but a new feature or enhancement Needs Design Waiting for input from the UX team labels Mar 13, 2020
@danirabbit
Copy link
Member

danirabbit commented Dec 13, 2024

I think we want something more generic than just deletable. Looking at Mail for example I think we want like an ActionableRow

probably want it to be a Gtk.ListBoxRow subclass so it’s transparent to use with ListBox normally

I should be able to add an action with something like:
add_action (string label, string detailed_action_name, GLib.Icon icon, Color color, Gtk.Align? alignment = null)

All actions should be added to a popover that activates with both right click and long press. Actions with an icon can be added to the popover as little circle buttons maybe? Actions with an align should be added as swipe actions.

edit: actually thinking about it more it should just take a menu model for non-icon, non-swipe actions. There might be stuff with submenus etc

There should be maybe some elegant way to handle stateful actions like read/unread or star/unstar for example

if would be nice if the row had a built in delete animation that signaled when it was done so its object can be removed from the model once the animation finishes

edit: maybe another param for the action like bool remove that means we animate out the row and then fire the action after the animation is done

@danirabbit
Copy link
Member

On iOS for example you can have like a shitload of actions per row. A short swipe reveals all the actions and the row snaps in place to reveal them all. A long swipe activates the outermost action

IMG_6621

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Design Waiting for input from the UX team Priority: Wishlist Not a bug; but a new feature or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants