|
| 1 | +--- |
| 2 | +parent: Code Howtos |
| 3 | +--- |
| 4 | + |
| 5 | +# Walkthrough |
| 6 | + |
| 7 | +All walkthroughs are written using the internal declarative API (see `org.jabref.gui.walkthrough.declarative`) and are |
| 8 | +defined in the `WalkthroughAction` class. Each walkthrough is a linear series of steps, where each step is either a UI |
| 9 | +highlight (`VisibleComponent`) or an invisible side effect (`WalkthroughSideEffect`). The walkthroughs are built using a |
| 10 | +builder API (`Walkthrough.Builder`). To launch a walkthrough, simply construct a new `WalkthroughAction` and pass the |
| 11 | +name of the desired walkthrough. |
| 12 | + |
| 13 | +The `WalkthroughOverlay` renderer takes the output of the declarative API (`Walkthrough`) and renders it for the user. |
| 14 | +At a high level, a walkthrough primarily highlights GUI elements (nodes in the scene graph). |
| 15 | + |
| 16 | +The following step types are supported: |
| 17 | + |
| 18 | +## Highlights |
| 19 | + |
| 20 | +1. `Ring`: Shows a small, accent-colored circle in the upper-right corner of the node to be highlighted. |
| 21 | +  |
| 22 | +2. `Spotlight`: Highlights the node of interest by darkening the rest of the window. |
| 23 | +  |
| 24 | +3. `FullScreenDarken`: Darkens the entire window, typically to display a panel in the center. |
| 25 | +  |
| 26 | + |
| 27 | +## Visual Steps |
| 28 | + |
| 29 | +1. `TooltipStep`: Shows a tooltip next to a specified node. This step must be associated with a node to display |
| 30 | + correctly. |
| 31 | +  |
| 32 | +2. `PanelStep`: Shows a panel with rich text and info boxes on the top, left, bottom, or right of the screen. |
| 33 | +  |
| 34 | + |
| 35 | +## Side Effects |
| 36 | + |
| 37 | +1. `OpenLibrarySideEffect`: Opens a specified example library. |
| 38 | +2. `EnsureSearchSettingsSideEffect`: Forces a search preference into a desired state. |
| 39 | + |
| 40 | +All walkthroughs are currently launched from the `Walkthroughs` component, which is located exclusively on the |
| 41 | +`WelcomeTab`. |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | +## Quick Settings |
| 46 | + |
| 47 | +Since walkthroughs are only supposed to highlight UI components and guide the user through JabRef, quick settings are |
| 48 | +create so as to provide a convenient entry point for the user to edit the common settings like theme, online services, |
| 49 | +and main file directory. All the quick settings items are present in the `org.jabref.gui.welcome.components.QuickSettings` |
| 50 | +component, which is visible in the `WelcomeTab`. |
| 51 | + |
| 52 | + |
0 commit comments