forked from JabRef/jabref
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Markdown in AI Summary tab implemented (JabRef#12266)
* Checkbox and WebView added to the FXML * WebView and CheckBox added, onMarkdownToggle() method implemented to handle checkbox changes * WebView erased from fxml * WebView added and set programmatically * CheckBox Moved * TextArea wrapped around StackPane | Imports updated | Version updated * StackPane added | MarkdownFormatter initialized outside of contructor | Lazy initialization of WebView implemented * CheckBox and The Button on the same level, wrapped around BorderPane * replace TextArea with WebView for summary display * simplify summary component layout * TextFlow removed * <pre> changed to <body><div> * Default FontFamily and Size applied using ThemeManager * Described the PR in CHANGELOG.md * MarkdownFormatter renamed and now static * Removed changes from changelog, as requested * ThemeManager removed as requested
- Loading branch information
Showing
2 changed files
with
58 additions
and
19 deletions.
There are no files selected for viewing
34 changes: 19 additions & 15 deletions
34
src/main/java/org/jabref/gui/ai/components/summary/SummaryShowingComponent.fxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<?import javafx.geometry.Insets?> | ||
<?import javafx.scene.control.CheckBox?> | ||
<?import javafx.scene.control.Button?> | ||
<?import javafx.scene.control.TextArea?> | ||
<?import javafx.scene.layout.VBox?> | ||
<?import javafx.scene.text.Text?> | ||
<?import javafx.scene.layout.BorderPane?> | ||
<?import javafx.scene.text.TextFlow?> | ||
<fx:root alignment="TOP_CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" spacing="10.0" type="VBox" xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.jabref.gui.ai.components.summary.SummaryShowingComponent"> | ||
<children> | ||
<TextArea fx:id="summaryTextArea" editable="false" wrapText="true" VBox.vgrow="ALWAYS" /> | ||
<Button mnemonicParsing="false" onAction="#onRegenerateButtonClick" text="%Regenerate" /> | ||
<TextFlow textAlignment="CENTER"> | ||
<children> | ||
<Text fx:id="summaryInfoText" strokeType="OUTSIDE" strokeWidth="0.0" text="%Generated at %0 by %1" /> | ||
</children> | ||
</TextFlow> | ||
</children> | ||
<padding> | ||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> | ||
</padding> | ||
<?import javafx.scene.text.Text?> | ||
|
||
<fx:root alignment="TOP_CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="400.0" minWidth="-Infinity" spacing="8.0" type="VBox" xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.jabref.gui.ai.components.summary.SummaryShowingComponent"> | ||
<children> | ||
<BorderPane minHeight="30.0"> | ||
<left> | ||
<CheckBox fx:id="markdownCheckbox" mnemonicParsing="false" onAction="#onMarkdownToggle" text="Markdown" /> | ||
</left> | ||
<center> | ||
<Button mnemonicParsing="false" onAction="#onRegenerateButtonClick" text="%Regenerate" translateX="-40" /> | ||
</center> | ||
</BorderPane> | ||
<Text fx:id="summaryInfoText" strokeType="OUTSIDE" strokeWidth="0.0" text="%Generated at %0 by %1" /> | ||
</children> | ||
<padding> | ||
<Insets bottom="8.0" left="8.0" right="8.0" top="8.0" /> | ||
</padding> | ||
</fx:root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters