From 30a54f3795f69e7b928df56b95d485ade66b27b8 Mon Sep 17 00:00:00 2001 From: Robin Date: Fri, 23 Aug 2024 12:07:32 -0400 Subject: [PATCH] Fix spotlight tile regressions The buttons were scrolling with the view instead of always being visible in a fixed location on the tile, and the indicators were not adopting the correct width. --- src/tile/SpotlightTile.module.css | 8 +++++--- src/tile/SpotlightTile.tsx | 28 +++++++++++++++++----------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/tile/SpotlightTile.module.css b/src/tile/SpotlightTile.module.css index 1aee4589f..fdae2e891 100644 --- a/src/tile/SpotlightTile.module.css +++ b/src/tile/SpotlightTile.module.css @@ -14,7 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -.tile { +.contents { + block-size: 100%; + inline-size: 100%; display: flex; border-radius: var(--cpd-space-6x); contain: strict; @@ -29,7 +31,7 @@ limitations under the License. scroll-behavior: smooth; */ } -.tile.maximised { +.tile.maximised .contents { border-radius: 0; } @@ -153,7 +155,7 @@ limitations under the License. } .indicators > .item { - inline-size: 32px; + flex-basis: 32px; block-size: 2px; transition: background-color ease 0.15s; } diff --git a/src/tile/SpotlightTile.tsx b/src/tile/SpotlightTile.tsx index 8a71c8ec3..380e8ff0f 100644 --- a/src/tile/SpotlightTile.tsx +++ b/src/tile/SpotlightTile.tsx @@ -272,16 +272,18 @@ export const SpotlightTile = forwardRef( )} - {vms.map((vm) => ( - - ))} +
+ {vms.map((vm) => ( + + ))} +
{onToggleExpanded && (