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

Usage of StatusMessage #6508

Merged
merged 1 commit into from
Aug 20, 2022
Merged

Usage of StatusMessage #6508

merged 1 commit into from
Aug 20, 2022

Conversation

igor-sirotin
Copy link
Contributor

@igor-sirotin igor-sirotin commented Jul 18, 2022

Requires:

Fixes:

What does the PR do

  • Use the new StatusMessage component from StatusQ library.
  • MessageView, StatusChatInput and some other related code refactoring.

Affected areas

chat

Screenshot of functionality (including design for comparison)

2022-07-27.18.28.06.mov

Features checklist

  1. Content
    • Message with text
      • Text
      • Highlight user mentions
      • Highlight links
      • Long message "Read more"
      • Edited message badge
    • Image message
      • show image (only works with sent images; not working with received from dogooding/phase-5)
      • image click to enlarge
  2. Actions
    • Message reactions
      • Show message reactions
      • Toggle reaction
      • Add reaction
    • Quick actions
      • Add reaction
      • Reply
      • Edit
      • Delete with confirmation
      • Delete without confirmation
      • Pin / Unpin
    • Clicks
      • Profile image
      • Profile name
      • Link
      • Profile link
      • Message right click
      • Image right click
      • Sticker click (open sticker pack)
  3. Pinned message
    • highlight
    • pinned by "user" note
  4. Reply
    • highlight
    • from
    • content
    • Profile name click (wasn't done previously) - Design link
  5. Message details
    • Sender
      • Profile image / 2-letters-icon
      • Is contact
      • ENS name
      • Old name
      • Trust indicator
      • You when current user is the message sender
  6. Other features
    • Message editing
    • Chat top items (user, "load more", ...)
    • Message with mentions highlight
    • Timestamp
    • hasExpired
    • shouldRepeatHeader: Hide sender when multiple in a row
    • isHovered, isActive
    • DateGroup
    • Scroll to message
      • MessageFoundAnimation
      • Scroll to bottom — fixed (wasn't actually working on master)
      • Jump to message — ⚠️ not working on master, open a bug later
      • Refactor click handler
        • Minimize arguments count (currently 8) — ⚠️ Decided to do this in a separate task, will link an issue here
        • Remove setXPosition functions, auto-position to parent by popup() call

Before-merge checklist

  • Bind to MessageView properties instead of model
  • Check all usages of MessageView
    • ChatMessagesView
    • PinnedMessagesPopup
    • AppearanceView
    • ContactVerificationRequestPopup
    • ProfileView
    • ActivityCenterMessageComponentView⚠️ failed to test, no notifications received
  • Remove legacy MessageView properties — ⚠️ Mainly removed, decided to finish in a separate task

@status-im-auto
Copy link
Member

status-im-auto commented Jul 18, 2022

Jenkins Builds

Click to see older builds (145)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ a2209d6 #1 2022-07-18 15:06:01 ~8 min macos 📦dmg
✔️ a2209d6 #1 2022-07-18 15:08:33 ~10 min linux 📦tgz
✔️ a2209d6 #1 2022-07-18 15:18:45 ~20 min windows 📦exe
✔️ bd39de0 #2 2022-07-18 15:54:32 ~8 min macos 📦dmg
✔️ bd39de0 #2 2022-07-18 15:58:53 ~13 min linux 📦tgz
✔️ bd39de0 #2 2022-07-18 16:07:16 ~21 min windows 📦exe
✔️ cb9183f #3 2022-07-18 16:01:32 ~9 min linux 📦tgz
✔️ cb9183f #3 2022-07-18 16:05:48 ~14 min macos 📦dmg
✔️ cb9183f #3 2022-07-18 16:14:02 ~22 min windows 📦exe
✔️ 4842e6c #4 2022-07-18 17:10:30 ~8 min macos 📦dmg
✔️ 4842e6c #4 2022-07-18 17:12:06 ~10 min linux 📦tgz
✔️ 4842e6c #4 2022-07-18 17:23:47 ~21 min windows 📦exe
✔️ 1c1c4a5 #5 2022-07-18 17:22:59 ~11 min linux 📦tgz
✔️ 1c1c4a5 #5 2022-07-18 17:28:32 ~16 min macos 📦dmg
✔️ 1c1c4a5 #5 2022-07-18 17:46:36 ~34 min windows 📦exe
✔️ 74f9e62 #6 2022-07-20 20:41:50 ~9 min linux 📦tgz
✔️ 74f9e62 #6 2022-07-20 20:50:55 ~18 min windows 📦exe
✔️ 74f9e62 #6 2022-07-20 20:51:12 ~19 min macos 📦dmg
✔️ 61ad540 #7 2022-07-22 10:18:35 ~9 min macos 📦dmg
✔️ 61ad540 #7 2022-07-22 10:19:33 ~10 min linux 📦tgz
✔️ 61ad540 #7 2022-07-22 10:31:04 ~21 min windows 📦exe
✔️ e47a88b #8 2022-07-23 15:49:15 ~9 min macos 📦dmg
✔️ e47a88b #8 2022-07-23 15:52:02 ~12 min linux 📦tgz
✔️ e47a88b #8 2022-07-23 16:01:56 ~22 min windows 📦exe
✔️ 95b9a89 #9 2022-07-23 15:52:38 ~8 min macos 📦dmg
✔️ 95b9a89 #9 2022-07-23 15:53:46 ~9 min linux 📦tgz
✔️ 95b9a89 #9 2022-07-23 16:04:02 ~20 min windows 📦exe
✔️ fbeb3e8 #10 2022-07-23 15:58:30 ~7 min macos 📦dmg
✔️ fbeb3e8 #10 2022-07-23 16:01:27 ~10 min linux 📦tgz
✔️ fbeb3e8 #10 2022-07-23 16:13:56 ~23 min windows 📦exe
✔️ 45d60cb #12 2022-07-25 16:18:41 ~8 min macos 📦dmg
✔️ 45d60cb #12 2022-07-25 16:20:46 ~10 min linux 📦tgz
✔️ 45d60cb #12 2022-07-25 16:34:06 ~23 min windows 📦exe
✔️ a580ea9 #11 2022-07-25 16:22:25 ~13 min linux 📦tgz
✔️ a580ea9 #11 2022-07-25 16:25:48 ~16 min macos 📦dmg
✔️ a580ea9 #11 2022-07-25 16:33:31 ~24 min windows 📦exe
✔️ 1b8418a #13 2022-07-25 18:06:54 ~15 min linux 📦tgz
✔️ 1b8418a #13 2022-07-25 18:12:41 ~20 min macos 📦dmg
✔️ 1b8418a #13 2022-07-25 18:15:00 ~23 min windows 📦exe
✔️ 9dfb479 #14 2022-07-27 09:26:24 ~8 min macos 📦dmg
✔️ 9dfb479 #14 2022-07-27 09:29:10 ~11 min linux 📦tgz
✔️ 9dfb479 #14 2022-07-27 09:40:41 ~23 min windows 📦exe
✔️ 2a22235 #15 2022-07-27 09:30:14 ~8 min macos 📦dmg
✔️ 2a22235 #15 2022-07-27 09:35:40 ~13 min linux 📦tgz
✔️ 2a22235 #15 2022-07-27 09:57:37 ~35 min windows 📦exe
✔️ 6a23540 #16 2022-07-27 10:28:25 ~10 min linux 📦tgz
✔️ 6a23540 #16 2022-07-27 10:34:30 ~16 min macos 📦dmg
✔️ 6a23540 #16 2022-07-27 10:41:04 ~23 min windows 📦exe
✔️ 449b673 #17 2022-07-27 14:53:13 ~8 min macos 📦dmg
✔️ 449b673 #17 2022-07-27 14:55:31 ~11 min linux 📦tgz
✔️ 449b673 #17 2022-07-27 15:08:38 ~24 min windows 📦exe
✔️ e684512 #18 2022-07-27 14:59:52 ~10 min linux 📦tgz
✔️ e684512 #18 2022-07-27 15:03:16 ~13 min macos 📦dmg
✔️ 2b76c36 #19 2022-07-27 15:04:04 ~8 min macos 📦dmg
✔️ 2b76c36 #19 2022-07-27 15:06:46 ~11 min linux 📦tgz
✔️ 2b76c36 #19 2022-07-27 15:21:14 ~25 min windows 📦exe
✔️ f4e751e #20 2022-07-28 22:09:23 ~10 min linux 📦tgz
✔️ f4e751e #20 2022-07-28 22:16:37 ~17 min macos 📦dmg
✔️ f4e751e #20 2022-07-28 22:21:53 ~22 min windows 📦exe
✔️ f0f16f0 #21 2022-07-29 10:41:39 ~8 min macos 📦dmg
✔️ f0f16f0 #21 2022-07-29 10:44:31 ~11 min linux 📦tgz
✔️ f0f16f0 #21 2022-07-29 10:56:06 ~22 min windows 📦exe
✔️ 5cde4a9 #22 2022-07-29 10:49:36 ~11 min linux 📦tgz
✔️ 5cde4a9 #22 2022-07-29 11:05:31 ~27 min macos 📦dmg
✔️ 9f568ce #23 2022-08-07 16:22:00 ~10 min linux 📦tgz
✔️ 9f568ce #23 2022-08-07 16:27:44 ~15 min macos 📦dmg
✔️ 9f568ce #23 2022-08-07 16:35:57 ~24 min windows 📦exe
d7a9056 #1 2022-08-07 16:30:19 ~6 min e2e 📄log
✔️ d7a9056 #24 2022-08-07 16:32:33 ~9 min macos 📦dmg
✔️ d7a9056 #24 2022-08-07 16:34:40 ~11 min linux 📦tgz
✔️ d7a9056 #24 2022-08-07 16:44:43 ~21 min windows 📦exe
ffff24a #2 2022-08-07 20:14:45 ~5 min e2e 📄log
✔️ ffff24a #25 2022-08-07 20:19:54 ~11 min linux 📦tgz
✔️ ffff24a #25 2022-08-07 20:24:43 ~15 min macos 📦dmg
✔️ ffff24a #25 2022-08-07 20:30:25 ~21 min windows 📦exe
✔️ ab44324 #1 2022-08-10 18:04:20 ~1 hr 15 min linux 📦tgz
✔️ ab44324 #1 2022-08-10 18:12:16 ~1 hr 22 min macos 📦dmg
✔️ ab44324 #1 2022-08-10 21:11:30 ~4 hr 20 min windows 📦exe
✔️ 53eacbc #2 2022-08-12 10:41:50 ~11 min linux 📦tgz
✔️ 53eacbc #2 2022-08-12 10:46:30 ~15 min macos 📦dmg
✔️ 53eacbc #2 2022-08-12 10:53:08 ~22 min windows 📦exe
53eacbc #6 2022-08-12 10:59:39 ~29 min e2e 📄log
✔️ a33c1f5 #3 2022-08-12 10:55:27 ~10 min linux 📦tgz
✔️ a33c1f5 #3 2022-08-12 10:59:53 ~15 min macos 📦dmg
a33c1f5 #7 2022-08-12 11:07:31 ~22 min e2e 📄log
✔️ a33c1f5 #3 2022-08-12 11:09:48 ~25 min windows 📦exe
✔️ acab1e0 #4 2022-08-12 12:27:05 ~9 min macos 📦dmg
✔️ acab1e0 #4 2022-08-12 12:29:47 ~11 min linux 📦tgz
✔️ acab1e0 #4 2022-08-12 12:41:52 ~23 min windows 📦exe
acab1e0 #8 2022-08-12 13:17:33 ~59 min e2e 📄log
✔️ 516d41a #5 2022-08-15 17:08:33 ~10 min linux 📦tgz
✔️ 516d41a #5 2022-08-15 17:17:51 ~20 min macos 📦dmg
516d41a #9 2022-08-15 17:20:25 ~22 min e2e 📄log
✔️ 516d41a #5 2022-08-15 17:22:51 ~24 min windows 📦exe
✔️ b9e8e1d #6 2022-08-17 14:07:16 ~9 min macos 📦dmg
b9e8e1d #10 2022-08-17 14:08:09 ~10 min e2e 📄log
✔️ b9e8e1d #6 2022-08-17 14:09:47 ~12 min linux 📦tgz
✔️ b9e8e1d #6 2022-08-17 14:24:02 ~26 min windows 📦exe
✔️ 0a4bfaa #7 2022-08-17 14:07:56 ~8 min macos 📦dmg
✔️ 0a4bfaa #7 2022-08-17 14:10:59 ~11 min linux 📦tgz
✔️ 0a4bfaa #7 2022-08-17 14:26:28 ~27 min windows 📦exe
0a4bfaa #11 2022-08-17 14:29:20 ~30 min e2e 📄log
✔️ bfc968e #8 2022-08-17 17:00:58 ~11 min linux 📦tgz
bfc968e #12 2022-08-17 17:04:00 ~14 min e2e 📄log
✔️ bfc968e #8 2022-08-17 17:09:58 ~20 min macos 📦dmg
✔️ bfc968e #8 2022-08-17 17:15:10 ~25 min windows 📦exe
✔️ 8a9c5b7 #9 2022-08-17 18:05:13 ~8 min macos 📦dmg
✔️ 8a9c5b7 #9 2022-08-17 18:07:36 ~11 min linux 📦tgz
8a9c5b7 #13 2022-08-17 18:09:05 ~12 min e2e 📄log
✔️ 8a9c5b7 #9 2022-08-17 18:19:56 ~23 min windows 📦exe
✔️ 2e845bf #10 2022-08-18 09:15:56 ~11 min linux 📦tgz
2e845bf #14 2022-08-18 09:21:21 ~16 min e2e 📄log
✔️ 7493436 #11 2022-08-18 09:16:36 ~11 min linux 📦tgz
✔️ 7493436 #11 2022-08-18 09:20:21 ~14 min macos 📦dmg
✔️ 7493436 #11 2022-08-18 09:32:25 ~26 min windows 📦exe
✔️ 47ef612 #12 2022-08-18 10:32:59 ~19 min macos 📦dmg
✔️ 47ef612 #12 2022-08-18 10:35:02 ~22 min linux 📦tgz
✔️ 47ef612 #12 2022-08-18 10:35:39 ~22 min windows 📦exe
47ef612 #15 2022-08-18 13:57:45 ~9 min e2e 📄log
✔️ 1099986 #13 2022-08-18 18:41:47 ~10 min linux 📦tgz
✔️ 1099986 #13 2022-08-18 18:46:41 ~15 min macos 📦dmg
✔️ 1099986 #13 2022-08-18 18:56:39 ~25 min windows 📦exe
✔️ 0382ed1 #14 2022-08-18 18:41:59 ~8 min macos 📦dmg
✔️ 0382ed1 #14 2022-08-18 18:50:31 ~17 min linux 📦tgz
✔️ 0382ed1 #14 2022-08-18 18:56:05 ~22 min windows 📦exe
✔️ e92c927 #15 2022-08-18 18:51:39 ~7 min macos 📦dmg
✔️ e92c927 #15 2022-08-18 18:54:46 ~10 min linux 📦tgz
✔️ e92c927 #15 2022-08-18 19:06:35 ~22 min windows 📦exe
e92c927 #17 2022-08-18 19:47:27 ~6 min e2e 📄log
3241b89 #18 2022-08-19 14:03:17 ~6 min e2e 📄log
✔️ 3241b89 #16 2022-08-19 14:08:33 ~11 min linux 📦tgz
✔️ 3241b89 #16 2022-08-19 14:14:17 ~17 min macos 📦dmg
✔️ 3241b89 #16 2022-08-19 14:21:04 ~24 min windows 📦exe
79b8170 #19 2022-08-19 14:09:46 ~6 min e2e 📄log
✔️ 79b8170 #17 2022-08-19 14:12:41 ~9 min macos 📦dmg
✔️ 79b8170 #17 2022-08-19 14:14:44 ~11 min linux 📦tgz
✔️ 79b8170 #17 2022-08-19 14:26:48 ~23 min windows 📦exe
879a91c #20 2022-08-19 14:40:09 ~6 min e2e 📄log
✔️ 879a91c #18 2022-08-19 14:45:55 ~11 min linux 📦tgz
✔️ 879a91c #18 2022-08-19 14:51:48 ~17 min macos 📦dmg
✔️ 879a91c #18 2022-08-19 14:57:24 ~23 min windows 📦exe
f50ad06 #21 2022-08-19 16:32:50 ~6 min e2e 📄log
✔️ f50ad06 #19 2022-08-19 16:37:34 ~11 min linux 📦tgz
✔️ f50ad06 #19 2022-08-19 16:44:48 ~18 min macos 📦dmg
✔️ f50ad06 #19 2022-08-19 16:51:28 ~25 min windows 📦exe
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 30f7daf #20 2022-08-19 16:37:03 ~8 min macos 📦dmg
30f7daf #22 2022-08-19 16:38:49 ~5 min e2e 📄log
✔️ 30f7daf #20 2022-08-19 16:39:04 ~11 min linux 📦tgz
✔️ 30f7daf #20 2022-08-19 16:52:36 ~24 min windows 📦exe
✔️ 0be59de #21 2022-08-20 00:11:47 ~9 min macos 📦dmg
✔️ 0be59de #21 2022-08-20 00:13:18 ~10 min linux 📦tgz
✔️ 0be59de #21 2022-08-20 00:28:13 ~25 min windows 📦exe
0be59de #23 2022-08-20 00:41:15 ~38 min e2e 📄log

@igor-sirotin igor-sirotin force-pushed the fix/StatusMessage branch 9 times, most recently from 95b9a89 to fbeb3e8 Compare July 23, 2022 15:50
@status-im-auto
Copy link
Member

✔️ status-desktop/branches/macos/PR-6508#9 🔹 ~10 min 🔹 95b9a89 🔹 📦 macos package

@status-im-auto
Copy link
Member

✔️ status-desktop/branches/linux/PR-6508#9 🔹 ~11 min 🔹 95b9a89 🔹 📦 linux package

@igor-sirotin igor-sirotin force-pushed the fix/StatusMessage branch 9 times, most recently from e684512 to 2b76c36 Compare July 27, 2022 14:55
@igor-sirotin igor-sirotin marked this pull request as ready for review July 27, 2022 15:04
@igor-sirotin igor-sirotin requested review from jrainville, caybro, Khushboo-dev-cpp, osmaczko, 0x-r4bbit and a team and removed request for a team July 27, 2022 15:18
@glitchminer
Copy link
Contributor

Hi @igor-sirotin, issue 12 now seems resolved but a similar problem is now appearing in long messages or larger images. Please refer to the screen recording below. Is this related to 12 or better raised as a separate issue?

Screen.Recording.2022-08-17.at.21.34.56.mov
Screen.Recording.2022-08-17.at.21.38.51.mov

@igor-sirotin igor-sirotin force-pushed the fix/StatusMessage branch 6 times, most recently from 0382ed1 to e92c927 Compare August 18, 2022 18:43
@glitchminer
Copy link
Contributor

glitchminer commented Aug 18, 2022

Issue Found

@igor-sirotin, 12 is now resolved! 👍

New issues tracking comment for clarity. Issues in previous #6508 (comment) are now addressed, either fixed or moved to new issues. 3 issues found in this cycle:


13. FIXED Formatting on pinned messages (addressed later by #6851 ?)

image
image


14. MOVED Pinned message limit not reseting after removing pins (showing max at 2) (TO BE MOVED)

image


15. FIXED Spacing next to time stamp is too large and missing bold dot spacer

Actual
image

Expected
image


16. FIXED Tall images not being displayed correctly

image


17. FIXED Chat key not included in id verification modal

image

Copy link
Member

@micieslak micieslak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just found that pinned message boxes are not positioned correctly at startup:

Screencast.2022-08-19.12.59.28.mp4

@igor-sirotin igor-sirotin force-pushed the fix/StatusMessage branch 2 times, most recently from 3241b89 to 79b8170 Compare August 19, 2022 14:03
@igor-sirotin
Copy link
Contributor Author

@glitchminer @micieslak, thanks, both fixed:
image

Copy link
Member

@micieslak micieslak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's huge! Lgtm, but I left some comments.

// Add a small delay because images, even though they say they say they are loaed, they aren't shown yet
Qt.callLater(chatLogView.positionViewAtBeginning)
timer.setTimeout(function() {
Qt.callLater(chatLogView.positionViewAtBeginning)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is nested Qt.callLater needed?

Presumable it could be just:

            timer.setTimeout(chatLogView.positionViewAtBeginning), 100)

Qt.callLater(chatLogView.positionViewAtBeginning)
timer.setTimeout(function() {
Qt.callLater(chatLogView.positionViewAtBeginning)
}, 100);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please be consistent about ;. It can be removed I think.


onContentYChanged: {
scrollDownButton.visible = contentHeight - (scrollY + height) > 400
let loadMore = scrollDownButton.visible && scrollY < 500
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const, or alternatively could be moved directly into if

@igor-sirotin igor-sirotin force-pushed the fix/StatusMessage branch 2 times, most recently from f50ad06 to 30f7daf Compare August 19, 2022 16:27
Copy link
Contributor

@glitchminer glitchminer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and approved.

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