Commit Graph

150 Commits

Author SHA1 Message Date
Sebastiano Poggi
f3dd498338 Create IDE LaF bridge (#102)
* [WIP] Start building the bridge

* Update dependencies, remove unused ones

* [WIP] Continue building the bridge

* [WIP] Continue building the bridge (got to Chip)

Includes tweaks on wrong values etc

* [WIP] Fill out infra for IntUiBridge.kt

Still not done!

* [WIP] Fill out infra for IntUiBridge.kt

Still not done!

* [WIP] More work

* [WIP] More progress (missing text fields & tabs)

* Finish filling in the bridge, then 🤞

* Make default fallbacks explicit, fix some issues

* Delete unused code

* Implement New UI icon mapping support in Bridge

Note: it doesn't work yet, since IconMapLoader.loadIconMapping()
complains that the mapping isn't done (when it is, since it's done in
the IDE pre-loading).

I suspect this is a classloading issue.

* More cleanup, stuff's still broken yey

* More fixin' stuff, hopefully the CI too

* Fix CI warning

* Refactor UI Component Styling in Jewel to Support defaults (#104)

* Refactor UI Component Styling in Jewel to Support defaults

Retrieving text styles requires coroutines. This commit aims to allow the theme to start with text defaults and as soon as text styles get retrieved, the theme gets updated.

* Fixes according to MR comments

* Fix this thing

---------

Co-authored-by: Sebastiano Poggi <sebp@google.com>

* More fixes to components/theme, cleanups

* Improve showcase and simplify text area (bye hints)

* Improve showcase and simplify text area (bye hints), fix more things

* Avoid crashing on old UI

---------

Co-authored-by: Lamberto Basti <basti.lamberto@gmail.com>
GitOrigin-RevId: b1d9fa9ec52c64833cd14a453c524195eb8932bd
2023-09-01 15:10:42 +00:00
Lamberto Basti
274830138a Update build script for publishing sources and javadoc jars
The publishing tasks for sources and javadoc jars in jewel-publish.gradle.kts were updated. The 'from' method now has a map function and 'into' method is replaced with 'destinationDirectory' to align with the newest gradle conventions. This change makes the build script more maintainable and future-proof.

GitOrigin-RevId: bd9a816da40ee581a9518a87603f073a8ea64e8b
2023-08-23 18:15:19 +02:00
Lamberto Basti
14f6afe0fc Refactor theme generator gradle plugin and optimize sarif results (#95)
* "Refactor theme generator and optimize sarif results"

This commit includes the optimization and refactor of the codebase. In the build.gradle files, the 'intUiLight' and 'intUiDark' themes have been registered and their properties have been updated. The Theme Generation plugin has been changed to use project conventions and the color group reading process was simplified. There is an optimized caching strategy particularly for SVG loading. Sarif results are now generated with kotlinx.sarif, which allows fluent API for handling the sarif format. Also, it includes switching from the java-sarif library to kotlin-sarif.

The changes enhance the robustness and reliability of the code. They also make it easier to understand, modify, and maintain the code. And using Kotlin-based libraries optimizes the performance and simplifies future changes in the project.

* Update build config for cleaner syntax

The build config file has been updated to use a cleaner syntax. The redundant use of .set() has been replaced with direct assignment for better readability. Also, added a suppression for UnstableApiUsage warning at the top of the files.
GitOrigin-RevId: 729a71a47ee0126f69f3f4ef36293661df48b3f7
2023-08-23 15:03:24 +02:00
Sebastiano Poggi
4356963934 Improve CI and Gradle setup (#94)
Refactor theme to prep for bridge work
GitOrigin-RevId: 5ae12b81ffcd35b9baf6ce5481065f9dc9fd8f23
2023-08-23 14:08:41 +02:00
Sebastiano Poggi
65125227ff Prevent 'v' prefix in tag names to end up in version name
GitOrigin-RevId: faaab6485e27e6500788db4be150481bfcc002d5
2023-08-16 10:07:32 +02:00
Sebastiano Poggi
c8d5647d33 Fix publishing errors
GitOrigin-RevId: 221ed0a2d4e2d972fe6a9d5f0a26150efa437a8c
2023-08-16 09:51:29 +02:00
Sebastiano Poggi
f67c5397c0 Add publishing to int-ui theme, remove from old stuff
GitOrigin-RevId: 8c7533dfb2e04bddf37665eb68ac2e3649be7804
2023-08-16 09:26:55 +02:00
Sebastiano Poggi
8545aae368 Add KtLint plugin's config
GitOrigin-RevId: 1ea15012c1b4646f069eca78a1e3befba587158b
2023-08-11 10:14:09 +02:00
Sebastiano Poggi
2c240953ab Fix static analysis warnings
GitOrigin-RevId: 2aaa6e640c1f208e71502f91ff686ba6f1b00414
2023-08-11 10:10:40 +02:00
Sebastiano Poggi
e6f9af193a Add Detekt and Ktlint IDE plugins as required
Update Detekt plugin's config

GitOrigin-RevId: 8c7e097c866eb1e342942d65de223543c2f092a0
2023-08-11 10:10:18 +02:00
Sebastiano Poggi
d88174652e Clean up
GitOrigin-RevId: 67068522fe7a98c44832c7dd7432979f3a9cbc52
2023-08-10 19:42:33 +02:00
Sebastiano Poggi
8f9302b5c5 Update publish.yml
Use newer checkout and setup-java versions
GitOrigin-RevId: e68eec2ca62503c19a6a30ae423cfa8c7375e23e
2023-08-10 19:20:13 +02:00
fscarponi
c332f05da1 fixes
GitOrigin-RevId: e8d41e73f68a5e7ab45eae607930bacc1cd73d7c
2023-08-09 10:59:45 +02:00
Fabrizio Scarponi
f18688824e LazyTree: moving out Tree.Element from LazyTreeState (#92)
Move flattenTree out from the treeState
GitOrigin-RevId: 51abea97c6dbe28c6021a7d980c5a9cb242dcafb
2023-08-09 07:28:14 +00:00
Sebastiano Poggi
6c8d584a70 Update Compose to latest dev version
See https://github.com/JetBrains/compose-multiplatform/issues/3459

GitOrigin-RevId: 2e7fd281a40e6c2d6cdc284f43324cb324c92aa8
2023-08-07 16:34:41 +02:00
Sebastiano Poggi
11e9a5aad5 Fix crash in demo app when tab strip goes empty
GitOrigin-RevId: 95b11e7d02ff842f2a8f60f4ede4988cde4cc93d
2023-08-04 20:19:11 +02:00
Sebastiano Poggi
108bc3cbf3 Prettify demo app (minimally)
GitOrigin-RevId: 93563493ee67a4078885f014b8f654b1f767eaa4
2023-08-04 20:13:47 +02:00
Sebastiano Poggi
b6e13ec4d1 Fix a number of theming issues
GitOrigin-RevId: 60d3027c3eecd0e8e46bdf9248da7ea411330557
2023-08-04 20:12:31 +02:00
Sebastiano Poggi
6fb96b6336 Update to Compose 1.5.0-dev1082
Also, Gradle 8.2 and Kotlin 1.8.20
Includes necessary fixes after updating.

GitOrigin-RevId: 4136443e977c562f6196a66fa844895de055433c
2023-08-04 19:50:39 +02:00
Sebastiano Poggi
a74da62173 Simplify tabs APIs, make them actually work
GitOrigin-RevId: 5a1f006f842449a1512e917daf519759772eab6e
2023-08-04 15:02:09 +02:00
Sebastiano Poggi
3d01a8785f Improve tabs alpha handling and selection
Also improves a11y

GitOrigin-RevId: 947f0643419dec0b40f15a36ed5e76d87bc538a9
2023-08-04 12:46:53 +02:00
Fabrizio Scarponi
14fda356c2 Fix theming issues, implement tabs & tabstrip
GitOrigin-RevId: deca9a5fb7b26e42281a73b900fe608d00eb5d82
2023-08-03 15:34:05 +00:00
Sebastiano Poggi
80b4eb8aed Cache icon painters (#89)
* Cache patched SVG painters

A naive approach for now; something better may be done in the future.

* Fix trySimplifyingPath logic (reorder priorities)

* Remove deprecated code, cleanup remaining stuff
GitOrigin-RevId: af14f6ab063a92f3eaf2935638c3f8b5d1cc400c
2023-07-19 09:00:26 +00:00
Sebastiano Poggi
d26b9399ed Sample cleanup (#88)
* Cleanup standalone samples
* Better dock icon & title for macOS
* Remove old, unused sample

* Add check run config
GitOrigin-RevId: 967ac41f7d7d6e7db177b389debe0db0edeb58e8
2023-07-19 08:51:51 +00:00
Sebastiano Poggi
ce0f1fd646 Patch SVG files (#87)
* Patch colours in SVGs while loading them
* Logic to load the right icon file based on state and theme (1st pass)
* Import the Intellij Light (old UI) SVG files in standalone Int UI
GitOrigin-RevId: 33f5a2d8c972a6b74822cb7e591c0d2691abc5c6
2023-07-19 09:51:06 +02:00
Sebastiano Poggi
eed3b33bd8 Load additional data from IJ theme description (#85)
Now we also load the icon overrides (including the colour mappings).
The tasks and plugin have been renamed to reflect this. So have the
various model interfaces, and the code accessing them.

There's a bunch of cleanup involved, too, but it shouldn't be too noisy.
GitOrigin-RevId: e800b51329337158cb315c0601b96418d6b8729a
2023-07-17 15:18:07 +02:00
Sebastiano Poggi
5af054214f Rewrite theme & components
* We need to change the architecture to be bridge-compatible
* Lots of cleanup and refactoring
* Some features/customisability added

GitOrigin-RevId: 8550276f49a9967f4e00603e4e59a2df772e2b32
2023-07-07 14:28:10 +01:00
fscarponi
d3eb453e20 Merge Int-UI into Main
GitOrigin-RevId: 1d47c4849d35f56e31bc9e48dabc9fa457da7af1
2023-06-30 17:25:11 +02:00
Lamberto Basti
1bf8820a39 Refactor TreeBuilder to implement TreeGeneratorScope
This change introduces a new interface `TreeGeneratorScope`, allowing both `TreeBuilder` & `ChildrenGeneratorScope` to implement unified set of methods. This ensures safer and generalized way to add and generate nodes and leaves. Also, it removed unnecessary `isOpen` attribute from `Node` class as the state should be managed by client, not by the model class. This commit helps in standardizing the way elements are added and generated across classes.

GitOrigin-RevId: 86e19a79faf4483a6cfbb29b4a5a31ae42767705
2023-06-29 15:29:27 +02:00
Lamberto Basti
b377c145f1 Update runner to ubuntu-latest
.

GitOrigin-RevId: 1552e81438f37d981c08d7f92268c27e1e765d25
2023-06-27 12:49:38 +02:00
Lamberto Basti
31342c748d Add MergeSarifTask and update GITHUB_REF usage
- Implement MergeSarifTask to combine SARIF reports during the "check" task
- Change GITHUB_REF to a nullable value to handle missing environment variables

This commit adds a MergeSarifTask in build.gradle.kts to merge SARIF reports from static code analysis, ensuring consolidated results. Additionally, the GITHUB_REF value is made nullable to prevent potential errors when the environment variable is not present.

GitOrigin-RevId: 7505dcfd7330135d5af2a5a87aeba7c459df51c3
2023-06-26 17:55:30 +02:00
Lamberto Basti
71686f695a Add MergeSarifTask to combine SARIF files
Implemented a new task in MergeSarifTask.kt for merging multiple SARIF files into a single file, to give a consolidated view of static analysis results. Updated jewel.gradle.kts to register the new task and include/exclude necessary files.

GitOrigin-RevId: 6cdc145717d554be8572044ea059063180f75c21
2023-06-26 17:41:48 +02:00
Lamberto Basti
539df1e3d6 Add typesafe project accessors and publish workflow
Enable typesafe project accessors in settings.gradle.kts and add GitHub Actions workflow for publishing artifacts to Space.

- Enabled feature preview for typesafe project accessors in buildSrc settings.gradle.kts
- Added GitHub Actions workflow to publish artifacts in Space on release or push to main branch

GitOrigin-RevId: af33fc0028cd05cf06548a27ad31232493c85c6d
2023-06-26 17:22:00 +02:00
Lamberto Basti
7ea4ee070f Remove build-logic folder and switch to buildSrc, added publication
Removed build-logic folder containing the convention, sarif, and other plugin logic.
Instead, created buildSrc folder and added the necessary Kotlin DSL scripts.

Reason:
Simplify the plugin configuration and apply conventions in an easier way using buildSrc.

Added publication for publishable modules to Package Search Space repository

GitOrigin-RevId: a02e6e62a2cce8011a722682e45483ce5d9a2b56
2023-06-26 17:18:14 +02:00
Fabrizio Scarponi
ad7a7051a6 Selectable Lazy Column, Tree (#42)
SelectableLazyColumn and TreeView

---------

Co-authored-by: Sebastiano Poggi <rock3r@users.noreply.github.com>
GitOrigin-RevId: a62bc13c2723a51ebdd1ba9256ddb76852acc485
2023-06-06 14:06:32 +02:00
Rivan Parmar
332739bb51 Add TextArea (#39)
* Add TextArea

* Update TextAreaStyle.kt

---------

Co-authored-by: Fabrizio Scarponi <36624359+fscarponi@users.noreply.github.com>
GitOrigin-RevId: 8e59c0639f0c5e3cfe18f1ba69740ed882e374db
2023-05-02 10:08:49 +02:00
Sebastiano Poggi
2ab1459b16 Add early dev status warning to README
GitOrigin-RevId: 7fca0c06b992ebb06f8ff6d60276e95cec07c43e
2023-03-10 19:30:41 +01:00
Sebastiano Poggi
dedb56f22f Update dependencies
GitOrigin-RevId: 79368883bd38f13b2d1e7a566f4c46da9afb109e
2023-02-19 18:48:49 +01:00
Sebastiano Poggi
1460db4a2e Update Gradle [7.6 -> 8.0]
GitOrigin-RevId: 47f1a045a91387c0e1ac894d75e393b3efec7b21
2023-02-19 18:35:30 +01:00
Kanro
72655767a0 Border alignment support (#34)
*  Border alignment support

*  Border alignment support

*  Border alignment support

*  Border alignment support

*  Support quad rounded corner shape

*  Fix build

*  Remove test code

*  Remove test code

* 🎨 Fix review comments

* 🎨 Fix review comments
GitOrigin-RevId: bb810c3ecfe29e2ea89b220ec47abb8b9129be01
2023-02-02 09:48:59 +00:00
Kanro
44809bed35 Fix button focus style (#33)
* Fix button focus style

- Make pressed same as normal state style
- Draw halo border as outer style
- Fix double focusable

* Remove commented code
GitOrigin-RevId: f9137f67d9f92b5c6c28263fc60bc93dc072e8e6
2022-12-29 11:56:25 +01:00
Kanro
3f2a3df489 🔀 Optimize modifiers of Checkbox and RadioButton (#32)
- Fix double focusable
- Remove duplicate key event
- Use hoverable modifier to get hovered state
GitOrigin-RevId: 72544849ca00394967050fad431b7487945a11a5
2022-12-23 19:01:32 +08:00
Kanro
64841a267b Fix focus state not saved after selected state changed (#31)
GitOrigin-RevId: e7094e47d62906addcc05b39508336115e44e826
2022-12-23 11:09:22 +01:00
Kanro
bc866455c4 Avoid putting compose content in condition branches (#30)
GitOrigin-RevId: 2a11c451e0c70af4d84c4d6965fd96a8a728887c
2022-12-22 11:44:41 +01:00
Sebastiano Poggi
bf7f990140 Remove Qodana
It's not compatible with Gradle 7.6, and it doesn't get us many
valuable insights over Detekt + ktlint.

GitOrigin-RevId: c81d7f86c0e5be74ec2b123d2d88f0a2fbadfcf4
2022-12-16 16:41:50 +01:00
Sebastiano Poggi
a18a90ff08 Provide our own SARIF merger
Obviously the tool Microsoft provides is broken...

GitOrigin-RevId: 14a9b1de16bce273f21e42314b2da245db21ec74
2022-12-16 15:05:14 +01:00
Sebastiano Poggi
879ead273a Hopefully fix SARIF merging for good
GitOrigin-RevId: b9fddacf4ae09c10394ed7712b46e535d04ca8f2
2022-12-16 13:12:36 +01:00
Sebastiano Poggi
b08509e13a Fix outstanding issues, clean up Gradle files
GitOrigin-RevId: 3f4a78798cf48dd3a8951d119be612352ecb326c
2022-12-15 16:56:43 +01:00
Sebastiano Poggi
9c8e6d46a0 Fix SARIF parsing
GitOrigin-RevId: 9a827a5157dd2bbdee0ad90ce07d265062d66ebf
2022-12-15 10:50:29 +01:00
Sebastiano Poggi
e0467dbb62 Upgrade Gradle to 7.6
GitOrigin-RevId: 5304a4ac60c47e19eff74bc795e3c827ec61d198
2022-12-14 13:14:02 +01:00