Skip to content

Question: Is it possible to use RichTextFX as a backlog view in a chat application? #752

@MrCustomizer

Description

@MrCustomizer

Is it possible to use this library as the text display area of chat application? My chat application currently uses a web view and I would really like to replace it with something else. But I'm not sure yet, if this library is a good match. I hope you can help me.

I need the following features:

  1. Display images inline
  2. Display an avatar image in the first column (spanning multiple lines)
  3. Display a timestamp after every message
  4. Access and alter single messages (every message has a unique id)
  5. Add new messages before or after a specific message (again, this message would be identified by the unique id)
  6. Keep current scroll position when adding new or altering existing messages
  7. Listen to the scroll position, so fetching of older messages can be initiated, if the view is scrolled to the top
  8. Read only display, while text is selectable and copy and paste is supported

My analysis regarding RichTextFX so far:

  1. can be implemented with custom objects.
  2. is probably possible by using a paragraph graphic factory.
  3. is currently not possible
  4. could probably be implemented by keeping track of paragraphs or text positions in a separate data structure.
  5. same as 4.
  6. is directly supported by the library.
  7. could probably be implemented by using some listener functionality of the VirtualizedScrollPane.
  8. is directly supported by the library.

Is this analysis correct? Do you see other problems, which I have missed?

So if I'm not mistaken the biggest problem is number 3, as to my understanding the paragraph factory currently only can display nodes left to a paragraph. How hard would it be to extend the library with a new factory for placing nodes to the right side of a paragraph? Do you have ideas how this could be implemented in another way?

To get a clearer picture of what I'm talking about: Currently my backlog view looks like this (user avatars to the left, message in the middle, timestamp on the right; segment headers in between days):
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions