Files
ds-chat/frontend/src/components/RoomInfoPanel.css
T
ksmithandClaude Sonnet 5 b451504d07 Fix mobile display: RoomInfoPanel inaccessible, emoji picker overflow
RoomInfoPanel was hard-gated behind !isMobile in ChatShellPage.tsx, but
its trigger button ("Room details" in ChatPane.tsx) still rendered and
toggled state unconditionally -- tapping it on mobile did nothing
visible, with no way to reach room info/members/settings at all. Fixed
by removing the gate and making the panel itself responsive: it renders
as a full-screen fixed overlay below the mobile breakpoint instead of
the desktop resizable aside (which stays exactly as before -- verified
in-browser at both viewport sizes).

Also found and fixed a second real bug during the mobile audit: the
emoji picker's fixed 320px width overflows a 375px-wide viewport by 5px
depending on trigger position (e.g. the composer's emoji button, near
the left edge). Shrunk it to 280px with a proportionally reduced column
count below 480px, rather than attempting dynamic position-aware sizing
for a 5px overflow.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-16 09:35:19 -06:00

350 lines
6.8 KiB
CSS

.room-info-panel {
position: relative;
flex: none;
min-width: 260px;
max-width: 480px;
border-left: 1px solid var(--ds-border);
background: var(--ds-void-2);
padding: var(--sp-4);
overflow-y: auto;
overflow-x: hidden;
display: flex;
flex-direction: column;
}
.room-info-resize-handle {
position: absolute;
top: 0;
bottom: 0;
left: -3px;
width: 6px;
cursor: col-resize;
z-index: 5;
touch-action: none;
}
.room-info-resize-handle:hover,
.room-info-resize-handle:active {
background: color-mix(in srgb, var(--ds-accent) 40%, transparent);
}
/* Below MOBILE_BREAKPOINT (frontend/src/hooks/useWindowWidth.ts), the
resizable-aside layout doesn't fit -- shown as a full-viewport overlay
instead. RoomInfoPanel.tsx skips its inline `style={{ width }}` on
mobile so this width rule isn't fighting an inline style, which would
otherwise win regardless of this media query's specificity. */
@media (max-width: 859px) {
.room-info-panel {
position: fixed;
inset: 0;
z-index: 50;
width: 100%;
min-width: 0;
max-width: none;
border-left: none;
}
}
.room-info-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: var(--sp-4);
}
.room-info-header-label {
font-size: 0.78rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.04em;
color: var(--ds-muted);
}
.room-info-close {
background: transparent;
border: none;
color: var(--ds-muted);
cursor: pointer;
font-size: 1rem;
line-height: 1;
padding: 2px;
}
.room-info-summary {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
margin-bottom: var(--sp-6);
}
.room-info-name {
font-weight: 700;
}
.room-info-sub {
font-size: 0.78rem;
color: var(--ds-muted);
}
.room-info-section {
margin-bottom: var(--sp-6);
}
.room-info-label {
font-size: 0.72rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.04em;
color: var(--ds-muted);
margin-bottom: var(--sp-2);
}
.room-info-member-row {
display: flex;
align-items: center;
gap: var(--sp-2);
padding: 6px 0;
flex-wrap: wrap;
}
.room-info-member-name {
font-size: 0.84rem;
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.room-info-role-select {
appearance: none;
-webkit-appearance: none;
font-family: inherit;
cursor: pointer;
padding-right: 20px;
background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
linear-gradient(135deg, currentColor 50%, transparent 50%);
background-position: calc(100% - 11px) 55%, calc(100% - 6px) 55%;
background-size: 5px 5px, 5px 5px;
background-repeat: no-repeat;
opacity: 0.85;
}
.room-info-role-select:hover:not(:disabled) {
opacity: 1;
}
.room-info-role-select:disabled {
cursor: not-allowed;
opacity: 0.5;
}
.role-badge {
display: inline-flex;
align-items: center;
border-radius: var(--radius-pill);
font-size: 0.68rem;
font-weight: 800;
padding: 2px 8px;
text-transform: capitalize;
flex: none;
}
.role-badge-owner {
border: 1px solid color-mix(in srgb, var(--ds-highlight) 50%, transparent);
background: color-mix(in srgb, var(--ds-highlight) 14%, transparent);
color: var(--ds-highlight);
}
.role-badge-admin {
border: 1px solid color-mix(in srgb, var(--ds-accent-2) 50%, transparent);
background: color-mix(in srgb, var(--ds-accent-2) 14%, transparent);
color: var(--ds-accent-2);
}
.role-badge-member {
border: 1px solid var(--ds-border);
background: transparent;
color: var(--ds-muted);
}
.room-info-invite-form {
display: flex;
gap: var(--sp-2);
flex-wrap: wrap;
}
.room-info-invite-form input {
flex: 1;
background: var(--ds-surface-2);
border: 1px solid var(--ds-border);
border-radius: var(--radius);
padding: 7px 10px;
color: var(--ds-text);
font-size: 0.84rem;
}
.room-info-error {
color: var(--ds-danger);
font-size: 0.78rem;
margin: 6px 0 0;
}
.room-info-settings-toggle {
background: transparent;
border: 1px solid var(--ds-border);
color: var(--ds-text);
border-radius: var(--radius);
padding: 7px 10px;
font-size: 0.82rem;
font-weight: 600;
cursor: pointer;
width: 100%;
text-align: left;
}
.room-info-settings-form {
display: flex;
flex-direction: column;
gap: var(--sp-2);
margin-top: var(--sp-2);
}
.room-info-settings-form label {
display: flex;
flex-direction: column;
gap: 4px;
font-size: 0.76rem;
color: var(--ds-muted);
}
.room-info-settings-form input,
.room-info-settings-form textarea {
background: var(--ds-surface-2);
border: 1px solid var(--ds-border);
border-radius: var(--radius);
padding: 7px 10px;
color: var(--ds-text);
font-size: 0.84rem;
font-family: var(--sans);
resize: vertical;
}
.room-info-integrations {
display: flex;
flex-direction: column;
gap: var(--sp-4);
margin-top: var(--sp-2);
}
.room-info-integration-group {
display: flex;
flex-direction: column;
gap: 6px;
}
.room-info-webhook-row {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: var(--sp-2);
font-size: 0.78rem;
}
.room-info-webhook-info {
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
}
.room-info-webhook-info code {
background: var(--ds-surface-2);
padding: 3px 6px;
border-radius: 6px;
font-size: 0.72rem;
word-break: break-all;
}
.room-info-webhook-desc {
color: var(--ds-muted);
font-size: 0.74rem;
}
.room-info-subscription-form {
display: flex;
flex-direction: column;
gap: 6px;
}
.room-info-subscription-form input {
background: var(--ds-surface-2);
border: 1px solid var(--ds-border);
border-radius: var(--radius);
padding: 7px 10px;
color: var(--ds-text);
font-size: 0.82rem;
}
.room-info-event-types {
display: flex;
gap: var(--sp-3);
flex-wrap: wrap;
}
.room-info-event-type-checkbox {
display: flex;
align-items: center;
gap: 4px;
font-size: 0.74rem;
font-family: var(--mono);
color: var(--ds-muted);
}
.room-info-signing-secret {
font-size: 0.76rem;
color: var(--ds-accent);
margin: 0;
}
.room-info-signing-secret code {
background: var(--ds-surface-2);
padding: 3px 6px;
border-radius: 6px;
word-break: break-all;
}
.room-info-danger-link {
background: transparent;
border: none;
color: var(--ds-danger);
font-size: 0.78rem;
cursor: pointer;
padding: 4px 0;
text-align: left;
}
.room-info-leave {
margin-top: auto;
align-self: flex-start;
background: transparent;
border: 1px solid color-mix(in srgb, var(--ds-danger) 45%, transparent);
color: var(--ds-danger);
border-radius: var(--radius);
padding: 8px 14px;
font-size: 0.86rem;
font-weight: 700;
cursor: pointer;
}
.room-info-leave:hover:not(:disabled) {
background: color-mix(in srgb, var(--ds-danger) 12%, transparent);
}
.room-info-leave:disabled {
opacity: 0.4;
cursor: not-allowed;
}