16456 Commits

Author SHA1 Message Date
Raphaël de Courville
0a113f7c9e Merge pull request #1387 from processing/all-contributors/add-madhav2348
docs: add madhav2348 as a contributor for code
2026-01-20 14:45:41 +01:00
allcontributors[bot]
4727d6c277 docs: update .all-contributorsrc [skip ci] 2026-01-20 13:45:13 +00:00
allcontributors[bot]
422ac5afe5 docs: update CONTRIBUTORS.md [skip ci] 2026-01-20 13:45:12 +00:00
Stef Tervelde
df585defc6 Added rebuildToolList() to fix nullpointer in contributions check (#1381) processing-1312-4.5.1 2026-01-16 09:55:14 -05:00
Stef Tervelde
02f8b39c1c use starting to fully remove the window (#1382) 2026-01-16 09:53:44 -05:00
Stef Tervelde
1af2eb7348 Make CapturePreferences only keep track of changes (#1383)
Before `CapturePreferences` would override `LocalPreferences` and halt any changes upstream until `apply` was called, now it will let those changes slip through so we get immediate feedback on changes made in the preferences screen.
2026-01-16 09:53:16 -05:00
Stef Tervelde
aaa3f75362 Create PreferencesEvents to glue into base and other deps (#1386)
To avoid creating dependencies within Preferences.kt, create an event structure that will listen to changes triggered by saving the Preferences.
2026-01-16 09:52:40 -05:00
Stef Tervelde
8466ee1ee0 Instant Locale Updatee (#1384)
Keep track of locale updates within the Process so that when the user changes the locale, that is immediately reflected within the app and later within other instances of Processing when the watch file kicks off the reload
2026-01-16 09:51:52 -05:00
Stef Tervelde
4edb29ad10 Refactor Other preferences registration logic (#1379)
Made sure the logic for displaying experimental settings runs regardless of the visibility of the toggle
2026-01-14 16:57:39 -05:00
Stef Tervelde
ac09bfe79e Fixed an issue where the stream was left open (#1380) 2026-01-14 16:56:03 -05:00
Madhav Majumdar
621d9900b5 Migration of the svg library to Gradle (#1289)
* Update svg build.gradle.kts

* update variable legacyLibraries and libraries
2026-01-14 16:54:27 -05:00
Stef Tervelde
76b9bae923 Refactor locale resource loading logic (#1364)
Read the locale strings as UTF-8
2026-01-08 13:31:18 -05:00
Stef Tervelde
edaf153ba4 Fix tabbing issue with textfields (#1367) 2025-12-23 08:34:56 -08:00
Stef Tervelde
9290fe9cff Refactor splash screen launch logic in Start.kt (#1357)
Simplifies the splash screen logic by removing coroutine delays and instead using a LaunchedEffect to trigger Base.main after the splash animation completes. The splash window now closes automatically when a new window is opened, improving startup flow and reliability.
2025-12-20 09:14:41 -08:00
Stef Tervelde
26c53c9656 Welcome Screen + Prefs QA (#1362)
Set the default editor theme to automatic in defaults.txt. Added a slight delay in file watching to reduce CPU usage. Enhanced the WelcomeSurvey UI with a border for better visual feedback. Refactored zoom preference handling in Interface.kt to use lambdas for up-to-date values.
processing-1311-4.5.0
2025-12-18 06:59:56 -08:00
Stef Tervelde
f85e3bc73d Load supported locales from locales.txt file (#1360)
Refactors Language.listSupported() to read supported language codes from a new locales.txt resource file instead of scanning available locales.
2025-12-16 08:49:54 -08:00
Stef Tervelde
f8e1d97652 Merge pull request #1356 from Stefterv/fix-save-on-quit
Reload legacy Preferences after saving
2025-12-12 15:38:31 +01:00
Stef Tervelde
18066a8026 Reload legacy Preferences after saving
Calls Preferences.init() after saving preferences to ensure legacy Preferences are reloaded and kept in sync with the latest changes. Otherwise the new preferences state from compose would be overridden from the legacy system
2025-12-12 08:27:05 +01:00
Stef Tervelde
201cab606d New Preferences Screen (#1318)
* 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 Locale class and add LocaleProvider test

* Make setLocale parameter nullable in Locale class

Changed the setLocale parameter in the Locale class to be nullable and updated its usage to safely invoke it. This allows for more flexible instantiation when a setLocale function is not required.

* Add compose ui test to the deps

* Update locale change method in test

Replaces the call to locale.setLocale with locale.set in LocaleKtTest to match the updated API for changing the locale.

* Add PDE window utilities for Compose and Swing

Introduces PDESwingWindow and PDEComposeWindow classes to simplify creating themed and localized windows in Compose and Swing applications. Includes macOS-specific handling for full window content and localization support for window titles.

* Refactor beta welcome window handling

Replaces custom JFrame setup in WelcomeToBeta with PDESwingWindow and PDEComposeWindow, centralizing window logic and close handling. Adds onClose callback to PDESwingWindow for improved lifecycle management. Also ensures beta welcome preference is reset on forced update check.

* Remove ContributionManager and ContributionPane UI files (#1276)

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

* Refactor Locale class and add LocaleProvider test (#1283)

* Refactor Locale class and add LocaleProvider test

* Make setLocale parameter nullable in Locale class

Changed the setLocale parameter in the Locale class to be nullable and updated its usage to safely invoke it. This allows for more flexible instantiation when a setLocale function is not required.

* Add compose ui test to the deps

* Update locale change method in test

Replaces the call to locale.setLocale with locale.set in LocaleKtTest to match the updated API for changing the locale.

* Theming (#1298)

* Add Material3-based Processing theme and typography

Introduces Colors.kt with custom color schemes for light and dark themes using Material3. Refactors Theme.kt to use Material3 theming, adds a PDETheme composable, and provides a desktop preview app for theme components. Updates Typography.kt to use Space Grotesk font family and defines new typography styles for Material3.

* Refactor to use Material3 and update theme usage

Replaces Material2 components with Material3 in WelcomeToBeta, removes custom PDEButton in favor of Material3 Button, and updates theme usage to PDETheme. Also simplifies background modifier in PDETheme and removes unused Kotlin Multiplatform plugin from build.gradle.kts.

* Add Space Grotesk font files and license

Includes SpaceGrotesk font variants (Bold, Light, Medium, Regular, SemiBold) and the associated SIL Open Font License. This enables usage of the Space Grotesk typeface in the project.

* Update markdown renderer to m3 and adjust UI

Switched markdown renderer imports from m2 to m3 and updated the dependency version to 0.37.0. Adjusted WelcomeToBeta window size, layout, and logo dimensions for improved appearance. Ensured Box in Theme.kt fills available space for better layout consistency.

* Switch from ProcessingTheme to PDETheme in window UI

Replaces the use of ProcessingTheme with PDETheme in the PDEWindowContent composable

* Refactor preferences to Jetpack Compose UI

Replaces the legacy PreferencesFrame with a new Jetpack Compose-based preferences UI. Adds reactive preferences management using a custom ReactiveProperties class, and introduces modular preference groups (General, Interface, Other) with composable controls. Updates Base.java to launch the new preferences window, and refactors theme and window code for Compose integration.

* Remove obsolete TODO for onClose callback

* 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.

* Clean up handlePrefs method by removing comments

Removed commented-out code for preferences frame initialization.

* 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.

* Composable Preferences rewrite (#1277)

* 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

* 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.

* Preferences screen

Adds most of the options for the preferences screen based on the new design

* Replace Row with Column in sketch naming options

Changed the layout container from Row to Column for the sketch naming options in the General preferences UI. This improves vertical arrangement and removes unnecessary padding modifiers.

* Enhance preferences UI and add memory options

Refactored preferences UI to swap primary and tertiary colors, improved sidebar button color handling, and updated search bar logic. Added clickable folder icon for sketchbook location selection. Improved interface scale slider logic and display. Added new preferences for increasing available memory and max memory, with enable/disable logic. Updated experimental preferences to use localized description keys if available. Extended ShimAWT to support folder selection via callback and refactored file/folder selection logic for better composability. Updated language properties with new preference keys and descriptions.

* Fixed a color issue

* Improve preferences UI layout and window size

Increased the preferences window width from 800 to 850 pixels for better layout. Updated the General preferences to display FilterChip options in rows with spacing, improving visual organization and usability.

* Add theme selection and UI improvements to preferences

Introduces a theme selector for the editor in the Interface preferences, allowing users to choose between system, dark, and light themes. Updates Coding and General preferences with improved layout and feedback, including a copied state for diagnostics. Updates localization strings to support new features and labels.

* Added the ability to undo the changes + icon/language changes

* Update animation spec for slideInVertically

Changed the animationSpec for slideInVertically from a 500ms EaseOutBounce to a 300ms default tween for consistency and smoother transitions.

* 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>

* Replace ProcessingTheme with PDETheme in WelcomeSurvey

* Add Material Theme Builder file headers

Added autogenerated file headers to Color.kt and Theme.kt indicating they were generated by the Material Theme Builder tool and should not be edited directly. Also reordered imports in Theme.kt for consistency.

* Fix preferences file override and update test property

Corrects the logic for selecting the preferences file in PreferencesProvider to use the override if present. Updates the test to set the correct system property for the settings folder.

* Update Theme.kt

* Normalize backward slashes in preferences file

Added logic to replace backward slashes with forward slashes in the preferences file to ensure consistent path formatting. Updated tests to verify the normalization behavior.

* Add support for preferences file override and path normalization

Allows overriding the preferences file location via the 'processing.app.preferences.file' system property. Also normalizes slashes in preference values to forward slashes. Updates tests to verify path normalization and override behavior.

---------

Co-authored-by: Raphaël de Courville <groupes.raphael@gmail.com>
2025-12-10 19:33:09 -05:00
Stef Tervelde
1237c55ece Welcome screen (#1353)
* Refactor Locale class and add LocaleProvider test

* Make setLocale parameter nullable in Locale class

Changed the setLocale parameter in the Locale class to be nullable and updated its usage to safely invoke it. This allows for more flexible instantiation when a setLocale function is not required.

* Add compose ui test to the deps

* Update locale change method in test

Replaces the call to locale.setLocale with locale.set in LocaleKtTest to match the updated API for changing the locale.

* Add PDE window utilities for Compose and Swing

Introduces PDESwingWindow and PDEComposeWindow classes to simplify creating themed and localized windows in Compose and Swing applications. Includes macOS-specific handling for full window content and localization support for window titles.

* Refactor beta welcome window handling

Replaces custom JFrame setup in WelcomeToBeta with PDESwingWindow and PDEComposeWindow, centralizing window logic and close handling. Adds onClose callback to PDESwingWindow for improved lifecycle management. Also ensures beta welcome preference is reset on forced update check.

* Remove ContributionManager and ContributionPane UI files (#1276)

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

* Refactor Locale class and add LocaleProvider test (#1283)

* Refactor Locale class and add LocaleProvider test

* Make setLocale parameter nullable in Locale class

Changed the setLocale parameter in the Locale class to be nullable and updated its usage to safely invoke it. This allows for more flexible instantiation when a setLocale function is not required.

* Add compose ui test to the deps

* Update locale change method in test

Replaces the call to locale.setLocale with locale.set in LocaleKtTest to match the updated API for changing the locale.

* Theming (#1298)

* Add Material3-based Processing theme and typography

Introduces Colors.kt with custom color schemes for light and dark themes using Material3. Refactors Theme.kt to use Material3 theming, adds a PDETheme composable, and provides a desktop preview app for theme components. Updates Typography.kt to use Space Grotesk font family and defines new typography styles for Material3.

* Refactor to use Material3 and update theme usage

Replaces Material2 components with Material3 in WelcomeToBeta, removes custom PDEButton in favor of Material3 Button, and updates theme usage to PDETheme. Also simplifies background modifier in PDETheme and removes unused Kotlin Multiplatform plugin from build.gradle.kts.

* Add Space Grotesk font files and license

Includes SpaceGrotesk font variants (Bold, Light, Medium, Regular, SemiBold) and the associated SIL Open Font License. This enables usage of the Space Grotesk typeface in the project.

* Update markdown renderer to m3 and adjust UI

Switched markdown renderer imports from m2 to m3 and updated the dependency version to 0.37.0. Adjusted WelcomeToBeta window size, layout, and logo dimensions for improved appearance. Ensured Box in Theme.kt fills available space for better layout consistency.

* Switch from ProcessingTheme to PDETheme in window UI

Replaces the use of ProcessingTheme with PDETheme in the PDEWindowContent composable

* Refactor preferences to Jetpack Compose UI

Replaces the legacy PreferencesFrame with a new Jetpack Compose-based preferences UI. Adds reactive preferences management using a custom ReactiveProperties class, and introduces modular preference groups (General, Interface, Other) with composable controls. Updates Base.java to launch the new preferences window, and refactors theme and window code for Compose integration.

* Remove obsolete TODO for onClose callback

* Clean up handlePrefs method by removing comments

Removed commented-out code for preferences frame initialization.

* Composable Preferences rewrite (#1277)

* 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

* 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>

* Replace ProcessingTheme with PDETheme in WelcomeSurvey

* Add Material Theme Builder file headers

Added autogenerated file headers to Color.kt and Theme.kt indicating they were generated by the Material Theme Builder tool and should not be edited directly. Also reordered imports in Theme.kt for consistency.

* Fix preferences file override and update test property

Corrects the logic for selecting the preferences file in PreferencesProvider to use the override if present. Updates the test to set the correct system property for the settings folder.

* Added survey button to the new welcome screen

---------

Co-authored-by: Raphaël de Courville <groupes.raphael@gmail.com>
2025-12-09 10:14:01 -05:00
Stef Tervelde
467cee749b Rewrite of the Base.getSettingsFolder() and Platform.getSettingsFolder() (#1335)
* Rewrite of the `Base.getSettingsFolder()` and `Platform.getSettingsFolder()`

Rewrote both function so they fit into a single file, negating the need for hopping around when looking into what this functionality does.

Also rewrote it so it is no longer generates random awt windows through the `Messages` class

* Fixed issue with missing /

* Added both options for overrides

- Added the previous settings override in base again
- Added a system property to override the settings folder within tests

* Add support for portable settings detection

Introduces logic to detect a preferences.txt file in the same folder as the running executable or jar. If found, settings are loaded from this location, improving portability and allowing users to override default settings without modifying system directories.
2025-12-05 14:26:01 -05:00
Stef Tervelde
ef226c9ec6 Merge pull request #1349 from Stefterv/fix-compose-language
Fix compose `Locale`
2025-12-03 10:45:31 +01:00
Stef Tervelde
3e466386bb Survey indicator (#1348)
* Add welcome survey to Welcome screen

Introduces a new Compose-based survey component to the Welcome screen via WelcomeSurvey.kt. Refactors Welcome.java to include the survey, and updates PDEButton in WelcomeToBeta.kt to support a modifier and proper content color handling.

* Make survey card clickable and remove button

Replaces the separate 'Take Survey' button with a clickable survey card that opens the survey URL. Adds pointer hover icon for better UX and updates the survey message text.

* Localize welcome survey text and fix resource paths

Added localized strings for the welcome survey title and description in PDE.properties. Updated WelcomeSurvey.kt to use these localized strings. Fixed resource loading paths in Locale.kt to correctly reference the 'languages' directory.

* Add welcome survey translations to language files

Introduced 'welcome.survey.title' and 'welcome.survey.description' keys to multiple language property files, providing localized text for the community survey prompt in Arabic, German, French, Italian, Japanese, Dutch, and Chinese. This improves internationalization support for the welcome survey feature.
2025-12-02 15:13:46 -05:00
Stef Tervelde
ad03e6a1f2 Fix compose Locale 2025-11-27 15:51:32 +01:00
Stef Tervelde
023bfd2896 Decoupling Base.getSketchbookFolder() (#1334)
* Decoupling sketchbook

* Added settings override

* Revert "Added settings override"

This reverts commit 387aa8e9cf.

* Moved sketchbook override

* Using assertEquals

* Stop using the private field internally
2025-11-26 16:27:13 -05:00
Stef Tervelde
d1641a22a5 Also look into the modules folder for native jars (#1345) 2025-11-26 16:22:52 -05:00
Stef Tervelde
0491c4d6d7 Add .kotlin to gitignore (#1333)
Add .kotlin to gitignore as these are build files and should not be commited
2025-11-19 16:03:07 -05:00
Raphaël de Courville
11f1a1e666 Add AGENTS.md and AI usage policy (#1319)
* Rename CODE-OF-CONDUCT.md to CODE_OF_CONDUCT.md

* Add AI usage policy documentation

Introduces AI_USAGE_POLICY.md outlining rules for AI-assisted contributions.

* Add AGENTS.md

Introduces AGENTS.md to define policies and instructions for automated coding agents.

* Add mention of AI_USAGE_POLICY.md and AGENTS.md to README
2025-11-10 17:11:10 -05:00
Raphaël de Courville
ce2e420865 Merge pull request #1317 from processing/SableRaf-build-troubleshooting-clear 2025-11-07 12:36:37 +01:00
Raphaël de Courville
89f7640769 Update BUILD.md with build failure troubleshooting
Added troubleshooting steps for build failures related to permissions.
2025-11-07 10:22:59 +01:00
Raphaël de Courville
6e8c1dba9b Move contributor list to CONTRIBUTORS.md (#1313)
Created CONTRIBUTORS.md and updated .all-contributorsrc to reference the new file instead of README.md. This will reduce the size of the README and improve loading times.
2025-11-05 17:01:27 -08:00
Stef Tervelde
2955cb2f1d Merge pull request #1299 from Stefterv/base-vacuum 2025-10-28 08:34:09 +01:00
Raphaël de Courville
64c213fc9a Merge pull request #1012 from processing/textarea-research
More details surrounding `JEditTextArea`
2025-10-24 11:16:41 +02:00
Stef Tervelde
82a4429060 General cleanup of Base
I started cleaning up some of `Base`'s startup sequence for clarity of what is being started when. Nowhere near completion and I think a lot of this class will need to be refactored in the future.

Also removed some of the timing measurement comments

Added some comments to the Processing CLI class
2025-10-22 08:28:34 +02:00
Stef Tervelde
c1d631356b Fix duplicate include for app:utils module (#1285)
Removed redundant 'include("app:utils")' statement and added 'app:utils' to the main include block for consistency.
2025-10-15 16:57:46 -04:00
Stef Tervelde
7283c99271 Enable automatic release for Maven Central publishing (#1286)
Sets 'automaticRelease' to true in the publishToMavenCentral configuration to automate the release process when publishing to Maven Central.
2025-10-15 16:56:23 -04:00
Stef Tervelde
2a5341b52f Rename output JARs in createLibrary tasks (#1278)
The createLibrary tasks in dxf, pdf, and serial modules now rename the output JAR files to dxf.jar, pdf.jar, and serial.jar respectively as Processing does not expect the version name to be in the library jar
processing-1310-4.4.10
2025-10-14 10:35:31 -04:00
Stef Tervelde
845cb0c07e Fix signing property check in build script (#1266)
Corrects the property name from 'signing.signingInMemoryKey' to 'signingInMemoryKey' in the signing condition to ensure proper detection of signing configuration.
processing-1309-4.4.9
2025-10-13 23:04:46 -04:00
Stef Tervelde
ea6783d878 Update legacy and active libraries in build script (#1265)
Removed 'dxf' and 'serial' from legacyLibraries and added 'serial' to active libraries in build.gradle.kts.
This reflects changes in library maintenance and build configuration.
2025-10-13 23:01:23 -04:00
Andrew
5dc52be4f1 Fix syntax highlighting for short type (#1260)
* fix: add syntax coloring for short and Short types

* don't use unsupported Short datatype
2025-10-08 09:02:54 -04:00
Madhav Majumdar
f36e5b2d83 Migration of the serial library to Gradle (#1106)
* Update build.gradle.kts

* Update build.gradle.kts

* fix build.gradle.kts

* Resolving issue 1099

- Add settings.gradle.kts
- Update build.gradle.kts

* foojay-resolver-convention updated to latest version

* update migration code and revert unnecessary commits
processing-1308-4.4.8
2025-10-06 17:10:19 -04:00
Moon
21dba29541 Merge pull request #1254 from Stefterv/fix-preprocessor
Remove core project dependency from build.gradle.kts
2025-09-24 17:11:57 -04:00
Stef Tervelde
c51a8e4b87 Revise README for Jetpack Compose migration strategy
Updated README to reflect migration to Jetpack Compose and strategy for replacing JEditTextArea with RSyntaxTextArea. Added insights on LSP-based editor research and the need for user feedback on Tweak Mode and autocompletion features.
2025-09-24 04:45:10 +02:00
Stef Tervelde
f47ef750e8 Remove core project dependency from build.gradle.kts 2025-09-22 13:49:30 +02:00
Moon
72db9b7db6 Merge pull request #1251 from Stefterv/lsp-libraries-fix
Make sure LSP recognises contributed libraries
2025-09-19 08:24:30 -04:00
Stef Tervelde
aa9fd934f2 Make sure contributions are loaded in the lsp
Trigger locating the sketchbook folder so contributed libraries are loaded
2025-09-19 11:19:37 +02:00
Moon
0c43ebfd95 Merge pull request #1248 from processing/all-contributors/add-SuganthiThomas
docs: add SuganthiThomas as a contributor for code
2025-09-18 09:01:09 -04:00
allcontributors[bot]
5a108da686 docs: update .all-contributorsrc [skip ci] 2025-09-18 13:00:49 +00:00
allcontributors[bot]
f3198d76f0 docs: update README.md [skip ci] 2025-09-18 13:00:48 +00:00
Moon
9ca92bc50f Default DEBUG env value to false, or read actual value instead of only checking for existence 2025-09-18 08:54:28 -04:00