Virtual scrolling #284

Closed
opened 2019-01-26 13:43:00 +00:00 by succfemboi · 18 comments
Member

Normally posts which aren't being displayed anymore are still being rendered.

Having a virtual scroller would make the site appear smoother by only rendering posts which are being scrolled though and removing elements from the DOM which currently aren't displayed.

There already is a module vue called vue-virtual-scroller and here is a demo of it in action https://akryum.github.io/vue-virtual-scroller/#/dynamic

Maybe it could prevent that I sometimes see the background image instead of the timeline if I scroll the timeline on my phone very fast

Normally posts which aren't being displayed anymore are still being rendered. Having a virtual scroller would make the site appear smoother by only rendering posts which are being scrolled though and removing elements from the DOM which currently aren't displayed. There already is a module vue called [vue-virtual-scroller](https://github.com/Akryum/vue-virtual-scroller) and here is a demo of it in action https://akryum.github.io/vue-virtual-scroller/#/dynamic Maybe it could prevent that I sometimes see the background image instead of the timeline if I scroll the timeline on my phone very fast
Member

I've looked into it before, haven't tried implementing it. might be more reasonable if the attachment/media-modal is merged in and statuses have more fixed sizes. previously that has been a potential problem

I've looked into it before, haven't tried implementing it. might be more reasonable if the attachment/media-modal is merged in and statuses have more fixed sizes. previously that has been a potential problem
Author
Member

Actually, the post height can be influenced by the text length anyway but one could just use dynamic scroller for now

Actually, the post height can be influenced by the text length anyway but one could just use dynamic scroller for now
Member

Yeah but with flexing attachments it could change when the images load, I doubt the dynamic option would deal with changing elements well.

Yeah but with flexing attachments it could change when the images load, I doubt the dynamic option would deal with changing elements well.
Author
Member

Probably the elements would adjust to it anyway, considering that the dynamic scroller can emit a resize-event if I read it correctly

Probably the elements would adjust to it anyway, considering that the dynamic scroller can emit a `resize`-event if I read it correctly
Member

The way I see it, it's hard to work properly by using vue-virtual-scroller.
I think it should be implemented newly refer to the module.
@succfemboi I can work on it if you agree with me.

The way I see it, it's hard to work properly by using vue-virtual-scroller. I think it should be implemented newly refer to the module. @succfemboi I can work on it if you agree with me.
Author
Member

@jasper I think I did try to implent it by myself with the virtual is roller module, but I didn't know how to actually use it in the timeline. JavaScript is still relatively new to me.

I guess it would be better to design a module after a project and not the other way around

@jasper I think I did try to implent it by myself with the virtual is roller module, but I didn't know how to actually use it in the timeline. JavaScript is still relatively new to me. I guess it would be better to design a module after a project and not the other way around
Author
Member

If I understand it right, it does not even need an external module for virtual scrolling to happen?

If I understand it right, it does not even need an external module for virtual scrolling to happen?
Member

@succfemboi yeah, right. I think it doesn't need, the module you mentioned is not suitable for pleroma-fe.

@succfemboi yeah, right. I think it doesn't need, the module you mentioned is not suitable for pleroma-fe.
Author
Member

Would you still work on it?

Would you still work on it?
Member

yes, but I need to do some more test to check if it can work properly.

yes, but I need to do some more test to check if it can work properly.
Author
Member

Anything still needed to be tested? Maybe I could help

Anything still needed to be tested? Maybe I could help
Member

oh, I didn't focus on this issue for a while. I'll try to finalize it as quick as possible.

oh, I didn't focus on this issue for a while. I'll try to finalize it as quick as possible.
Author
Member

Will this feature affect how i18n gets structured?

Will this feature affect how i18n gets structured?
Member

It will not affect i18n at all.

It will not affect i18n at all.
Author
Member

Do you have a branch which has virtual scrolling support on it?

I'm trying to implement code splitting which might change how modules get loaded

Do you have a branch which has virtual scrolling support on it? I'm trying to implement [code splitting](https://git.pleroma.social/pleroma/pleroma-fe/pulls/1934) which might change how modules get loaded
Author
Member

Is there any reference of implementing this feature?

Is there any reference of implementing this feature?

related to #2310

related to #2310

duplicate of #711

duplicate of #711
Sign in to join this conversation.
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pleroma/pleroma-fe#284
No description provided.