-
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 warning when all sources are selected for deletion #2300
Conversation
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.
- start client pointed at a dev instance with ~100 sources
Works fine with NUM_SOURCES=10 make dev
, for what it's worth....
- verify that a single source can be deleted from the button or menu item with the usual text in the dialog
- select all sources and attempt to delete. verify that a "Notice:..." text has been added, that the continue button starts "Yes, delete all..."
- add more sources and verify that random counts of sources less than the sum total can be deleted with expected message text.
There is the expected race between the list and the dialog after a sync:
- Select all sources.
- Click Delete Sources.
- The "all sources" notice is displayed.
- Add a source and wait for sync.
- The "all source" notice is still displayed, but no longer accurate.
Should we care? I don't think so. It's an edge case (a new source comes in while the dialog is open) on top of an edge case (all sources selected), but I don't think it's a pathological corner case. The spirit of the dialog (protecting against accidental overdeletion) still holds even if the letter ("all sources") does not.
e46decd
to
a6238ba
Compare
Agreed, KISS applies here methinks. |
882e888
to
62a7d9c
Compare
62a7d9c
to
844d801
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.
The test plan still checks out per #2300 (review), and my inline comments are non-blocking. Thanks, @zenmonkeykstop.
super().__init__(show_header=False, dangerous=True) | ||
self.sources = sources | ||
self.source_total = source_total | ||
self.continue_text = "CONTINUE" |
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.
Ah! good catch.
Status
Ready for review
Description
Fixes #2298.
Test Plan