feat(feedback): implement ChipDip-style floating dev feedback & bug report widget with markdown sync
This commit is contained in:
@@ -1156,3 +1156,399 @@ body.drawer-open {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
ChipDip-Style Floating Feedback & Dev Bug Report Widget
|
||||
========================================================================== */
|
||||
|
||||
.feedback-container {
|
||||
position: relative;
|
||||
z-index: 9995;
|
||||
}
|
||||
|
||||
/* Floating Launcher Button */
|
||||
.feedback-trigger-btn {
|
||||
position: fixed;
|
||||
bottom: 24px;
|
||||
right: 24px;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: var(--radius-full);
|
||||
background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
|
||||
color: #ffffff;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4px 18px rgba(99, 102, 241, 0.42), 0 2px 6px rgba(0, 0, 0, 0.2);
|
||||
transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, opacity 0.2s ease;
|
||||
z-index: 9995;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.feedback-trigger-btn:hover {
|
||||
transform: scale(1.08) translateY(-2px);
|
||||
box-shadow: 0 6px 24px rgba(99, 102, 241, 0.55), 0 3px 8px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.feedback-trigger-btn:active {
|
||||
transform: scale(0.96);
|
||||
}
|
||||
|
||||
.feedback-trigger-icon {
|
||||
font-size: 22px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.feedback-badge {
|
||||
position: absolute;
|
||||
top: -4px;
|
||||
right: -4px;
|
||||
background: #ef4444;
|
||||
color: #ffffff;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
min-width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 9999px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 2px solid var(--bg-main);
|
||||
}
|
||||
|
||||
/* Floating Chat Window */
|
||||
.feedback-widget {
|
||||
position: fixed;
|
||||
bottom: 84px;
|
||||
right: 24px;
|
||||
width: 380px;
|
||||
max-width: calc(100vw - 32px);
|
||||
height: 520px;
|
||||
max-height: calc(100dvh - 120px);
|
||||
background: var(--bg-surface);
|
||||
border: 1px solid var(--border-focus);
|
||||
border-radius: 18px;
|
||||
box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
z-index: 9998;
|
||||
animation: fadeInScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
|
||||
}
|
||||
|
||||
.feedback-widget-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 12px 16px;
|
||||
background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(99, 102, 241, 0.08));
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.feedback-header-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.feedback-header-icon {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.feedback-header-title {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--text-main);
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.feedback-header-sub {
|
||||
font-size: 11px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.feedback-close-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--text-muted);
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: var(--radius-sm);
|
||||
transition: background 0.15s ease, color 0.15s ease;
|
||||
}
|
||||
|
||||
.feedback-close-btn:hover {
|
||||
background: var(--bg-hover);
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
/* Category Switcher Tabs */
|
||||
.feedback-category-bar {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
padding: 8px 14px;
|
||||
background: var(--bg-surface);
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.feedback-cat-chip {
|
||||
flex: 1;
|
||||
padding: 5px 8px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
border-radius: var(--radius-full);
|
||||
border: 1px solid var(--border-color);
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
color: var(--text-muted);
|
||||
cursor: pointer;
|
||||
transition: all 0.15s ease;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.feedback-cat-chip:hover {
|
||||
color: var(--text-main);
|
||||
border-color: var(--border-focus);
|
||||
}
|
||||
|
||||
.feedback-cat-chip.active {
|
||||
background: rgba(99, 102, 241, 0.16);
|
||||
border-color: var(--primary);
|
||||
color: var(--primary);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* Context Indicator */
|
||||
.feedback-context-indicator {
|
||||
padding: 5px 14px;
|
||||
background: rgba(0, 0, 0, 0.15);
|
||||
font-size: 11px;
|
||||
color: var(--text-dim);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
/* Chat Messages List */
|
||||
.feedback-messages-list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 12px 14px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
background: var(--bg-main);
|
||||
}
|
||||
|
||||
.feedback-empty-state {
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
padding: 24px 12px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.feedback-empty-state .empty-icon {
|
||||
font-size: 32px;
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.feedback-empty-state p {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: var(--text-main);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.feedback-empty-state small {
|
||||
font-size: 11.5px;
|
||||
color: var(--text-muted);
|
||||
line-height: 1.4;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Message Card in Feed */
|
||||
.feedback-msg-card {
|
||||
background: var(--bg-surface);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 10px 12px;
|
||||
font-size: 13px;
|
||||
line-height: 1.45;
|
||||
animation: fadeIn 0.15s ease-out;
|
||||
}
|
||||
|
||||
.feedback-msg-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 6px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.feedback-msg-badge {
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
padding: 2px 7px;
|
||||
border-radius: var(--radius-full);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.03em;
|
||||
}
|
||||
|
||||
.feedback-msg-badge.bug {
|
||||
background: rgba(239, 68, 68, 0.14);
|
||||
color: #f87171;
|
||||
border: 1px solid rgba(239, 68, 68, 0.3);
|
||||
}
|
||||
|
||||
.feedback-msg-badge.feature {
|
||||
background: rgba(168, 85, 247, 0.14);
|
||||
color: #c084fc;
|
||||
border: 1px solid rgba(168, 85, 247, 0.3);
|
||||
}
|
||||
|
||||
.feedback-msg-badge.note {
|
||||
background: rgba(59, 130, 246, 0.14);
|
||||
color: #60a5fa;
|
||||
border: 1px solid rgba(59, 130, 246, 0.3);
|
||||
}
|
||||
|
||||
.feedback-msg-status {
|
||||
font-size: 10.5px;
|
||||
font-weight: 500;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.feedback-msg-status.new {
|
||||
color: #facc15;
|
||||
}
|
||||
|
||||
.feedback-msg-status.in_progress {
|
||||
color: #38bdf8;
|
||||
}
|
||||
|
||||
.feedback-msg-status.resolved {
|
||||
color: #4ade80;
|
||||
}
|
||||
|
||||
.feedback-msg-text {
|
||||
color: var(--text-main);
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.feedback-msg-meta {
|
||||
margin-top: 6px;
|
||||
font-size: 10.5px;
|
||||
color: var(--text-dim);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
/* Input Form */
|
||||
.feedback-input-form {
|
||||
padding: 10px 14px 12px;
|
||||
background: var(--bg-surface);
|
||||
border-top: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.feedback-textarea {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
background: var(--bg-input);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-md);
|
||||
color: var(--text-main);
|
||||
padding: 8px 12px;
|
||||
font-size: 13px;
|
||||
font-family: inherit;
|
||||
line-height: 1.4;
|
||||
resize: none;
|
||||
outline: none;
|
||||
transition: border-color 0.15s ease;
|
||||
}
|
||||
|
||||
.feedback-textarea:focus {
|
||||
border-color: var(--border-focus);
|
||||
}
|
||||
|
||||
.feedback-form-bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.feedback-hint {
|
||||
font-size: 10.5px;
|
||||
color: var(--text-dim);
|
||||
}
|
||||
|
||||
.feedback-send-btn {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: var(--radius-full);
|
||||
background: var(--primary);
|
||||
color: #ffffff;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: background 0.15s ease, transform 0.15s ease;
|
||||
}
|
||||
|
||||
.feedback-send-btn:hover {
|
||||
background: var(--primary-hover);
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.feedback-send-btn:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
/* Zen mode override: completely hide feedback button & widget */
|
||||
body.zen-mode-active #feedback-container,
|
||||
body.zen-mode-active .feedback-trigger-btn,
|
||||
body.zen-mode-active .feedback-widget {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Mobile responsive */
|
||||
@media (max-width: 768px) {
|
||||
.feedback-trigger-btn {
|
||||
bottom: calc(68px + env(safe-area-inset-bottom, 0px));
|
||||
right: 16px;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
.feedback-trigger-icon {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.feedback-widget {
|
||||
bottom: calc(64px + env(safe-area-inset-bottom, 0px));
|
||||
right: 10px;
|
||||
left: 10px;
|
||||
width: auto;
|
||||
max-width: none;
|
||||
height: calc(85dvh - 70px);
|
||||
border-radius: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user