Commit e1fcdb1
Welcome screen implementation (#1307)
* Remove ContributionManager and ContributionPane UI files
Deleted ContributionManager.kt and ContributionPane.kt from the contrib/ui directory. This removes the Compose-based contributions manager and its detail pane prototypes which got merged unnecessarily
* Enhance Preferences reactivity and test coverage
Refactored ReactiveProperties to use snapshotStateMap for Compose reactivity. Improved PreferencesProvider and watchFile composables with better file watching, override support via system properties, and added documentation. Updated PreferencesKtTest to use temporary files and verify file-to-UI reactivity.
* Small bugfix for removed function
* Add compose ui test to the deps
* Refactor theme system to Material 3 color schemes
Replaces legacy color definitions with Material 3 color schemes and introduces extended color support for warnings. Dialogs in Messages.kt are now implemented using Compose Material 3 components for a modern UI. Removes deprecated color sets and updates PDETheme to use new color schemes, improving consistency and maintainability.
* Add PDEWelcome Composable UI screen
Introduces a new PDEWelcome.kt file with a Composable UI for the Processing welcome screen. Includes layout with buttons for language selection, new sketch, examples, and sketchbook, as well as a placeholder for right-side content and a main entry point for launching the window.
* Initial layout
* Revamp welcome screen UI and add social icons
Refactors the PDEWelcome screen to improve layout, update button icons, and add support for Discord, GitHub, and Instagram SVG icons. The welcome screen now receives a Base instance for proper action handling, and new methods replace deprecated ones in Base.java. Updates related menu actions to pass the Base instance as needed.
* Add example previews to welcome screen
Replaces placeholder text on the right side of the PDEWelcome screen with a LazyColumn displaying example sketches. Each example attempts to show a preview image if available, or a placeholder icon otherwise. Introduces an Example data class and related image loading logic.
* Add hover-activated play button to example previews
Introduced a hover effect on example preview images in the welcome screen, displaying a play button that opens the example when clicked. Refactored title key usage for consistency.
* Localize welcome screen UI strings
Replaced hardcoded strings in the PDEWelcome screen with localized values using the LocalLocale context. Added new keys for the welcome screen to the English and Dutch language property files to support internationalization.
* Add language selector and UI improvements to welcome screen
Introduces a language selection dropdown to the PDE welcome screen using a shared composable from preferences. Refactors the layout for better spacing, updates example cards with animated overlays, and replaces the show-on-startup button with a checkbox. Also adds a new translation key for the open example button.
* Refactor example listing and randomize welcome sketches
Moved example folder listing logic in Contributions.ExamplesList to a companion object function for reuse. Updated PDEWelcome to display a randomized selection of sketches from all available examples, replacing the previous static list.
* Refactor example handling to use Sketch objects
Replaces Example objects with Sketch objects for managing example sketches in the welcome screen. Updates all relevant usages to reference Sketch properties, simplifying the code and improving clarity.
* Add vertical scrollbar to welcome screen examples
Introduces a VerticalScrollbar to the examples list in the PDEWelcome screen for improved navigation. Also adjusts spacing and arrangement in several UI components for better layout consistency, and updates the welcome screen title in the language properties.
* Add rounded corners to buttons in PDEWelcome
Introduced a RoundedCornerShape with 12.dp radius and applied it to various buttons in the PDEWelcome screen for improved UI consistency and aesthetics.
* Refactor PDEWelcome UI and add Sketch card composable
Refactored the PDEWelcome screen for improved structure and readability, including extracting the example preview into a reusable Sketch.card composable. Updated icon usage for RTL support, adjusted layout and padding, and improved the examples list initialization. Also, customized scrollbar style in PDETheme for a more consistent UI appearance.
* Add unique window handling to prevent duplicates
Introduces a 'unique' parameter to PDESwingWindow and PDEComposeWindow, allowing windows to be identified by a KClass and preventing multiple instances of the same window. If a window with the same unique identifier exists, it is brought to the front and the new one is disposed. This helps avoid duplicate welcome or other singleton windows.
* Refactor dialog handling and improve AlertDialog UI
Refactored the showDialog function to accept a modifier and updated all AlertDialog usages to use RectangleShape and the modifier parameter. Improved dialog sizing and positioning by dynamically adjusting the window size based on content, and set additional window properties for better integration on macOS.
* Set application window icon using Toolkit.setIcon
Added calls to Toolkit.setIcon(window) in Start.kt and Window.kt to ensure the application window icon is set consistent
* Simplify imports and update scrollbar colors in Theme.kt
Consolidated import statements for Compose libraries using wildcard imports to reduce verbosity. Updated scrollbar hover and unhover colors to use the default outlineVariant color without alpha modification.
* Removing the Preferences work to keep the PR clean
* Update background color in PDEWelcome UI
Changed the background color from surfaceContainerLow to surfaceContainerLowest in the PDEWelcome composable for improved visual consistency with the MaterialTheme.
* Tweak welcome actions naming and order
- Rename `Empty Sketch` to `New Sketch`
- Rename `Sketchbook` to `My Sketches`
- Move `Open Examples` below `My Sketches`
* Rather than setting the decorations app wide, just modify the editor screen
---------
Co-authored-by: Raphaël de Courville <groupes.raphael@gmail.com>1 parent e9b381b commit e1fcdb1
File tree
24 files changed
+1545
-1007
lines changed- app
- ant/processing/app/ui
- src
- main/resources/icons
- processing/app
- api
- platform
- ui
- preferences
- theme
- m3
- java/src/processing/mode/java
24 files changed
+1545
-1007
lines changedFile renamed without changes.
File renamed without changes.
Loading
Loading
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | 26 | | |
38 | 27 | | |
39 | 28 | | |
40 | 29 | | |
41 | 30 | | |
42 | 31 | | |
43 | | - | |
44 | 32 | | |
45 | | - | |
| 33 | + | |
46 | 34 | | |
47 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
375 | 376 | | |
376 | 377 | | |
377 | 378 | | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
| 379 | + | |
385 | 380 | | |
386 | 381 | | |
387 | 382 | | |
| |||
609 | 604 | | |
610 | 605 | | |
611 | 606 | | |
612 | | - | |
| 607 | + | |
613 | 608 | | |
614 | 609 | | |
615 | 610 | | |
| |||
1885 | 1880 | | |
1886 | 1881 | | |
1887 | 1882 | | |
1888 | | - | |
| 1883 | + | |
1889 | 1884 | | |
1890 | 1885 | | |
1891 | 1886 | | |
| |||
2191 | 2186 | | |
2192 | 2187 | | |
2193 | 2188 | | |
2194 | | - | |
| 2189 | + | |
| 2190 | + | |
| 2191 | + | |
| 2192 | + | |
2195 | 2193 | | |
2196 | 2194 | | |
2197 | 2195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
21 | 32 | | |
| 33 | + | |
22 | 34 | | |
23 | 35 | | |
24 | 36 | | |
25 | 37 | | |
26 | 38 | | |
27 | 39 | | |
| 40 | + | |
| 41 | + | |
28 | 42 | | |
29 | 43 | | |
30 | 44 | | |
| |||
270 | 284 | | |
271 | 285 | | |
272 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
273 | 318 | | |
274 | 319 | | |
275 | 320 | | |
| |||
0 commit comments