-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 welcome screen to JabRef GUI that displays when no database/library is open #12017
Draft
HaynesCrossley-ANU
wants to merge
38
commits into
JabRef:main
Choose a base branch
from
HaynesCrossley-ANU:issue-96
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+110
−2
Draft
Changes from 37 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
13b1b58
made a basic welcome screen here in WelcomeScreen.java
3c63145
got rid of welcome screen and made a welcome tab instead. Welcome tab…
0715fcd
made welcome page, works dynamically if no tabs are open
b27ddb6
opening new tab dismisses welcome screen
e88edc5
corrected reference to JabRefGui.mainFrame
e14b016
remove some debug loggers
ec78771
Merge pull request #1 from HaynesCrossley-ANU/issue-96
HaynesCrossley-ANU 69005e9
update CHANGELOG.md
d9ae0ee
Merge branch 'main' of https://github.com/HaynesCrossley-ANU/jabref
14984a9
update CHANGELOG.md
eade258
update welcome screen with hyperlinks instead of plain text
a031c35
welcome screen now has links for new library and open library
1b76f86
update CHANGELOG.md
2e38635
fix typo in CHANGELOG.md
64f7f38
Merge branch 'JabRef:main' into main
HaynesCrossley-ANU 90ca2d2
Merge branch 'main' into issue-96
HaynesCrossley-ANU e9c04fd
remove comments
5d50f08
move styling on WelcomePage to Base.css
325debb
Merge branch 'main' into issue-96
surymishra e15cdb9
remove comments from WelcomePage.java
0a392f7
Merge branch 'issue-96' of https://github.com/HaynesCrossley-ANU/jabr…
33dab83
Merge branch 'main' into issue-96
koppor eab1844
modify updateContent() method
0c07f52
Merge remote-tracking branch 'origin/issue-96' into issue-96
b616970
modify updateSidePane method
5b5a63c
FIX: fix sidebar resizing exception
Chethin 89d6985
CHORE: remove unnecessary logic
Chethin 64a09e7
Merge branch 'main' into issue-96
koppor bd07c06
Merge pull request #3 from HaynesCrossley-ANU/issue-96-review-changes
HaynesCrossley-ANU a495fe8
FEAT: made entire welcome sentences into links
Chethin aab2694
FEAT: Localisation for welcome strings in welcome page
Chethin f8dabfb
CHORE: remove redundant divider subscription rebinding
Chethin 0e428ab
CHORE: remove welcome-text after making entire sentence link
Chethin c72d89d
CHORE: revert lines to make PR cleaner
Chethin 3ccd6d3
Merge branch 'main' into issue-96
chethin-ANU 1dcf28e
FEAT: update JabRef_en.properties with localisation keys
Chethin f83de2a
Merge remote-tracking branch 'origin/issue-96' into issue-96
Chethin e346076
CHORE: remove welcome page javadocs
Chethin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package org.jabref.gui.util; | ||
|
||
import javafx.geometry.Pos; | ||
import javafx.scene.control.Hyperlink; | ||
import javafx.scene.control.Label; | ||
import javafx.scene.layout.VBox; | ||
|
||
import org.jabref.gui.ClipBoardManager; | ||
import org.jabref.gui.DialogService; | ||
import org.jabref.gui.StateManager; | ||
import org.jabref.gui.frame.JabRefFrame; | ||
import org.jabref.gui.importer.NewDatabaseAction; | ||
import org.jabref.gui.importer.actions.OpenDatabaseAction; | ||
import org.jabref.gui.preferences.GuiPreferences; | ||
import org.jabref.gui.undo.CountingUndoManager; | ||
import org.jabref.logic.ai.AiService; | ||
import org.jabref.logic.l10n.Localization; | ||
import org.jabref.logic.util.TaskExecutor; | ||
import org.jabref.model.entry.BibEntryTypesManager; | ||
import org.jabref.model.util.FileUpdateMonitor; | ||
|
||
/** | ||
* A simple Welcome Page for the JabRef application. | ||
*/ | ||
public class WelcomePage extends VBox { | ||
|
||
public WelcomePage(JabRefFrame frame, | ||
GuiPreferences preferences, | ||
AiService aiService, | ||
DialogService dialogService, | ||
StateManager stateManager, | ||
FileUpdateMonitor fileUpdateMonitor, | ||
BibEntryTypesManager entryTypesManager, | ||
CountingUndoManager undoManager, | ||
ClipBoardManager clipBoardManager, | ||
TaskExecutor taskExecutor) { | ||
|
||
setAlignment(Pos.CENTER); | ||
setSpacing(10); | ||
|
||
Label welcomeLabel = new Label(Localization.lang("Welcome to JabRef!")); | ||
welcomeLabel.getStyleClass().add("welcome-label"); | ||
|
||
Hyperlink newLibrary = new Hyperlink(Localization.lang("Open a New Library")); | ||
newLibrary.getStyleClass().add("welcome-hyperlink"); | ||
newLibrary.setOnAction(e -> new NewDatabaseAction(frame, preferences).execute()); | ||
|
||
Hyperlink openLibrary = new Hyperlink(Localization.lang("or open an Existing Library")); | ||
openLibrary.getStyleClass().add("welcome-hyperlink"); | ||
openLibrary.setOnAction(e -> new OpenDatabaseAction(frame, preferences, aiService, dialogService, | ||
stateManager, fileUpdateMonitor, entryTypesManager, undoManager, clipBoardManager, | ||
taskExecutor).execute()); | ||
|
||
getChildren().addAll(welcomeLabel, newLibrary, openLibrary); | ||
} | ||
} |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove JavaDoc - the class name already says this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted thanks! comments removed