-
Notifications
You must be signed in to change notification settings - Fork 2
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
Introduce Side Pane Attributes #9
Conversation
9bdbb0f
to
4aee879
Compare
4aee879
to
0b31120
Compare
...in/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/model/infopanel/InfoPanelContent.kt
Outdated
Show resolved
Hide resolved
...in/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/model/infopanel/InfoPanelContent.kt
Outdated
Show resolved
Hide resolved
...c/main/kotlin/com/jetbrains/packagesearch/plugin/ui/model/infopanel/InfoPanelContentEvent.kt
Outdated
Show resolved
Hide resolved
...c/main/kotlin/com/jetbrains/packagesearch/plugin/ui/model/infopanel/InfoPanelContentEvent.kt
Outdated
Show resolved
Hide resolved
onClick = { | ||
//this event should be handled when you click on a selected package to refresh side panel content | ||
if (isSelected ) onPackageListItemEvent( | ||
PackageListItemEvent.InfoPanelEvent.OnSelectedPackageClick(content.id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the behaviour here? Afair changing the selection is handled by the SelectableLazyColumn
callback for selection change. Why do we need to add an onClick
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 - select package X (the side panel shows the package details) -> onSelectionChange() does the job
2 - click on a header badge (side pane shows the platforms) -> onClick for badge does the job
3 - click again on package X (the side panel shows the header's platform details) -> onSelectionChange() has not been called cause the selection is not changed
possible solutions:
-> make headers selectable -> is not what we want (will not fix anyway the multiSelection Interaction)
-> handle this corner case -> when someone clicks on already selected package, set the correct content on the side panel
plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/side/HeaderAttributesTab.kt
Outdated
Show resolved
Hide resolved
plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/side/HeaderAttributesTab.kt
Outdated
Show resolved
Hide resolved
Also, you need to update to the latest submodule of api-models. |
5f9bad1
to
ebb58df
Compare
…esTab Refactor platformListMock to getter in HeaderAttributesTab scrollToAttribute has CoroutineScope as receiver rename InfoPanelContentEvent Attributes Declared into FromVariant and Search into FromSearch rename Attributes Declared into FromVariant and Search into FromSearch This commit adds InfoPanelContent Attributes for "Declared" type to the asPanelContent function, including the tab's title, variant's title, and attributes. A click event handler for the selected packages is also added to refresh the side panel content. A new event for package selection has been placed in 'PackageListItemEvent'. Furthermore, the attribute type name description and content title in the package search UI have been updated for clarity. The style of the 'Search' content in HeaderAttributesTab has also been modified to reduce redundancy and clarify display conditions. Now, by clicking on an attribute badge, it's possible to scroll to individual attributes with a smooth animation.
ebb58df
to
e228959
Compare
plugin/build.gradle.kts
Outdated
@@ -56,6 +56,7 @@ dependencies { | |||
implementation(compose.desktop.windows_x64) | |||
implementation(packageSearchCatalog.kotlinx.serialization.core) | |||
implementation(packageSearchCatalog.jewel.bridge.ij233) | |||
implementation(packageSearchCatalog.jewel.standalone) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lamba92 Standalone is mandatory for run the Compose Preview (i'm not sure if we need it as implementation)
object PackageSearchColors { | ||
object Backgrounds { | ||
fun packageItemHeader(): Color = | ||
pickComposeColorFromLaf("ToolWindow.HeaderTab.selectedInactiveBackground") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems ok in 241, but I'm expecting a different result in 232 and 233. This will be fixed in related branches (expecting that 232 and 233 should be fixed in different ways)
onClick = { | ||
//this event should be handled when you click on a selected package to refresh side panel content | ||
if (isSelected ) onPackageListItemEvent( | ||
PackageListItemEvent.InfoPanelEvent.OnSelectedPackageClick(content.id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 - select package X (the side panel shows the package details) -> onSelectionChange() does the job
2 - click on a header badge (side pane shows the platforms) -> onClick for badge does the job
3 - click again on package X (the side panel shows the header's platform details) -> onSelectionChange() has not been called cause the selection is not changed
possible solutions:
-> make headers selectable -> is not what we want (will not fix anyway the multiSelection Interaction)
-> handle this corner case -> when someone clicks on already selected package, set the correct content on the side panel
…esTab (#9) Refactor platformListMock to getter in HeaderAttributesTab scrollToAttribute has CoroutineScope as receiver rename InfoPanelContentEvent Attributes Declared into FromVariant and Search into FromSearch rename Attributes Declared into FromVariant and Search into FromSearch This commit adds InfoPanelContent Attributes for "Declared" type to the asPanelContent function, including the tab's title, variant's title, and attributes. A click event handler for the selected packages is also added to refresh the side panel content. A new event for package selection has been placed in 'PackageListItemEvent'. Furthermore, the attribute type name description and content title in the package search UI have been updated for clarity. The style of the 'Search' content in HeaderAttributesTab has also been modified to reduce redundancy and clarify display conditions. Now, by clicking on an attribute badge, it's possible to scroll to individual attributes with a smooth animation. (cherry picked from commit 259a0d2)
…esTab (#9) Refactor platformListMock to getter in HeaderAttributesTab scrollToAttribute has CoroutineScope as receiver rename InfoPanelContentEvent Attributes Declared into FromVariant and Search into FromSearch rename Attributes Declared into FromVariant and Search into FromSearch This commit adds InfoPanelContent Attributes for "Declared" type to the asPanelContent function, including the tab's title, variant's title, and attributes. A click event handler for the selected packages is also added to refresh the side panel content. A new event for package selection has been placed in 'PackageListItemEvent'. Furthermore, the attribute type name description and content title in the package search UI have been updated for clarity. The style of the 'Search' content in HeaderAttributesTab has also been modified to reduce redundancy and clarify display conditions. Now, by clicking on an attribute badge, it's possible to scroll to individual attributes with a smooth animation. (cherry picked from commit 259a0d2)
…esTab (#9) Refactor platformListMock to getter in HeaderAttributesTab scrollToAttribute has CoroutineScope as receiver rename InfoPanelContentEvent Attributes Declared into FromVariant and Search into FromSearch rename Attributes Declared into FromVariant and Search into FromSearch This commit adds InfoPanelContent Attributes for "Declared" type to the asPanelContent function, including the tab's title, variant's title, and attributes. A click event handler for the selected packages is also added to refresh the side panel content. A new event for package selection has been placed in 'PackageListItemEvent'. Furthermore, the attribute type name description and content title in the package search UI have been updated for clarity. The style of the 'Search' content in HeaderAttributesTab has also been modified to reduce redundancy and clarify display conditions. Now, by clicking on an attribute badge, it's possible to scroll to individual attributes with a smooth animation. (cherry picked from commit 259a0d2)
…esTab (#9) Refactor platformListMock to getter in HeaderAttributesTab scrollToAttribute has CoroutineScope as receiver rename InfoPanelContentEvent Attributes Declared into FromVariant and Search into FromSearch rename Attributes Declared into FromVariant and Search into FromSearch This commit adds InfoPanelContent Attributes for "Declared" type to the asPanelContent function, including the tab's title, variant's title, and attributes. A click event handler for the selected packages is also added to refresh the side panel content. A new event for package selection has been placed in 'PackageListItemEvent'. Furthermore, the attribute type name description and content title in the package search UI have been updated for clarity. The style of the 'Search' content in HeaderAttributesTab has also been modified to reduce redundancy and clarify display conditions. Now, by clicking on an attribute badge, it's possible to scroll to individual attributes with a smooth animation. (cherry picked from commit 259a0d2)
…esTab (#9) Refactor platformListMock to getter in HeaderAttributesTab scrollToAttribute has CoroutineScope as receiver rename InfoPanelContentEvent Attributes Declared into FromVariant and Search into FromSearch rename Attributes Declared into FromVariant and Search into FromSearch This commit adds InfoPanelContent Attributes for "Declared" type to the asPanelContent function, including the tab's title, variant's title, and attributes. A click event handler for the selected packages is also added to refresh the side panel content. A new event for package selection has been placed in 'PackageListItemEvent'. Furthermore, the attribute type name description and content title in the package search UI have been updated for clarity. The style of the 'Search' content in HeaderAttributesTab has also been modified to reduce redundancy and clarify display conditions. Now, by clicking on an attribute badge, it's possible to scroll to individual attributes with a smooth animation. (cherry picked from commit 259a0d2)
…esTab (#9) Refactor platformListMock to getter in HeaderAttributesTab scrollToAttribute has CoroutineScope as receiver rename InfoPanelContentEvent Attributes Declared into FromVariant and Search into FromSearch rename Attributes Declared into FromVariant and Search into FromSearch This commit adds InfoPanelContent Attributes for "Declared" type to the asPanelContent function, including the tab's title, variant's title, and attributes. A click event handler for the selected packages is also added to refresh the side panel content. A new event for package selection has been placed in 'PackageListItemEvent'. Furthermore, the attribute type name description and content title in the package search UI have been updated for clarity. The style of the 'Search' content in HeaderAttributesTab has also been modified to reduce redundancy and clarify display conditions. Now, by clicking on an attribute badge, it's possible to scroll to individual attributes with a smooth animation. (cherry picked from commit 259a0d2)
…esTab (#9) Refactor platformListMock to getter in HeaderAttributesTab scrollToAttribute has CoroutineScope as receiver rename InfoPanelContentEvent Attributes Declared into FromVariant and Search into FromSearch rename Attributes Declared into FromVariant and Search into FromSearch This commit adds InfoPanelContent Attributes for "Declared" type to the asPanelContent function, including the tab's title, variant's title, and attributes. A click event handler for the selected packages is also added to refresh the side panel content. A new event for package selection has been placed in 'PackageListItemEvent'. Furthermore, the attribute type name description and content title in the package search UI have been updated for clarity. The style of the 'Search' content in HeaderAttributesTab has also been modified to reduce redundancy and clarify display conditions. Now, by clicking on an attribute badge, it's possible to scroll to individual attributes with a smooth animation. (cherry picked from commit 259a0d2)
From PKGS 1104
This commit adds InfoPanelContent Attributes for "Declared" type to the asPanelContent function, including the tab's title, variant's title, and attributes.
A click event handler for the selected packages is also added to refresh the side panel content.
A new event for package selection has been placed in 'PackageListItemEvent'.
Furthermore, the attribute type name description and content title in the package search UI have been updated for clarity. The style of the 'Search' content in HeaderAttributesTab has also been modified to reduce redundancy and clarify display conditions. Now, by clicking on an attribute badge, it's possible to scroll to individual attributes with a smooth animation.
To Do: