I have been away from Bubble for a bit and am recently catching up. Since the new responsive engine was employed, is there a basic method to reverse repeating group cell orders so that they mimic modern day chat apps or is the manual method described here or the plugin method described here still the only ways to go about it?
I am actually confused now. I realize that the way bubble naturally displays repeating groups is how chat apps like whatsapp, telegram and facebook display their chats too which is the newest message showing at the bottom. These plugins reverse it to the top which is not what is standard among the chat apps mentioned. So the only issue I am left with is the scroll bar doesnât automatically go down once a new message is sent and the user needs to manually scroll down to see the latest message. Is there a remedy to that?
As you said, dont reverse the RG. There is a native âscroll to entry of a repeating groupâ action.
In the dynamic expression, reference the RGâ list of items:last item.
This will automatically scroll to the last item of the RG
Yes youâre absolutely right, sorry for not mentioning it.
WU consumption would go through the roof with this method.
You would have to find a way to download to the page only the last few messages from a chat instead of downloading the entire discussion.
There are multiple ways to do this but here is a basic implementation:
Before we start, donât use lists. Lists are downloaded to the page in their entirety if any of their entries are referenced. Might be tempting to create a Discussion datathing, a message datathing, and add a list of messages field to the Discussion. DONT do this
Instead of that, you could create a discussion datathing with fields for User 1 User 2 & #of messages in the discussion.
The messages datathing would have a Content + Index data.
When the user opens a discussion, populate your repeating group with âDo a search for Messages: [Constraint: Index > Selected discussionâs # of messages - X]â
You can choose what the starting value of X is, however you should have a button at the top of your RG which allows the user to load previous messages. This would increase the value of X, so more messages would be loaded. You could also implement a workflow which automatically does this based on user scrolling.
There are other ways of doing this, however this can get you headed in the right direction and save you lots of WU.
Also, while âdo a search for: items from #â might look like a good solution, it does not save WU, as the â:items from #â operator is applied after the whole search is returned, so the datathings are downloaded to the page anyways.