Skip to content

PoC: Redesigned efficient ChatView #17999

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

PoC: Redesigned efficient ChatView #17999

wants to merge 2 commits into from

Conversation

micieslak
Copy link
Member

What does the PR do

Proposes new approach regarding ChatView mechanics.

Architecture compliance

Screenshot of functionality (including design for comparison)

Screenshot from 2025-05-27 00-25-28

@micieslak micieslak marked this pull request as draft May 26, 2025 22:56
@status-im-auto
Copy link
Member

status-im-auto commented May 26, 2025

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ c858f8d #1 2025-05-26 23:05:34 ~8 min tests/nim 📄log
✔️ c858f8d #1 2025-05-26 23:06:26 ~9 min macos/aarch64 🍎dmg
✔️ c858f8d #1 2025-05-26 23:10:50 ~13 min tests/ui 📄log
✔️ c858f8d #1 2025-05-26 23:17:03 ~20 min macos/x86_64 🍎dmg
✔️ c858f8d #1 2025-05-26 23:17:05 ~20 min linux-nix/x86_64 📦tgz
✔️ c858f8d #1 2025-05-26 23:18:27 ~21 min windows/x86_64 💿exe
✔️ c858f8d #1 2025-05-26 23:19:04 ~22 min linux/x86_64 📦tgz
✔️ 623d5db #2 2025-06-03 10:35:07 ~6 min tests/nim 📄log
✔️ 623d5db #2 2025-06-03 10:36:46 ~8 min macos/aarch64 🍎dmg
✔️ 623d5db #2 2025-06-03 10:38:14 ~9 min tests/ui 📄log
✔️ 623d5db #2 2025-06-03 10:41:52 ~13 min linux/x86_64 📦tgz
✔️ 623d5db #2 2025-06-03 10:42:18 ~14 min linux-nix/x86_64 📦tgz
✔️ 623d5db #2 2025-06-03 10:45:57 ~17 min macos/x86_64 🍎dmg
✔️ 623d5db #2 2025-06-03 10:49:30 ~21 min windows/x86_64 💿exe

Copy link
Contributor

@noeliaSD noeliaSD left a comment

Choose a reason for hiding this comment

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

Great PoC @micieslak !

I've just added some comments and playing a bit with it, I see:

  • When scrolling up/down with the mouse, it reaches the first/last placeholder and doesn't trigger another block to be displayed. If you do it by holding the scroll bar and realease, then yes.
Screen.Recording.2025-05-27.at.13.47.16.mov

}

RoundButton {
id: recentMessagesButton
Copy link
Contributor

Choose a reason for hiding this comment

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

I cannot see this button on visible 🤔 ?!

Copy link
Member Author

Choose a reason for hiding this comment

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

you need to scroll up (by dragging scroll handler). Then you will see that :)


const offset = first.y - flickable.contentY

flickable.contentY = Qt.binding(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

On every adjustment it's created a new binding. Would it be needed to clear previous one somehow?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is necessary to position the view correctly. But the binding is broken later soon, e.g. when user scrolls the content.

Copy link
Contributor

@alexjba alexjba left a comment

Choose a reason for hiding this comment

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

Very nice solution! I like it a lot 💯

There are some limitations in terms of the number of messages we can support in the viewport and the content data (try to increase the max word count to 400 and resize the window). But I guess this would be the case with a ListView as well 🤔 In any case, the numberOfMessagesInViewport is probably too high anyway and we could decrease it to 10-20 messages.

Another addition would be the ability to scale the images based on MessageDelegate width. We can't fit such large images on smaller view ports. But probably something for the future.

Something like this:

Screen.Recording.2025-05-28.at.11.25.44.mov

return first.y - offset
})

const shift = Math.min(40, indexFilter.minimumIndex)
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this should be called when scrolling by wheel, trackpad or touch as well

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, that's missing thing now, it works only by dragging scroll handler by mouse explicitly

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

Successfully merging this pull request may close these issues.

4 participants