Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/components/SearchBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ export default function SearchBar({ developers, onResults, onReset }) {
{resultCount !== null && query && (
<div className="search-bar__results">
{resultCount === 0 ? 'No results found' : `${resultCount} developer${resultCount !== 1 ? 's' : ''} found`}
<button className="search-bar__reset" onClick={handleClear} title="Clear filter and show all">
✕ Clear
</button>
</div>
)}
<div className={`search-bar__samples${query ? ' hidden' : ''}`}>
Expand Down
64 changes: 58 additions & 6 deletions styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,29 @@ body {
background: rgba(17, 24, 39, 0.7);
padding: 3px 10px;
border-radius: 10px;
display: flex;
align-items: center;
gap: 8px;
}

.search-bar__reset {
display: inline-flex;
align-items: center;
gap: 3px;
background: rgba(239, 68, 68, 0.15);
border: 1px solid rgba(239, 68, 68, 0.4);
border-radius: 10px;
padding: 2px 8px;
color: #f87171;
font-size: 11px;
font-family: var(--font);
cursor: pointer;
transition: background 0.2s, border-color 0.2s;
}

.search-bar__reset:hover {
background: rgba(239, 68, 68, 0.25);
border-color: #f87171;
}

/* Main layout */
Expand Down Expand Up @@ -409,29 +432,58 @@ body {
border-right: 1px solid var(--border);
z-index: 60;
overflow-y: auto;
overflow-x: hidden;
padding: 24px;
transform: translateX(-100%);
transition: transform 0.3s ease;
scrollbar-width: thin;
scrollbar-color: var(--text-muted) transparent;
}

.detail-panel::-webkit-scrollbar {
width: 8px;
}

.detail-panel::-webkit-scrollbar-track {
background: transparent;
}

.detail-panel::-webkit-scrollbar-thumb {
background: var(--text-muted);
border-radius: 4px;
}

.detail-panel::-webkit-scrollbar-thumb:hover {
background: var(--text-secondary);
}

.detail-panel.open {
transform: translateX(0);
}

.detail-panel__close {
position: absolute;
top: 12px;
right: 16px;
background: none;
border: none;
position: sticky;
top: 0;
float: right;
background: rgba(17, 24, 39, 0.85);
border: 1px solid var(--border);
border-radius: 50%;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
color: var(--text-secondary);
font-size: 24px;
font-size: 20px;
cursor: pointer;
line-height: 1;
z-index: 10;
transition: background 0.2s, color 0.2s;
}

.detail-panel__close:hover {
color: var(--text-primary);
background: var(--bg-hover);
}

/* Detail header */
Expand Down
Loading