-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
jabgui/src/main/java/org/jabref/gui/util/component/PulseAnimateIndicator.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/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
Outdated
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
jabgui/src/main/java/org/jabref/gui/walkthrough/Walkthrough.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/WalkthroughAction.java
Outdated
Show resolved
Hide resolved
@Yubo-Cao can you fix the failing tests - should be simple, both are related to localization. |
jabgui/src/main/java/org/jabref/gui/walkthrough/WalkthroughAction.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/declarative/step/PanelStep.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/declarative/step/PanelStep.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/WalkthroughAction.java
Outdated
Show resolved
Hide resolved
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.
First half of first iteration through review. More to come on the weekend.
jabgui/src/main/java/org/jabref/gui/walkthrough/SingleWindowWalkthroughOverlay.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/SingleWindowWalkthroughOverlay.java
Outdated
Show resolved
Hide resolved
int currentIndex = walkthrough.currentStepProperty().get(); | ||
|
||
for (int i = currentIndex - 1; i >= 0; i--) { | ||
WalkthroughStep previousStep = walkthrough.getStepAtIndex(i); |
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.
Why would dealing with an optional here force you to do something incorrect?
jabgui/src/main/java/org/jabref/gui/walkthrough/Walkthrough.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/walkthrough/WalkthroughAction.java
Outdated
Show resolved
Hide resolved
private final Stage stage; | ||
private final WalkthroughHighlighter walkthroughHighlighter; | ||
private final Walkthrough walkthrough; | ||
private @Nullable Timeline nodePollingTimeline; |
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.
Im not yet convinced that we have to do polling and that this is not solvable by an event being fired by javafx. Polling takes unnecessary resources.
*/ | ||
public class WalkthroughUpdater { | ||
private final List<Runnable> cleanupTasks = new ArrayList<>(); // has to be mutable | ||
private final Timeline updateTimeline = new Timeline(); |
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.
About polling...
overlay.displayStep(step); | ||
} | ||
|
||
public WalkthroughStep getStepAtIndex(int index) { |
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 If I call it with -1?
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.
Array index out of bounds.
Co-authored-by: Subhramit Basu <subhramit.bb@live.in>
@trag-bot didn't find any issues in the code! ✅✨ |
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)