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

RFC: decompose toggled/selected actions #471

Open
frasertweedale opened this issue Jul 28, 2022 · 1 comment
Open

RFC: decompose toggled/selected actions #471

frasertweedale opened this issue Jul 28, 2022 · 1 comment
Labels

Comments

@frasertweedale
Copy link
Member

Within the UI code, we have toggledOrSelectedItemHelper for several actions,
including:

  • updateReadState
  • completeMailTags
  • setTags

The helper has the following behaviour:

  • If there are any items "toggled" on, then the action is applied to the toggled items (bool set to true in the action item)
  • Otherwise, the action is applied to the selected item (whatever item the Brick list cursor is on)

I propose that we "decompose" this action into separate actions/keybindings for "apply to toggled items"
and "apply to current item". This decomposition would then enable a clean-up of the HasList and HasToggleableList
classes and instances, providing for more ergonomic access and safer handling of items in toggleable lists.
For example, we can avoid exposing the "toggled" state in traversals that targets toggled items.

It may also make some things in the UI less ambiguous as to what items a given operation shall be applied to.

Seeking your feedback @romanofski on this idea.

@romanofski
Copy link
Member

Sounds good. The current state is a "make-it-work" implementation anyways. I guess it would also be useful due to the changes in Brick in the background?

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

No branches or pull requests

2 participants