-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add batch actions top bar element #2233
Conversation
0236763
to
f9640a6
Compare
f9640a6
to
b83c526
Compare
b83c526
to
298eb13
Compare
Rebased from |
1b0942d
to
2ad8e91
Compare
MainView layout to QVBoxLayout and add inner horizontal container to accommodate inner top bar. Update strings
2ad8e91
to
c8aecc3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial review. Since this adds a nonfunctional widget—the Delete Sources
button is not wired up to anything—I'll review for real along with #2252 once that's ready.
def delete_multiple_sources(self) -> None: | ||
""" | ||
Requires logged-in session. Delete currently-selected sources. | ||
""" | ||
logger.debug("delete_multiple_sources triggered") | ||
if self.controller.api is None: | ||
self.controller.on_action_requiring_login() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can eliminate the conditional with:
def delete_multiple_sources(self) -> None: | |
""" | |
Requires logged-in session. Delete currently-selected sources. | |
""" | |
logger.debug("delete_multiple_sources triggered") | |
if self.controller.api is None: | |
self.controller.on_action_requiring_login() | |
@login_required # from securedrop_client.logic import login_required | |
def delete_multiple_sources(self) -> None: | |
""" | |
Delete currently-selected sources. | |
""" | |
logger.debug("delete_multiple_sources triggered") |
A toolbar that contains batch actions (actions that target multiple | ||
sources in the ConversationView, and therefore don't belong in the | ||
individual conversation menu). Currently, this widget will hold the | ||
"Delete Sources" (batch-delete) action. | ||
|
||
For user-facing naming consistency, these items won't be called | ||
"batch/bulk <delete>", but simply "<verb> <noun>s" (eg "Delete Sources"), where | ||
the original nomenclature comes from the individual Source overflow QAction menu | ||
items. Each item may have a tooltip, visible on hover, that provides a more | ||
lengthy explanation (e.g., "Delete multiple source accounts"). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the local style guide for "here's how to use this section of the UI". I'll note for the record that I continue to think that "batch" is an implementation detail of what is really just a "bulk" operation or an operation over multiple objects—not all of which will batch the individual operations or requests. I'm fine with whatever terminology we adopt as long as we don't wind up confused by it.
yeah I agree - might as well close it and merge them together. I was initially trying to split up the work into readily reviewable chunks so that people could tag team as needed, but might as well just do all in #2252. |
Closing in favour of #2252 |
Status
Ready for review but presumes #2230 which should be reviewed first, will rebase once that's merged
Description
Add Top Bar UI element nested inside main layout, which will hold "Delete Sources" toolbar button (and eventually, other toolbar buttons). UI-only changes towards, #2160
Test Plan
Checklist
If these changes modify code paths involving cryptography, the opening of files in VMs or network (via the RPC service) traffic, Qubes testing in the staging environment is required. For fine tuning of the graphical user interface, testing in any environment in Qubes is required. Please check as applicable:
If these changes add or remove files other than client code, the AppArmor profile may need to be updated. Please check as applicable:
If these changes modify the database schema, you should include a database migration. Please check as applicable:
main
and confirmed that the migration is self-contained and applies cleanlymain
and would like the reviewer to do so