Compare commits

...

2 Commits

Author SHA1 Message Date
lebaudantoine 82d8cbc264 🩹(frontend) fix overflow in participant metadata layout
Recent styling changes introduced an overflow, causing the network
indicator to be pushed outside of the participant tile.

Remove width: 100% and add a minimal gap to prevent metadata
elements from being too close to each other.
2026-03-04 19:00:06 +01:00
lebaudantoine a385791c6b 🩹(frontend) enhance shortcut hint styling using PandaCSS utilities
Refactor styles to leverage PandaCSS inline capabilities for
better clarity and consistency.

Remove an unnecessary div wrapper that was causing a layout shift.
2026-03-04 19:00:06 +01:00
3 changed files with 27 additions and 35 deletions
@@ -1,5 +1,28 @@
import React, { ReactNode } from 'react'
import { css } from '@/styled-system/css'
import { styled } from '@/styled-system/jsx'
const Hint = styled('div', {
base: {
position: 'absolute',
top: '0.75rem',
right: '0.75rem',
backgroundColor: 'rgba(0,0,0,0.5)',
color: 'white',
borderRadius: 'calc(var(--lk-border-radius) / 2)',
paddingInline: '0.5rem',
paddingBlock: '0.1rem',
fontSize: '0.875rem',
opacity: 0,
visibility: 'hidden',
pointerEvents: 'none',
transition: 'opacity 150ms ease',
'.lk-grid-layout > *:first-child:focus-within &': {
opacity: 1,
visibility: 'visible',
pointerEvents: 'auto',
},
},
})
export interface KeyboardShortcutHintProps {
children: ReactNode
@@ -12,21 +35,5 @@ export interface KeyboardShortcutHintProps {
export const KeyboardShortcutHint: React.FC<KeyboardShortcutHintProps> = ({
children,
}) => {
return (
<div
className={css({
position: 'absolute',
top: '0.75rem',
right: '0.75rem',
backgroundColor: 'rgba(0,0,0,0.5)',
color: 'white',
borderRadius: 'calc(var(--lk-border-radius) / 2)',
paddingInline: '0.5rem',
paddingBlock: '0.1rem',
fontSize: '0.875rem',
})}
>
{children}
</div>
)
return <Hint>{children}</Hint>
}
@@ -231,9 +231,7 @@ export const ParticipantTile: (
)}
</ParticipantContextIfNeeded>
</TrackRefContextIfNeeded>
<div className="shortcut-hint-wrapper">
<KeyboardShortcutHint>{t('toolbarHint')}</KeyboardShortcutHint>
</div>
<KeyboardShortcutHint>{t('toolbarHint')}</KeyboardShortcutHint>
</div>
)
})
+1 -14
View File
@@ -154,7 +154,7 @@
/* Participant name ellipsis: truncate when overflowing */
.lk-participant-metadata {
width: 100%;
gap: 1rem;
}
.lk-participant-metadata > *:first-child {
min-width: 0;
@@ -172,16 +172,3 @@
display: flex;
align-items: center;
}
/* Shortcut hint: visible only on first grid tile when focused (CSS-based) */
.shortcut-hint-wrapper {
opacity: 0;
visibility: hidden;
pointer-events: none;
transition: opacity 150ms ease;
}
.lk-grid-layout > *:first-child:focus-within .shortcut-hint-wrapper {
opacity: 1;
visibility: visible;
pointer-events: auto;
}