Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 0 additions & 87 deletions .jvn/announcements.md

This file was deleted.

13 changes: 5 additions & 8 deletions docs/editor/core/engine-hub.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,13 @@ The hub exposes the main workspace actions as buttons:

The hub shows a compact status strip instead of a terminal-style output panel. Long task output is reduced to simple progress and completion messages.

## Maintenance And Announcements
## Maintenance State

The hub reads dynamic workspace state from committed files under `.jvn/`:
The hub reads launcher maintenance state from the committed `.jvn/maintenance.properties`
file. It currently supports `launcher.maintenance` and `launcher.message`.

| File | Purpose |
|------|---------|
| `.jvn/maintenance.properties` | Feature-level maintenance flags, currently including `launcher.maintenance` and `launcher.message` |
| `.jvn/announcements.md` | Hub announcement cards shown from the bell button |

The running hub re-reads both files after a successful **Update Engine** action. That means a launcher maintenance badge or announcement can appear or disappear after updating the engine without closing and reopening the hub.
The running hub re-reads this file after a successful **Update Engine** action, so the
launcher maintenance state can change without closing and reopening the hub.

When `launcher.maintenance=true`, the **Run Launcher** button stays visible but displays a striped maintenance state. Clicking it shows the configured message instead of launching the standalone launcher. The default committed state is `launcher.maintenance=false`, so the launcher opens normally.

Expand Down
25 changes: 25 additions & 0 deletions modules/editor/src/main/java/com/jvn/editor/EditorApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
import com.jvn.editor.ui.VnsDiagnosticsView;
import com.jvn.editor.ui.VnsFlowMapView;
import com.jvn.editor.ui.VnsScriptAnalyzer;
import com.jvn.editor.ui.WhatsNewCatalog;
import com.jvn.editor.ui.WhatsNewDialog;
import com.jvn.editor.ui.actioneditor.AnimationProject;
import com.jvn.editor.ui.actioneditor.CodeImporter;
import com.jvn.editor.ui.actioneditor.EntityTrack;
Expand Down Expand Up @@ -2201,6 +2203,8 @@ private void initializeEditorStage(Stage primaryStage) {
miOpenProjectDocs.setOnAction(e -> openProjectDocsFolder());
MenuItem miOpenWorkspaceDocs = new MenuItem("Open Workspace Docs Folder");
miOpenWorkspaceDocs.setOnAction(e -> openWorkspaceDocsFolder());
MenuItem miWhatsNew = new MenuItem("What's New in " + buildInfo.versionLabel());
miWhatsNew.setOnAction(e -> showWhatsNew(primaryStage, buildInfo));
MenuItem miAbout = new MenuItem("About JVN Editor");
miAbout.setOnAction(e -> {
EditorDialogs.show(primaryStage,
Expand All @@ -2214,6 +2218,7 @@ private void initializeEditorStage(Stage primaryStage) {
new SeparatorMenuItem(),
miOpenProjectDocs, miOpenWorkspaceDocs,
new SeparatorMenuItem(),
miWhatsNew,
miAbout);

mb.getMenus().addAll(
Expand Down Expand Up @@ -2541,6 +2546,7 @@ private void initializeEditorStage(Stage primaryStage) {
});
applyLinuxDefaultWindowState(primaryStage);
primaryStage.show();
Platform.runLater(() -> maybeShowWhatsNew(primaryStage, buildInfo));
installSidebarDividerHoverHints();
scene.setOnDragOver((DragEvent e) -> {
Dragboard db = e.getDragboard();
Expand Down Expand Up @@ -2583,6 +2589,25 @@ private void initializeEditorStage(Stage primaryStage) {
timer.start();
}

private void maybeShowWhatsNew(Window owner, AppBuildInfo.BuildInfo buildInfo) {
if (SAFE_MODE || editorPreferences == null || buildInfo == null) return;
String currentVersion = buildInfo.versionLabel();
if (!WhatsNewCatalog.shouldShow(
currentVersion,
editorPreferences.getLastSeenWhatsNewVersion())) {
return;
}

showWhatsNew(owner, buildInfo);
editorPreferences.setLastSeenWhatsNewVersion(currentVersion);
persistEditorPreferences();
}

private void showWhatsNew(Window owner, AppBuildInfo.BuildInfo buildInfo) {
if (buildInfo == null) return;
WhatsNewDialog.show(owner, WhatsNewCatalog.forVersion(buildInfo.versionLabel()));
}

private void doOpen(Stage stage) {
try {
FileChooser fc = new FileChooser();
Expand Down
32 changes: 28 additions & 4 deletions modules/editor/src/main/java/com/jvn/editor/JvnLauncherApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
import com.jvn.editor.ui.StartupSplashOverlay;
import com.jvn.editor.ui.ShutdownSplashOverlay;
import com.jvn.editor.ui.WelcomeCenterView;
import com.jvn.editor.ui.WhatsNewCatalog;
import com.jvn.editor.ui.WhatsNewDialog;

import javafx.animation.PauseTransition;
import javafx.application.Application;
Expand Down Expand Up @@ -290,7 +292,7 @@ private void initializeLauncherStage(Stage stage) {
statusBar.setOnOpenSettings(this::showLauncherSettings);
statusLabel.textProperty().bindBidirectional(statusBar.messageLabel().textProperty());

MenuBar menuBar = buildMenuBar();
MenuBar menuBar = buildMenuBar(buildInfo);
if (DEVELOPER_MODE) {
developerLogPanel = new DeveloperLogPanel("Logs", this::developerLogRoots);
root.setTop(new VBox(menuBar, developerLogPanel));
Expand Down Expand Up @@ -325,6 +327,7 @@ private void initializeLauncherStage(Stage stage) {
setCurrentProject(resolveStartupProject(), false);
refreshButtonState();
statusLabel.setText("Workspace: " + displayPath(workspaceRoot));
Platform.runLater(() -> maybeShowWhatsNew(buildInfo));
}

private static String startupLogLine(String level, String category, String detail) {
Expand Down Expand Up @@ -379,7 +382,7 @@ private String detail() {
}
}

private MenuBar buildMenuBar() {
private MenuBar buildMenuBar(AppBuildInfo.BuildInfo buildInfo) {
MenuBar menuBar = new MenuBar();
menuBar.getStyleClass().add("jvn-launcher-menubar");

Expand Down Expand Up @@ -447,11 +450,14 @@ private MenuBar buildMenuBar() {
menuView.setOnShowing(e -> syncTheme.run());

Menu menuHelp = new Menu("Help");
MenuItem miWhatsNew = new MenuItem("What's New in " + buildInfo.versionLabel());
miWhatsNew.setOnAction(e ->
WhatsNewDialog.show(primaryStage, WhatsNewCatalog.forVersion(buildInfo.versionLabel())));
MenuItem miAbout = new MenuItem("About JVN Launcher");
miAbout.setOnAction(e -> EditorDialogs.info(primaryStage,
"About JVN Launcher",
"JVN Launcher " + AppBuildInfo.resolve(JvnLauncherApp.class).fullLabel()));
menuHelp.getItems().add(miAbout);
"JVN Launcher " + buildInfo.fullLabel()));
menuHelp.getItems().addAll(miWhatsNew, miAbout);

menuBar.getMenus().addAll(menuFile, menuEdit, menuProject, menuView);
if (DEVELOPER_MODE) {
Expand All @@ -465,6 +471,24 @@ private MenuBar buildMenuBar() {
return menuBar;
}

private void maybeShowWhatsNew(AppBuildInfo.BuildInfo buildInfo) {
if (buildInfo == null || editorPreferences == null) return;
String currentVersion = buildInfo.versionLabel();
if (!WhatsNewCatalog.shouldShow(
currentVersion,
editorPreferences.getLastSeenWhatsNewVersion())) {
return;
}

WhatsNewDialog.show(primaryStage, WhatsNewCatalog.forVersion(currentVersion));
editorPreferences.setLastSeenWhatsNewVersion(currentVersion);
try {
editorPreferencesStore.save(editorPreferences);
} catch (Exception ex) {
statusLabel.setText("Could not remember the displayed release notes: " + ex.getMessage());
}
}

private void chooseProjectDirectory() {
DirectoryChooser chooser = new DirectoryChooser();
chooser.setTitle("Choose JVN Project Directory");
Expand Down
5 changes: 4 additions & 1 deletion modules/editor/src/main/java/com/jvn/editor/ui/AeroIcon.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public enum Kind {
LAYOUT, STORYBOARD, LAYERS, IMAGE_ATTRIBUTES, LIGHTING, VERSION_CONTROL,
PUPPETEER, SCRIPT_EDITOR, SETTINGS,
NEW_PROJECT, OPEN_PROJECT, RUN, BUILD, REFRESH, ENTRY_SCRIPT, MANIFEST,
README, DOCUMENTATION, REVEAL, ARROW_BACK, HELP, NO_PROJECT,
README, DOCUMENTATION, REVEAL, ARROW_BACK, HELP, WHATS_NEW, NO_PROJECT,
VNS_RUN_LABEL, VNS_RUN_ENTRY, VNS_SYMBOLS, VNS_SNIPPET, VNS_FIND,
VNS_COMMANDS, VNS_WORD_WRAP, VNS_DIFF, VNS_DIAGNOSTICS, VNS_PREVIEW
}
Expand Down Expand Up @@ -143,6 +143,7 @@ private static Region glyphFor(Kind kind, double size) {
case MANIFEST, README -> sized(CssIcon.document(color), size);
case ARROW_BACK -> sized(CssIcon.arrowLeft(color), size);
case HELP -> helpGlyph(size);
case WHATS_NEW -> sized(CssIcon.sparkles(color), size);
case NO_PROJECT -> noProjectGlyph(size);
};
if (kind != Kind.HELP && kind != Kind.NO_PROJECT && !isVnsCommand(kind)) {
Expand Down Expand Up @@ -731,6 +732,7 @@ private static Badge badgeFor(Kind kind, double size) {
case REFRESH -> new Badge(sized(CssIcon.check("#ffffff"), glyphSize), Color.web("#2789c5"));
case ARROW_BACK -> new Badge(sized(CssIcon.home("#ffffff"), glyphSize), Color.web("#c76328"));
case HELP -> new Badge(sized(CssIcon.questionMark("#ffffff"), glyphSize), Color.web("#397cc0"));
case WHATS_NEW -> new Badge(sized(CssIcon.check("#ffffff"), glyphSize), Color.web("#7654bd"));
case NO_PROJECT -> new Badge(sized(CssIcon.minus("#ffffff"), glyphSize), Color.web("#c97b2d"));
};
}
Expand Down Expand Up @@ -946,6 +948,7 @@ private static Palette paletteFor(Kind kind) {
case REFRESH -> palette("#7edbff", "#2471b3", "#d7f5ff");
case ARROW_BACK -> palette("#ffb55d", "#b74c15", "#ffe0b0");
case HELP -> palette("#a9e5fb", "#235b82", "#f1fbff");
case WHATS_NEW -> palette("#c5b6ff", "#5f449e", "#f0ebff");
case NO_PROJECT -> palette("#d8e7f0", "#344b5c", "#edf8ff");
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public final class EditorPreferences {
private boolean launcherConfirmRunProject;
private boolean launcherRuntimePerfHud;
private boolean gradleSkipTestsOnRun;
private String lastSeenWhatsNewVersion = "";
private final EnumMap<EditorSidebarPanel, EditorPanelPlacement> panelPlacements =
new EnumMap<>(EditorSidebarPanel.class);
private final EnumMap<EditorSidebarPanel, Boolean> chooserVisibility =
Expand Down Expand Up @@ -279,6 +280,14 @@ public void setGradleSkipTestsOnRun(boolean gradleSkipTestsOnRun) {
this.gradleSkipTestsOnRun = gradleSkipTestsOnRun;
}

public String getLastSeenWhatsNewVersion() {
return lastSeenWhatsNewVersion;
}

public void setLastSeenWhatsNewVersion(String lastSeenWhatsNewVersion) {
this.lastSeenWhatsNewVersion = cleanText(lastSeenWhatsNewVersion);
}

public EditorPanelPlacement getPlacement(EditorSidebarPanel panel) {
if (panel == null) return EditorPanelPlacement.HIDDEN;
EditorPanelPlacement placement = panelPlacements.getOrDefault(panel, panel.defaultPlacement());
Expand Down Expand Up @@ -386,6 +395,7 @@ public EditorPreferences copy() {
c.centerDividerRight = this.centerDividerRight;
c.activeLeftTab = this.activeLeftTab;
c.activeRightTab = this.activeRightTab;
c.lastSeenWhatsNewVersion = this.lastSeenWhatsNewVersion;
c.statusBarVisibility.clear();
c.statusBarVisibility.putAll(this.statusBarVisibility);
return c;
Expand Down
Loading
Loading