Skip to content

Support for toolbox 2.6.0.38881 #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Mar 7, 2025
Merged

Conversation

fioan89
Copy link
Collaborator

@fioan89 fioan89 commented Mar 4, 2025

  • localization support is now mandatory
  • initial support for gradle toolbox plugin (structure)

fioan89 added 2 commits March 4, 2025 22:27
- reworked tasks for building the jar and zips
- plugin metadata (i.e. extension.json) is now generated by the gradle tasks
- initial support for localization which is now mandatory
@fioan89 fioan89 requested review from matifali and bcpeinhardt March 4, 2025 20:54
Copy link
Member

@matifali matifali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments on mixing plugin and extension notation but LGTM.


changelog {
version.set(pluginVersion)
version.set(extension.version)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to call plugin an extension from now on?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WIP but indeed it is confusing me as well (especially when "extension" has a different meaning in the context of JetBrains plugins). It is the "nomenclature" used by JetBrains in the sample. I will refactor and simplify some of the things once I have the code working. Bear in mind that this is a wip for now :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably involve the JetBrains team. At least share the confusion wit them.

fioan89 added 13 commits March 5, 2025 00:26
- fix initial batch of compiler errors
- mostly strings converted to LocalizedString instances
- while some observable properties are now moved to Kotlin's StateFlow
- fix compiler errors for the Settings page
- associated strings converted to LocalizedString instances
- observable properties are now moved to Kotlin's StateFlow
- fix compiler errors for Coder main page
- associated strings converted to LocalizedString instances
- observable properties are now moved to Kotlin's StateFlow
- fix compiler errors for the intro page
- associated strings converted to LocalizedString instances
- observable properties are now moved to Kotlin's StateFlow
- fix compiler errors for the Sign-In page
- associated strings converted to LocalizedString instances
- observable properties are now moved to Kotlin's StateFlow
- the jars were not included in the Toolbox install location nor in the zip file
- the plugin needs extension.json (which is now autogenerated but initially it was only
  part of the zip file) so that later it can read the version. With this patch - the
  json is also included in the jar file
- proper usage of coroutine's stateflow to update values
- also fixed issues were state transition were not properly rendered
- service dependencies were resolved all over the place making refactoring harder
- it promoted implicit, hidden dependencies
- and also introduced tighter coupling between components.
- in some cases we had to provide some i18n strings from upstream because the localization service
  was not available in the constructor.

 With this patch we resolve all the needed services during plugin load, wrap them in a context and inject
 the context via the constructor. It is now easier to refactor and the number of constructor parameters has
 been reduced.
- JetBrains recommendation is to use its own diagnostic logger available via service locator
- gets rid of slf4j api library
- in Java/Kotlin, the resources folder is a directory used to store non-code files that are needed by an application at runtime.
- in Maven/Gradle world, the resources folder is typically located under:
  * src/main/resources/
  * src/test/resources/
@fioan89 fioan89 marked this pull request as ready for review March 6, 2025 21:23
@matifali
Copy link
Member

matifali commented Mar 7, 2025

nitpick: I think we should not show the Coder icon with all workspaces.
image

@fioan89
Copy link
Collaborator Author

fioan89 commented Mar 7, 2025

@matifali I can make make it disappear, however I think it makes things worse. The text is now weirdly aligned with no control on our side how the layout looks or is aligned. Best case scenario I can try to emulate something like ssh plugin does where a green badge is rendered over the running machines. I'm not sure how is that done because the API made available by JetBrains allows only one icon for all env. However I can skim through Toolbox internal code and see what is JetBrains doing.

I propose we merge this PR and address the styling issues in a separate PR. What do you think?
image

@matifali
Copy link
Member

matifali commented Mar 7, 2025

I propose we merge this PR and address the styling issues in a separate PR. What do you think?

Yes, please.

@fioan89 fioan89 merged commit 8f1d3a3 into main Mar 7, 2025
5 checks passed
@fioan89 fioan89 deleted the support-for-toolbox-2_6_0_38881 branch March 7, 2025 20:34
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