-
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
[ui polish] Reply pane styling #580
[ui polish] Reply pane styling #580
Conversation
- 'send.png' (airplane) icon was swapped for an svg version from the mockup - plane was repositioned according to the mockup
6dd0244
to
62cff38
Compare
It was decided that this may go on another PR |
The client is crashing in offline mode. I'll check that later |
62cff38
to
4e33e39
Compare
this has now been fixed and some styling to the offline mode was added as well as a placeholder for online mode with the temporary text "Compose a reply to Bold Sourcename" Some discussion on the offline mode styling is still happening in #572 (comment) |
support for rich text is disabled for security purposes, which means we will have to find another way to have the source name in bold while at the same time preventing the user from inputing rich text
22c1691
to
a3c6870
Compare
I've hidden the vertical scrollbar in the reply box even when the box is bigger than its size. Before: After: |
|
Yes, thank you!! The little purple airplane should be a few pixels lower, though; it's lowest points should be flush with the baseline of the last line of text. Thank you, Deeplow! |
Like this? (the image below is the mockup) The only problem now is that it crops the last line in half. Also, @ninavizz I would also like some feedback on the airplane in offline mode. Quoting from the issue
|
I'll be trying to add the source name in the reply box |
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.
@deeplow the disabled-looking airplane looks great to me, we can discuss after standup to see if others are in agreement, but I think you should add that in.
also, the button looks giant now, but it does match the mockups so i don't think my opinion should hold up this pr. i'll bring it up to see what others think now that they can see it in the client application.
One change I think you should make in this PR is using the actual journalist_designation name instead of %bold_source_name%
as a placeholder. If you'd rather create a separate PR for retrieving the name, then I recommend changing Compose a reply to %bold_source_name%
to just Compose a reply
.
Also, currently when clicking inside the textbox the Compose a reply
text does not go away as I expected. Instead it goes away when you start typing, but I think it's distracting having the text in front of the cursor as you're thinking about what to type. It would be great if you could update this behavior as part of this PR as well.
df5f6d7
to
3de6439
Compare
@creviera could you check if the test I did looks sane? I had to make select a source from the sources list. Otherwise, I think it would be always true since I'd be creating a source and using that for a ReplyBoxWidget and testing the placeholder. |
@creviera regarding this, It's intended Qt behavior and there doesn't seem to be a default way to disable that. We might have to find another way, but let's do that in another PR, I think. From the docs (https://doc.qt.io/qt-5/qtextedit.html#placeholderText-prop)
|
I think your test looks good, although to improve code clarity, you could change A->B: A: sl = SourceList()
sl.setup(controller)
...
source_1 = factory.Source()
source_2 = factory.Source()
sl.update([source_1, source_2])
source_1_item = sl.item(0)
source_2_item = sl.item(1)
...
sl.setCurrentItem(source_2_item)
selected_source = sl.itemWidget(sl.currentItem()).source
rb = ReplyBoxWidget(selected_source, controller)
assert rb.text_edit.placeholderText().find(source_2.journalist_designation) != -1 B: source = factory.Source()
rb = ReplyBoxWidget(source, controller)
assert rb.text_edit.placeholderText().find(source.journalist_designation) != -1 Because all you're really testing is that the journalist_designation used in the placeholder text matches the journalist_designation of the ReplyBoxWidget source. The rest of your test is better done at the |
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, looks like qt's placeholderText
is not what we want here then. I agree that it makes sense to come up with a solution in a follow-up pr, especially if that solution is to add a QLabel to the ReplyBoxWidget
that hides on a focus event and allows rich-text formatting for the source name -- solves two issues in one!
Do not merge. Waiting on discussion in #580 (comment)
Description
Fixes #539 and partially #572
Before:
After:
Objective: (mockup)
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:
Comments
Considerations for future PRs: