-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add initial implementation of walkthrough #13182
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
base: main
Are you sure you want to change the base?
Conversation
private final Pane rootPane; | ||
private Node attachedNode; | ||
|
||
private final List<Runnable> cleanupTasks = new ArrayList<>(); |
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.
Using ArrayList for cleanupTasks is not optimal. Consider using List.of() for creating an empty list, which is more efficient and aligns with JabRef's conventions.
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.
Should be at least commented.
private final List<Runnable> cleanupTasks = new ArrayList<>(); | |
private final List<Runnable> cleanupTasks = new ArrayList<>(); // needs a mutable list |
jabgui/src/main/java/org/jabref/gui/walkthrough/WalkthroughManager.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/WalkthroughManager.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/declarative/InfoBlockContentBlock.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/declarative/StepType.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/declarative/WalkthroughContentBlock.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/declarative/WalkthroughStep.java
Outdated
Show resolved
Hide resolved
@@ -113,5 +113,7 @@ public interface CliPreferences { | |||
|
|||
LastFilesOpenedPreferences getLastFilesOpenedPreferences(); | |||
|
|||
WalkthroughPreferences getWalkthroughPreferences(); |
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.
The new method 'getWalkthroughPreferences' should not return 'null'. It should use 'java.util.Optional' to handle the absence of a value, ensuring better null safety and avoiding potential null pointer exceptions.
So far I like the idea.
|
This refs #12664 somehow :) |
jabgui/src/main/java/org/jabref/gui/walkthrough/WalkthroughManager.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/WalkthroughUIFactory.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/declarative/NodeResolverFactory.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/WalkthroughOverlay.java
Outdated
Show resolved
Hide resolved
jablib/src/main/java/org/jabref/logic/preferences/JabRefCliPreferences.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/WalkthroughOverlay.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/Walkthrough.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/WalkthroughOverlay.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/WalkthroughOverlay.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/declarative/NodeResolverFactory.java
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/declarative/TextContentBlock.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/Walkthrough.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/Walkthrough.java
Outdated
Show resolved
Hide resolved
import org.slf4j.LoggerFactory; | ||
|
||
/** | ||
* Chooses the main directory for storing and searching PDF files in JabRef. |
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.
What does this have to do with the walkthrough? Stay focused on your project. Don't do any side issues that are not related with your project.
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.
@calixtus I think configuration of a paper directory was the first point in the description of the project statement in the wiki page, and also mentioned in the issue.
That being said, whether or not that should be a part of "this" PR is worth discussing.
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.
Please separate the prs. One thing is welcome walkthrough, the other is enhancements to welcome tab. And finish one first.
jabgui/src/main/java/org/jabref/gui/walkthrough/Walkthrough.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/Walkthrough.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/Walkthrough.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/Walkthrough.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/Walkthrough.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/Walkthrough.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/components/PaperDirectoryChooser.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/components/PaperDirectoryChooser.java
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/components/PaperDirectoryChooser.java
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/WalkthroughOverlay.java
Outdated
Show resolved
Hide resolved
if (!preferences.getWalkthroughPreferences().isCompleted()) { | ||
mainFrame.showWalkthrough(); | ||
} |
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.
The code directly accesses preferences to check walkthrough completion. This logic should be moved to org.jabref.logic to maintain a clean separation between GUI and logic layers.
private static final Color OVERLAY_COLOR = Color.rgb(0, 0, 0, 0.55); | ||
|
||
private final Pane pane; | ||
private Node targetNode; |
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.
The targetNode field is set to null in the detach method, which can lead to null pointer exceptions if accessed without checks. Consider using Optional to handle absence of a node.
jabgui/src/main/java/org/jabref/gui/walkthrough/WalkthroughRenderer.java
Show resolved
Hide resolved
@trag-bot didn't find any issues in the code! ✅✨ |
1 similar comment
@trag-bot didn't find any issues in the code! ✅✨ |
JUnit tests of You can then run these tests in IntelliJ to reproduce the failing tests locally. We offer a quick test running howto in the section Final build system checks in our setup guide. |
Closes N/A
Initial implementation of the walkthrough feature. See this Google Drive video for demonstration: https://drive.google.com/file/d/19sUz1XoSjP0UkuhUvKQE-MZjmVASy2ot/view?usp=sharing
The completion of the walkthrough is also tracked through modifying the preferences class.
This refs #12664
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if change is visible to the user)