Skip to content

Conversation

@Joe3112
Copy link
Contributor

@Joe3112 Joe3112 commented Nov 8, 2025

The initial Desktop version will include the same features as the mobile one and support keyboard navigation between elements with useful shortcuts to streamline user experience.

Add the `org.jetbrains.compose.material3.adaptive` dependency to the project.
This will be used to improve the layout for different screen sizes.

Also, minor code cleanup in the `App.kt` file, removing an unused import and an unnecessary `KoinContext` wrapper.
This commit migrates the project from Jetpack Navigation 2 to Navigation3.

Key changes include:
*   Updating Gradle dependencies to use `navigation3` and related artifacts like `lifecycle-viewmodel-navigation3`.
*   Replacing `NavHost` with the new `NavDisplay` and `NavBackStack` for navigation management.
*   Refactoring screen routing logic, renaming `Screen` to `AppRoute` and making it implement `NavKey`.
*   Updating package structure from `domain.nav` to `domain.navigation`.
*   Adding a temporary JetBrains Compose dev Maven repository for the new dependencies.
This commit migrates the project from a Decompose-based navigation to Jetpack Navigation3 to support adaptive layouts.

Key changes:
*   **Dependencies:**
    *   Removes `decompose` and `essenty` dependencies.
    *   Adds `androidx.navigation3` and `compose.material3.adaptive.navigation3`.
    *   Adds the `hot-reload` plugin for desktop development.
*   **Navigation Refactoring:**
    *   Replaces the previous navigation host with `NavDisplay` from Navigation3, managed by a `NavBackStack`.
    *   Introduces `ListDetailSceneStrategy` to enable a list-detail layout for larger screens.
    *   `TaskChat` is now configured as the detail pane.
*   **Screen and Routing:**
    *   `SettingScreen` is removed and its routes are nested within a sealed `Settings` class, which now implements `AppRoute`.
    *   Navigation logic is updated to use the new `Settings` routes.
    *   Removes unused `BackHandlerExtensions`.
*   **UI and Code Cleanup:**
    *   Minor cleanup in `App.kt` and `MainActivity.kt`, removing an unnecessary `KoinContext` wrapper.
    *   Simplifies `MoleculeViewModel` by removing the `onSaveState` callback from the model's flow.
This commit introduces several features and improvements:

*   **Desktop Tray Icon**: The desktop application now minimizes to the system tray when the window is closed, with an option to exit the application from the tray menu.
*   **Keyboard Navigation**: Added keyboard navigation using arrow keys and the Tab key to move focus between tasks and scopes in the home and schedule screens.
*   **UI Enhancements**:
    *   The placeholder text in the detail pane is now centered and uses the `surfaceContainer` color.
    *   The `NavigationSuiteScaffold` now uses the `surfaceContainer` color for its background.
*   **Bug Fix**: A bug was fixed where the task input field would remain active after deselecting tasks. The `ResetHomeState` event now also hides the task input.
*   **Dependencies**: Added the `foojay-resolver-convention` plugin to `settings.gradle.kts` for managing toolchains.
This commit updates several compose multiplatform dependencies to newer versions and adapts the code to the resulting API changes.

Key changes include:
*   Updating `org.jetbrains.compose` from `1.10.0-alpha03` to `1.10.0-beta01`.
*   Updating `navigation3` from `1.0.0-alpha03` to `1.0.0-alpha04`.
*   Updating `compose-material3-adaptive` dependencies to version `1.3.0-alpha01`.
*   Setting a `defaultPanePreferredWidth` in `MoreStuffNavHost.kt` to adapt to the updated adaptive navigation API.
*   Passing a modifier to `HomeScreen` and `MoreStuffHomeScaffold` to be applied to the root composable.
…add keyboard for creating new tasks and delete.

This commit refactors the `InputItem` composable to be stateless by hoisting its `TextFieldValue` state up to its parent composables, `HomeContent` and `ImportScreen`.

This change improves state management and enables the following new features:

*   **Keyboard Shortcuts:**
    *   Adds a shortcut (`Cmd/Ctrl` + `Backspace`) to delete selected tasks from the main task list.
    *   Adds a shortcut (`Cmd/Ctrl` + `Enter`) to create a task from the input field.
    *   Adds a shortcut (`Cmd/Ctrl` + `N`) to open the task input field.
*   **State Restoration:** The text in the input field is now preserved across configuration changes.
This commit introduces several focus management improvements and keyboard shortcuts to enhance user experience, particularly for keyboard navigation.

Key changes:
*   Added `Cmd/Ctrl + Enter` keyboard shortcut to send messages in the task chat screen.
*   Added `Escape` key shortcut to move focus out of the message input field.
*   Disabled focus on the `FloatingActionButton` on the home screen, the `TopAppBar` in the task chat, and the messages list to create a more predictable keyboard navigation flow.
This commit introduces several enhancements to keyboard navigation and user input handling.

Key changes:
*   Clears the task input field after a task is created.
*   Improves keyboard focus management:
    *   Adds Escape key support to hide the task input and move focus.
    *   Adds Tab and arrow key navigation within the `ScopeContent`.
    *   Prevents the "Let's Go" button in the empty state from being focusable.
*   Enables showing the context menu on a user chat message with a double-click.
*   Minor code cleanup, removing unused newlines.
This commit integrates the JetBrains Jewel component library to enhance the desktop application's user interface, replacing the default Compose for Desktop window with Jewel's `DecoratedWindow`.

Key changes include:
*   Adding `jewel-int-ui-standalone`, `jewel-int-ui-decorated-window`, and `platformtools-core` dependencies.
*   Replacing the standard `Window` with Jewel's `DecoratedWindow` and `IntUiTheme` for an IntelliJ-style look and feel.
*   Adding a `TitleBar` with the application name.
*   Excluding the default `org.jetbrains.compose.material` group from `compose.desktop.currentOs` to avoid conflicts.
Key changes include:
*   Using `isSystemInDarkTheme` to detect the current system theme.
*   Dynamically selecting the appropriate Jewel theme (`darkThemeDefinition` or `lightThemeDefinition`) based on the system setting.
*   Applying the correct color to the window's title bar text to ensure visibility in both dark and light modes.
*   Refactoring the initial state of the `NavigationSuiteScaffold` to always start hidden, simplifying the logic.
This commit introduces a maximum width for chat messages to prevent them from spanning the entire screen width on larger displays, improving readability.

Key changes include:
*   Using `BoxWithConstraints` in `ChatMessages.kt` to calculate a maximum width for chat items, set to 80% of the screen width.
*   Refactoring `UserChatItem.kt` to use a `Box` with `Alignment.TopEnd` for better control over the layout.
*   Applying the new width constraint to the `UserChatItem`.
*   Extracting the `RoundedCornerShape` for user messages into a private function for reuse.
In `ChatMessages.kt`, wrap the `DateTimeItem` and the `when` block that renders different chat item types within a single `Column`. This ensures that the date-time separator and the message it corresponds to are grouped together logically within the layout.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants