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

RuleEditWindow: re-arrange tests/actions #11

Open
humdingerb opened this issue May 18, 2016 · 12 comments
Open

RuleEditWindow: re-arrange tests/actions #11

humdingerb opened this issue May 18, 2016 · 12 comments

Comments

@humdingerb
Copy link
Member

It'd be nice to be able to re-arrange test views and action views via drag&drop. Currently you'll have to remove all the tests/actions one by one from the bottom up, and recreate them in the new order...

@owenca
Copy link
Contributor

owenca commented Apr 15, 2017

I don't quite understand this. Could you please explain further?

@humdingerb
Copy link
Member Author

(What's below applies equally to the 'test sections' ("When").

With the "Add" button, you can add actions in the "Do" section of the rule window. After you've added a few, you can't remove e.g. the second action after you added a third. The "Remove" button always deletes the last added action.
Also, you cannot change their order. Though that's maybe not as important, I dunno...

I suppose "+" and "-" buttons to the right of the text field of an action instead of the "Add/Remove" buttons could work. Then you can exactly say which action to remove or where to add a new one (below the one you clicked the "+").
That way, re-arranging also becomes tolerable, by "+" a new action where you need it and copy&pasting and then removing the action you like to move.

@owenca
Copy link
Contributor

owenca commented Apr 16, 2017

We can remove (and add after) the row in which the text field has the keyboard focus. That way, we wouldn't have to add the "+" and "-" button. What do you think?

@humdingerb
Copy link
Member Author

I'd prefer the +/- buttons because it's so much more obvious.
The +/- widget that's used in the Screen preferences would do nicely. If the rest of the buttons ("Type", "is" etc.) were BPopUpMenus instead of those misused BButtons, we could have a slick GUI. :)

@owenca
Copy link
Contributor

owenca commented May 27, 2017

I am thinking about redesigning this window and make it a BColumnListView if the class can be extended to support additional ColumnTypes. If feasible, a +/- button for every row would look repetitive? Wouldn't it better to have one +/- button below the view?

@humdingerb
Copy link
Member Author

I'm not sure you can put popup menus into a "cell" of a BColumnListView. And I don't know if a BColumnListView is really suited for this. Mabe if you could create a crude mockup...
I was imagining something more like the "Find.." by attibute panel, only with those +/- buttons at each row instead of the remove/add buttons below. The Find... panel too, suffers from the you-can-only-add/remove-from-the-bottom-of-the-list...

@owenca
Copy link
Contributor

owenca commented May 29, 2017

Never mind. I thought it would be easy to add new column types to ColumnTypes.cpp.

I was thinking about making the Test view (the When box) a list view with one test per row. Then the user would be able to navigate to any row using the up/down arrow keys. The current row would be highlighted, so one pair of add/remove buttons below the list view would work. (Add would mean insert before the current row.) Same with the Do box.

@owenca
Copy link
Contributor

owenca commented Jun 20, 2017

A BListView-like approach:
highlight
The highlighted row can change with a mouse click or the up/down keys, and a vertical bar can be added to scroll the rows.

I guess it would be tedious, if not terribly difficult, to implement this comparing to using a +/- button for each row.

@humdingerb
Copy link
Member Author

I still prefer the +/- buttons for every row. Even if you put a "knobbly" widget like the Deskbar tray has to move the Deskbar to different locations, it's not obvious that you can re-order rows and how.
It's also better suited for keyboard navigation.

@owenca
Copy link
Contributor

owenca commented Aug 9, 2017

This issue can be closed as it's fixed by @humdingerb with 33c22ea.

@humdingerb
Copy link
Member Author

Not really. This tickets is about re-arranging the test/actions in the "Edit rule" window.
Frankly, I think it's too much hassle to implement. And now that we can add/remove specific rows of tests/actions with the +/- buttons, I don't see such a pressing need for it...

@owenca
Copy link
Contributor

owenca commented Aug 9, 2017

Oops! I got the two mixed up.

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

No branches or pull requests

2 participants