-
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 safe deletion parity with journalist interface #1263
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.
just a couple quick comments about the tear feature to get started:
- the tear should be moved to the top when a message is sent as a journalist from the client directly below the tear (the way it is when a message is sent from the journalist interface)
- the tear needs some padding between it and the top of the conversation view
- the tear styling, first it looks like:
then after a reply or message is sent, it looks like:
- the tear message should show up in the preview (copied from zeplin simulation linked to in "Safe Delete" parity with JI #1202)
|
Oh, I thought I provided an image, which would have helped clarify what I'm talking about. When all files and messages are deleted, the tear is centered as expected, but when you send a reply it shows up below the centered tear (until the next sync) as you see here: When the client is full-screen it's pushed further to the bottom and looks more unexpected.
Yes, any new messages are replies that are added to the conversation view should be aligned to the top immediately, even if there is a tear and it is a pending reply. |
At first, I couldn't repro my screenshot either, but now I have an STR:
So, for this change, I think you just need to make sure the tear remains centered and that font sizing is correct (see https://app.zeplin.io/project/5c807ea562f734bd2756b243/screen/6080e8b72293ab1e30f35d06: should look the same as the "Select a source from the list" font). Otherwise, you implemented this as designed as far as font and tear-styling goes. UpdateIt looks like this may be part of a larger, pre-existing issue. Another similar issue with centering the text in the conversation view (when the entire source isn't refreshed): #1233 |
@@ -970,6 +991,15 @@ def on_file_download_failure(self, exception: Exception) -> None: | |||
self.file_missing.emit(f.source.uuid, f.uuid, str(f)) | |||
self.gui.update_error_status(_("The file download failed. Please try again.")) | |||
|
|||
def on_delete_conversation_success(self, uuid: str) -> None: | |||
logger.info("Conversation %s successfully deleted at server", uuid) |
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.
here and in on_delete_source_success
is where you would trigger a sync, but you mentioned not wanting to do that yet. For clarification, do you plan to add this behavior in a follow-up PR?
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 was going to add that here after we'd otherwise verified the UX, but it could be done separately.
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.
Let's add this in a followup PR that anyone can review while I'm afk for break to prioritize getting all the UI changes in before I leave
Conversation deletion markers are now being updated when a reply is sent. |
I still can't trigger this. The deletion marker stays centered for me while I resize the window to its minimum dimensions, then back. Maybe it's because I'm using i3, but I am able to repro #1233, so whatever it is, I suspect I've introduced my own new bug here. [edit] No, it works properly under XFCE for me as well. |
Okay, could you try these steps:
|
Good news! This morning, everything was borked. When I started the client, it seemed to be honoring I was still seeing the marker positioned inconsistently, though, just not at the top of the space, and I think it was because the So if you could pull and try again, the positioning should be fixed, but I'm interested to see if you're still seeing the smaller text. Finally, are you testing on Qubes or Debian? I'm guessing Debian, from the window manager styling. I may have to set up there and check all this. |
To save time, you can just test XFCE (we have not been testing or working towards supporting i3, but if you feel we should add that to our list of environments to test against, let's discuss in the near future). Interesting that a reboot would fix it. I wonder just restarting the client will also sometimes fix this. I'll do more testing today...
Great!
Just gave it a spin and now I see the tear marker and text is center-aligned 🎉 The font size should be larger, but it sounds like you're facing an issue with the text not scaling correctly? Just so you know, the font size for "Files and messages deleted for this source" looks the same as it did before your most recent changes.
I've been testing in a prod-like environment: on Qubes on both a dev vm and the prod It looks like the only visual items left are:
Also, I have a slight preference for you to open a new PR when you introduce triggering syncs if that works for you. |
This is how it all looks for me right now. This is under XFCE, in
Am I missing something from the prototypes, or do these things look different to you? |
|
I've added padding to I don't think we should special-case the button positioning for the deletion dialogs to match the prototypes. If we want them centered as in the prototype, we should make the change consistently across export and print dialogs too. Similarly, the space between the dialog body and button bar is a stretch, used across all subclasses of |
Makes sense! Let's address this outside of this PR
You fixed this 🎉 but looks like the text should be wrapped as the prototype shows. Right now it looks like: |
Added a newline. |
Looks like adding a newline doesn't quite get us there. If you don't want to do this level of polishing work, please create followup issue(s) for the remainder of work, including what you've already called out (e.g. changing |
@rmol i think now we're getting to the nitty-gritty of the visual review, so it would be easier just to meet in person... switching to a DM to share a meeting invite Update: "doesn't quite get us there" basically means that it doesn't look just like the prototype, e.g. the padding is incorrect. maybe you just need one more newline or you could update the padding, but it feels inefficient for us to continue with making a one-line change, getting feedback on that one-line change, making another small change, getting more feedback... there are many things that stand out to me when comparing the prototype, so i'd like to point them out to you in person (meeting coming soon!). i find it helpful to have the prototype open while working on the UI to do a side by side comparison, and then the differences stand out quite a bit. we can discuss technique in person too. i think it's also fine to create followup issues. |
06458ba
to
fe91a5d
Compare
These are the notes from our design review today (@rmol @ninavizz @creviera @eloquence participated):
|
a3b2677
to
e06894d
Compare
This is ready for another look. I've addressed all the shortcomings from last week's review. |
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.
All review comments have been addressed, including the most recent requests for changes from the ux review around button alignment, primary default buttons, unindented bullets, and styling bullets to be small. This just needs CI passing. I'll leave code comments in the meantime, but as far as the UI is concerned I think it's where it needs to be.
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.
lgtm: all review comments have been addressed so this can be squashed and merged
ah, my bad, i only tested the happy path for export and print so it looked like this worked without the keyPressEvent handler, but it looks like tabbing to a non-default button and pressing Return or Enter no longer works. Going to disregard my review and debug further. |
need to do more testing around key presses for buttons
e682c72
to
52e4024
Compare
I pushed a fix proposal for this last issue that came up, which can be dismissed if you want to take a different approach. In any case, it would be great to |
Permit the deletion of a source's conversation items, without deleting their account.
Setting focus does the trick. I've rebased the earlier work down to one commit. This is ready for a final review. |
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.
lgtm!
after all the back and forth, the final review was a breeze; no more issues found other than an issue that i'm still work on an STR for (sometimes the preview snippet doesn't show the deletion animation, see "subcortical footbridge" preview snippet in the following image)
I'll create a follow up issue for this once i'm able to create a reliable STR
Description
Fixes #1202.
Permit the deletion of a source's conversation items, without deleting their account.
This does not yet trigger an accelerated sync, because it's useful to be able to start several concurrent deletions while evaluating the work so far, and the existing interval makes that easier.
Test Plan
securedrop-sdk
in your virtualenv if that PR has been merged, orpip install git+https://github.com/freedomofpress/securedrop-sdk@delete-conversation#egg=securedrop-sdk
to install from its branch.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 applies cleanlymain
and would like the reviewer to do so