diff --git a/docs/decisions/0036-use-textarea-for-chat-content.md b/docs/decisions/0036-use-textarea-for-chat-content.md index 5f01bebf35f..f54e31b8a8a 100644 --- a/docs/decisions/0036-use-textarea-for-chat-content.md +++ b/docs/decisions/0036-use-textarea-for-chat-content.md @@ -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 @@ -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 @@ -81,4 +81,4 @@ Actually we used an `ExpandingTextArea` from `GemsFX` package so the content can 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). diff --git a/docs/decisions/0042-use-webview-for-summarization-content.md b/docs/decisions/0042-use-webview-for-summarization-content.md new file mode 100644 index 00000000000..1edd1d9a222 --- /dev/null +++ b/docs/decisions/0042-use-webview-for-summarization-content.md @@ -0,0 +1,38 @@ +--- +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). +