Skip to content

Conversation

@Kxiru
Copy link
Contributor

@Kxiru Kxiru commented Jan 7, 2026

Done

  • Created and added a Rich tooltip for pools in multiple places in the codebase.

Notes:

  • Please critique on whether the chip content is appropriate, should be spliced, or needds amendments.

QA

  1. Run the LXD-UI:
  2. Perform the following QA steps:
    • [List the steps to QA the new feature(s) or prove that a bug has been resolved]

Screenshots

image

@webteam-app
Copy link

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces rich tooltips for storage pools throughout the LXD-UI application. The new StoragePoolRichChip component replaces simple ResourceLink components with an interactive tooltip that displays detailed pool information (description, status, driver, and used-by count) when users hover over pool references.

Key Changes:

  • Created new StoragePoolRichChip and StoragePoolRichTooltip components with associated styling
  • Replaced ResourceLink components with StoragePoolRichChip across 12 files for consistent pool display
  • Added responsive behavior to hide tooltips on smaller screens

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/pages/storage/StoragePoolRichChip.tsx New component that wraps pool links with rich tooltip functionality
src/pages/storage/StoragePoolRichTooltip.tsx New component that renders the tooltip content with pool details
src/sass/_storage_pool_rich_tooltip.scss Styling for the rich tooltip table layout
src/sass/styles.scss Imports the new stylesheet
src/util/instanceMigration.tsx Replaced ResourceLink with StoragePoolRichChip in migration success message
src/pages/storage/StorageVolumes.tsx Updated pool column to use StoragePoolRichChip
src/pages/storage/StorageVolumeOverview.tsx Updated pool display in overview table
src/pages/storage/StoragePoolHeader.tsx Updated pool reference in rename success message
src/pages/storage/StorageBuckets.tsx Updated pool column to use StoragePoolRichChip
src/pages/storage/MigrateVolumeBtn.tsx Updated pool references in migration notifications
src/pages/storage/EditStoragePool.tsx Updated pool reference in edit success message
src/pages/storage/CreateStoragePool.tsx Updated pool reference in creation success message
src/pages/profiles/ProfileStorageList.tsx Updated pool display in profile storage device list
src/pages/instances/InstanceDetailPanelContent.tsx Updated root storage pool display
src/components/DeviceDetails.tsx Updated pool references in device details

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Kxiru Kxiru force-pushed the pools-rich-tooltips branch from 9547f26 to d9b15bb Compare January 7, 2026 02:50
@Kxiru Kxiru requested a review from Copilot January 7, 2026 02:50
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kimanhou
Copy link
Contributor

kimanhou commented Jan 7, 2026

On your screenshot, the instance icon in the Used by section doesn't have the same color as the other icons.

@kimanhou
Copy link
Contributor

kimanhou commented Jan 7, 2026

I thought we agreed yesterday not to use ExpandableList in a rich tooltip.

@Kxiru Kxiru force-pushed the pools-rich-tooltips branch from 5b355ce to e5c29ec Compare January 7, 2026 14:16
Copy link
Contributor

@omarelkashef omarelkashef left a comment

Choose a reason for hiding this comment

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

Really nice! some observations below

@Kxiru Kxiru force-pushed the pools-rich-tooltips branch 2 times, most recently from 56081b8 to 4e591a3 Compare January 8, 2026 03:35
@Kxiru
Copy link
Contributor Author

Kxiru commented Jan 8, 2026

@edlerd , could you please let me know where you wanted the PoolRichChips with the Memory bar to be? There are quite a lot of layers of abstraction, eg, in order to display the memory bar in the poolchip on the instance page, the cluster member has to go from InstanceOverview to DeviceDetails OR, be called with a hook within Device details. What do you think?
image

@Kxiru Kxiru requested a review from omarelkashef January 8, 2026 04:24
Copy link
Contributor

@omarelkashef omarelkashef left a comment

Choose a reason for hiding this comment

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

Thank you for the improvements! A few more comments below

@@ -0,0 +1,83 @@
import { type FC } from "react";
Copy link
Contributor

Choose a reason for hiding this comment

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

If we can not find other rows for the tooltip, maybe having an exception and overriding the min-height is our best choice because the spacing does not look right. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree but @edlerd wishes for there to be consistency in the sizing across all the tooltips. @edlerd , what do you think of the current implementation? Would you add more rows or are you happy with it as is?

Copy link
Collaborator

Choose a reason for hiding this comment

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

We discussed earlier this week having an exception for the pool tooltip due to a lack of things to show in it.

@edlerd
Copy link
Collaborator

edlerd commented Jan 8, 2026

There are quite a lot of layers of abstraction, eg, in order to display the memory bar in the poolchip on the instance page, the cluster member has to go from InstanceOverview to DeviceDetails OR, be called with a hook within Device details. What do you think?

Let's forward a location prop from InstanceOverview to DeviceListTable down to DeviceDetails and StoragePoolRichChip. Yes, this is prop drilling through many layers. It seems fine, as all the interfaces are fairly small, so adding a prop is ok. Of course the new location prop shall be optional, as we will not have it set from the profile components.

Copy link
Collaborator

@edlerd edlerd left a comment

Choose a reason for hiding this comment

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

I think there was a misunderstanding between cluster member memory and storage pool size. See below.

@Kxiru
Copy link
Contributor Author

Kxiru commented Jan 8, 2026

Can this be done in the component?

No, as the URL needs to access the device in the ..map and filter.

@Kxiru Kxiru force-pushed the pools-rich-tooltips branch from 4e591a3 to afecfee Compare January 8, 2026 23:23
@Kxiru Kxiru force-pushed the pools-rich-tooltips branch from afecfee to a1fd971 Compare January 8, 2026 23:26
return member && location ? (
<ClusterMemberMemoryUsage member={member} />
) : (
<StoragePoolSize pool={pool} />
Copy link
Collaborator

Choose a reason for hiding this comment

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

We want the graphical version with a meter bar here, not the plain text one.

image image


const StoragePoolRichTooltipSize: FC<Props> = ({ pool, member, location }) => {
return member && location ? (
<ClusterMemberMemoryUsage member={member} />
Copy link
Collaborator

Choose a reason for hiding this comment

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

We want the storage pool size for a cluster member, but only if the pool is local and the environment is clustered and if the pool is local. This is the wrong component, pulling the cluster member memory. It should be the storage pool usage for the given cluster member instead.

If no cluster member is given here, we check if there is only one cluster member. If there is only one, we show the pool usage for the pool on that member

If the pool is not having a isClusterLocalDriver then StoragePoolSize is already doing the right thing.

If no cluster member is given here and there is more than one cluster member and isClusterLocalDriver for that pool driver, then we should show a fallback.

@@ -0,0 +1,83 @@
import { type FC } from "react";
Copy link
Collaborator

Choose a reason for hiding this comment

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

We discussed earlier this week having an exception for the pool tooltip due to a lack of things to show in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants