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

Add ADR-0042 and fix ADR-0036 #12277

Merged
merged 3 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/decisions/0036-use-textarea-for-chat-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ nav_order: 0036
parent: Decision Records
---

# Use TextArea for Chat Message Content
# Use `TextArea` for Chat Message Content

## Context and Problem Statement

Expand Down Expand Up @@ -41,7 +41,7 @@ which for now we value more than Markdown rendering.

### Use a third-party package

There seems to be only one package for JavaFX that provides a ready-to-use UI node for Markdown rendering.
There seems to be [only one package](https://github.com/JPro-one/markdown-javafx-renderer) for JavaFX that provides a ready-to-use UI node for Markdown rendering.

* Good, because it is easy to implement
* Good, because it renders Markdown
Expand Down Expand Up @@ -77,8 +77,10 @@ There seems to be only one package for JavaFX that provides a ready-to-use UI no

## More Information

This ADR is highly linked to [ADR-0042](./0042-use-webview-for-summarization-content.md).

Actually we used an `ExpandingTextArea` from `GemsFX` package so the content can occupy
as much space as it needs in the `ScrollPane`.

About the selection and copying, this goes down to fundamental issue from JavaFX.
`Text` and `Label` cannot be selected by any means.
`Text` and `Label` as a whole or a part [cannot be selected and/or copied](https://bugs.openjdk.org/browse/JDK-8091644).
InAnYan marked this conversation as resolved.
Show resolved Hide resolved
37 changes: 37 additions & 0 deletions docs/decisions/0042-use-webview-for-summarization-content.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
nav_order: 0042
parent: Decision Records
---

# Use `WebView` for Chat Message Content

## Context and Problem Statement

This decision record concerns the UI component that is used for rendering the content of AI summaries.

## Decision Drivers

Same as in [ADR-0036](./0036-use-textarea-for-chat-content.md).

## Considered Options

Same as in [ADR-0036](./0036-use-textarea-for-chat-content.md).

## Decision Outcome

Chosen option: "Use `WebView`".

Some of the options does not support selecting and copying of text. Some options do not render Markdown.

However, in contrary to [ADR-0036](./0036-use-textarea-for-chat-content.md), we chose here a `WebView`, instead of `TextArea`, because there is only one summary content in UI (when user switches entries, no new components are added, rather old ones are *rebinding* to new entry). It would hurt the performance if we used `WebView` for messages, as there could be a lot of messages in one chat.

## Pros and Cons of the Options

Same as in [ADR-0036](./0036-use-textarea-for-chat-content.md).

## More Information

This ADR is highly linked to [ADR-0036](./0036-use-textarea-for-chat-content.md).

About the selection and copying, this goes down to fundamental issue from JavaFX.
`Text` and `Label` as a whole or a part [cannot be selected and/or copied](https://bugs.openjdk.org/browse/JDK-8091644).
Loading