You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by "KingRabbid (via GitHub)" <gi...@apache.org> on 2024/07/08 12:59:00 UTC

[PR] Add Flat LAF & IntelliJ themes support capability in JMeter [jmeter]

KingRabbid opened a new pull request, #6312:
URL: https://github.com/apache/jmeter/pull/6312

   ## Description
   I've introduced support for Flat LAF Themes in JMeter; Flat LAF is an open source https://www.formdev.com/flatlaf/ Java Swing library with modern look & feel, supports IntelliJ themes, HiDPI, etc (see the website).
   If's compatible with JMeter codebase by default.
   New parameters are defined & customizable in .properties & .xml file(s): one can adjust the JSyntaxTextArea.java theme defaults.
   Few additional bugs/enhancements were also introduced in order to make the visual experience better.
   
   For future: I would remove Darcula and DarkLaf from JMeter, doesn't make sense anymore to keep them; replace DarkLaf features/usage with FlatLAF API where possible.
   
   ## Motivation and Context
   Due to recent eye vision problems, I've started to need alternative themes support to use other colors; existing capability in JMeter was limited.
   _DarkLaf_ API currently in-use in JMeter seems to be non maintained (last update September 2022) and complicated to upgrade to latest version.
   
   ## How Has This Been Tested?
   Manually tested with various JMXs & Themes, especially with JSR223 test elements to validate the _JSyntaxTextArea_ instances.
   I've run tests on both Linux and Windows, with Java 8, 11 & 17.
   
   ## Screenshots (if appropriate):
   
   ## Types of changes
   - Bug fix (non-breaking change which fixes an issue)
   - New feature (non-breaking change which adds functionality)
   
   ## Checklist:
   - [x] My code follows the [code style][style-guide] of this project.
   - [x] I have updated the documentation accordingly.
   
   [style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Flat LAF & IntelliJ themes support capability in JMeter [jmeter]

Posted by "vlsi (via GitHub)" <gi...@apache.org>.
vlsi commented on code in PR #6312:
URL: https://github.com/apache/jmeter/pull/6312#discussion_r3944409620


##########
src/bom-thirdparty/build.gradle.kts:
##########
@@ -146,5 +146,17 @@ dependencies {
         api("xalan:serializer:2.7.3")
         api("xalan:xalan:2.7.3")
         api("xml-apis:xml-apis:1.4.01")
+        //FlatLaf: https://www.formdev.com/flatlaf/native-libraries/#gradle
+        val flatlafVersion = "3.7.2"
+        api("com.formdev:flatlaf:${flatlafVersion}" )
+        api("com.formdev:flatlaf:${flatlafVersion}:linux-x86_64@so")

Review Comment:
   There would be one `api(platform("com.formdev:flatlaf-bom:2.21.2"))`, and the rest would be without versions like `api("com.formdev:flatlaf")`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Flat LAF & IntelliJ themes support capability in JMeter [jmeter]

Posted by "KingRabbid (via GitHub)" <gi...@apache.org>.
KingRabbid commented on PR #6312:
URL: https://github.com/apache/jmeter/pull/6312#issuecomment-3370599384

   Applied latest changes, any feedback please?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Flat LAF & IntelliJ themes support capability in JMeter [jmeter]

Posted by "vlsi (via GitHub)" <gi...@apache.org>.
vlsi commented on PR #6312:
URL: https://github.com/apache/jmeter/pull/6312#issuecomment-3486195555

   >DarkLaf API currently in-use in JMeter seems to be non maintained (last update September 2022) and complicated to upgrade to latest version.
   
   Darklaf is not very active, however, the upgrade to the latest version was not really hard: https://github.com/apache/jmeter/pull/5715
   
   Having multiple LaFs turned out to be hard to support. They have different quirks, and I agree if we switch to Flat LAF, we'd better drop Darklaf.
   
   @KingRabbid , Could you elaborate a bit on Flat LAF vs Darklaf in your experience? 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Flat LAF & IntelliJ themes support capability in JMeter [jmeter]

Posted by "KingRabbid (via GitHub)" <gi...@apache.org>.
KingRabbid commented on PR #6312:
URL: https://github.com/apache/jmeter/pull/6312#issuecomment-5527287692

   Hi,
   
   there's little to detail on versus: 
   a. FlatLAF is actively maintained and used in some major projects so with a very good chance to continue.
   b. DarkLAF provides a small subset of LAFs from what is available in the FlatLAF.
   c. FlatLAF allows one to define own theme and tweak via .xml settings a theme definition.
   d. FlatLAF has custom libraries to work on major OS names in a more compatible manner than a generic Java Swing API.
   
   This branch/repot contains also some few tweaks/fixes that make RSyntaxArea more compatible to LAF changes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Flat LAF & IntelliJ themes support capability in JMeter [jmeter]

Posted by "DevCharly (via GitHub)" <gi...@apache.org>.
DevCharly commented on code in PR #6312:
URL: https://github.com/apache/jmeter/pull/6312#discussion_r4017820098


##########
src/bom-thirdparty/build.gradle.kts:
##########
@@ -146,5 +146,17 @@ dependencies {
         api("xalan:serializer:2.7.3")
         api("xalan:xalan:2.7.3")
         api("xml-apis:xml-apis:1.4.01")
+        //FlatLaf: https://www.formdev.com/flatlaf/native-libraries/#gradle
+        val flatlafVersion = "3.7.2"
+        api("com.formdev:flatlaf:${flatlafVersion}" )
+        api("com.formdev:flatlaf:${flatlafVersion}:linux-x86_64@so")

Review Comment:
   A BOM for FlatLaf 3.7.2 is now published to Maven Central:
   https://repo1.maven.org/maven2/com/formdev/flatlaf-bom/3.7.2/
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Flat LAF & IntelliJ themes support capability in JMeter [jmeter]

Posted by "DevCharly (via GitHub)" <gi...@apache.org>.
DevCharly commented on code in PR #6312:
URL: https://github.com/apache/jmeter/pull/6312#discussion_r4017847844


##########
src/bom-thirdparty/build.gradle.kts:
##########
@@ -146,5 +146,17 @@ dependencies {
         api("xalan:serializer:2.7.3")
         api("xalan:xalan:2.7.3")
         api("xml-apis:xml-apis:1.4.01")
+        //FlatLaf: https://www.formdev.com/flatlaf/native-libraries/#gradle
+        val flatlafVersion = "3.7.2"
+        api("com.formdev:flatlaf:${flatlafVersion}" )
+        api("com.formdev:flatlaf:${flatlafVersion}:linux-x86_64@so")
+        api("com.formdev:flatlaf:${flatlafVersion}:macos-x86_64@dylib")
+        api("com.formdev:flatlaf:${flatlafVersion}:windows-x86_64@dll")
+        api("com.formdev:flatlaf-intellij-themes:${flatlafVersion}")
+        api("com.formdev:flatlaf-extras:${flatlafVersion}")

Review Comment:
   The FlatLaf Extras seems to be not used by this PR and could be removed IMO.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Flat LAF & IntelliJ themes support capability in JMeter [jmeter]

Posted by "vlsi (via GitHub)" <gi...@apache.org>.
vlsi commented on code in PR #6312:
URL: https://github.com/apache/jmeter/pull/6312#discussion_r3947866451


##########
src/bom-thirdparty/build.gradle.kts:
##########
@@ -146,5 +146,17 @@ dependencies {
         api("xalan:serializer:2.7.3")
         api("xalan:xalan:2.7.3")
         api("xml-apis:xml-apis:1.4.01")
+        //FlatLaf: https://www.formdev.com/flatlaf/native-libraries/#gradle
+        val flatlafVersion = "3.7.2"
+        api("com.formdev:flatlaf:${flatlafVersion}" )
+        api("com.formdev:flatlaf:${flatlafVersion}:linux-x86_64@so")

Review Comment:
   The idea is that
   
   1) We use what the ecosystem uses: jackson, junit, mockito, etc have boms for platforms. I don't mention JMeter here as I am biased here
   2) Every individual FlatLaf artifact might (should) include bom constraint as well (e.g. `com.formdev:flatlaf` could include contraint on `flatlaf-bom`). That would enable automatic version alignment in case one of the artifacts comes with a newer version (e.g. updated via transitive).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Flat LAF & IntelliJ themes support capability in JMeter [jmeter]

Posted by "DevCharly (via GitHub)" <gi...@apache.org>.
DevCharly commented on code in PR #6312:
URL: https://github.com/apache/jmeter/pull/6312#discussion_r4017855592


##########
src/bom-thirdparty/build.gradle.kts:
##########
@@ -146,5 +146,17 @@ dependencies {
         api("xalan:serializer:2.7.3")
         api("xalan:xalan:2.7.3")
         api("xml-apis:xml-apis:1.4.01")
+        //FlatLaf: https://www.formdev.com/flatlaf/native-libraries/#gradle
+        val flatlafVersion = "3.7.2"
+        api("com.formdev:flatlaf:${flatlafVersion}" )
+        api("com.formdev:flatlaf:${flatlafVersion}:linux-x86_64@so")
+        api("com.formdev:flatlaf:${flatlafVersion}:macos-x86_64@dylib")

Review Comment:
   The native library for `arm64` (Apple Silicon) is missing.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Flat LAF & IntelliJ themes support capability in JMeter [jmeter]

Posted by "vlsi (via GitHub)" <gi...@apache.org>.
vlsi commented on code in PR #6312:
URL: https://github.com/apache/jmeter/pull/6312#discussion_r3943494361


##########
src/bom-thirdparty/build.gradle.kts:
##########
@@ -146,5 +146,17 @@ dependencies {
         api("xalan:serializer:2.7.3")
         api("xalan:xalan:2.7.3")
         api("xml-apis:xml-apis:1.4.01")
+        //FlatLaf: https://www.formdev.com/flatlaf/native-libraries/#gradle
+        val flatlafVersion = "3.7.2"
+        api("com.formdev:flatlaf:${flatlafVersion}" )
+        api("com.formdev:flatlaf:${flatlafVersion}:linux-x86_64@so")

Review Comment:
   I've filed https://github.com/JFormDesigner/FlatLaf/issues/1146 to request a proper platform (BOM) from FlatLaf



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Flat LAF & IntelliJ themes support capability in JMeter [jmeter]

Posted by "DevCharly (via GitHub)" <gi...@apache.org>.
DevCharly commented on code in PR #6312:
URL: https://github.com/apache/jmeter/pull/6312#discussion_r3944401657


##########
src/bom-thirdparty/build.gradle.kts:
##########
@@ -146,5 +146,17 @@ dependencies {
         api("xalan:serializer:2.7.3")
         api("xalan:xalan:2.7.3")
         api("xml-apis:xml-apis:1.4.01")
+        //FlatLaf: https://www.formdev.com/flatlaf/native-libraries/#gradle
+        val flatlafVersion = "3.7.2"
+        api("com.formdev:flatlaf:${flatlafVersion}" )
+        api("com.formdev:flatlaf:${flatlafVersion}:linux-x86_64@so")

Review Comment:
   I wonder what this block would look like with a BOM from FlatLaf?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Flat LAF & IntelliJ themes support capability in JMeter [jmeter]

Posted by "DevCharly (via GitHub)" <gi...@apache.org>.
DevCharly commented on code in PR #6312:
URL: https://github.com/apache/jmeter/pull/6312#discussion_r4017841878


##########
src/bom-thirdparty/build.gradle.kts:
##########
@@ -146,5 +146,17 @@ dependencies {
         api("xalan:serializer:2.7.3")
         api("xalan:xalan:2.7.3")
         api("xml-apis:xml-apis:1.4.01")
+        //FlatLaf: https://www.formdev.com/flatlaf/native-libraries/#gradle
+        val flatlafVersion = "3.7.2"
+        api("com.formdev:flatlaf:${flatlafVersion}" )
+        api("com.formdev:flatlaf:${flatlafVersion}:linux-x86_64@so")
+        api("com.formdev:flatlaf:${flatlafVersion}:macos-x86_64@dylib")
+        api("com.formdev:flatlaf:${flatlafVersion}:windows-x86_64@dll")
+        api("com.formdev:flatlaf-intellij-themes:${flatlafVersion}")
+        api("com.formdev:flatlaf-extras:${flatlafVersion}")
+        api("com.formdev:flatlaf-fonts-inter:4.1")
+        api("com.formdev:flatlaf-fonts-jetbrains-mono:2.304")
+        api("com.formdev:flatlaf-fonts-roboto:2.137")
+        api("com.formdev:flatlaf-fonts-roboto-mono:3.000")

Review Comment:
   The FlatLaf fonts seems to be not used by this PR and could be removed IMO.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org