perf(ui): decouple book browser rendering pipeline (#341)
* perf(ui): deferred processing for book browser * perf(ui): Further optimisation + toolbar tweaks * perf(ui): layered pipeline, toolbar and error-state fixes - Layered computed signals for memoized pipeline stages - bookIndexById map replaces O(n) indexOf in template - Remove BookFilterOrchestrationService - Filter sidebar icon: pi-filter / pi-filter-fill - View toggle moved into display settings popover - Toolbar alignment fix - Error state no longer stuck on skeleton * perf(ui): split cache pathways + added specs * perf(ui): final spec updates * perf(ui): revert view toggle change * perf(ui): review followup * perf(ui): make spec loading state explicit
This commit is contained in:
@@ -1,3 +1,74 @@
|
||||
// Skeleton loader — opacity animation runs on the compositor thread
|
||||
// so it stays smooth while the main thread computes books.
|
||||
.skeleton-grid {
|
||||
display: grid;
|
||||
gap: 21px;
|
||||
align-items: start;
|
||||
width: 100%;
|
||||
|
||||
@media (width <= 767px) {
|
||||
gap: 0.5rem 8px;
|
||||
padding: 0 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-card {
|
||||
background: var(--p-content-border-color);
|
||||
border-radius: 8px;
|
||||
animation: skeleton-pulse 1.5s ease-in-out infinite;
|
||||
will-change: opacity;
|
||||
}
|
||||
|
||||
.table-skeleton {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.table-skeleton-header,
|
||||
.table-skeleton-row {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||
gap: 1rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.table-skeleton-row {
|
||||
min-height: 2.75rem;
|
||||
padding-bottom: 0.75rem;
|
||||
border-bottom: 1px solid var(--p-content-border-color);
|
||||
}
|
||||
|
||||
.table-skeleton-cell {
|
||||
height: 0.875rem;
|
||||
border-radius: 999px;
|
||||
background: var(--p-content-border-color);
|
||||
animation: skeleton-pulse 1.5s ease-in-out infinite;
|
||||
|
||||
&.table-skeleton-cell-header {
|
||||
height: 0.75rem;
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
&.table-skeleton-cell-short {
|
||||
width: 70%;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes skeleton-pulse {
|
||||
0%, 100% { opacity: 0.3; }
|
||||
50% { opacity: 0.6; }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.skeleton-card,
|
||||
.table-skeleton-cell {
|
||||
animation: none;
|
||||
will-change: auto;
|
||||
}
|
||||
}
|
||||
|
||||
// Layout containers
|
||||
.book-browser-container {
|
||||
position: relative;
|
||||
@@ -16,11 +87,11 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
gap: 0.25rem;
|
||||
padding: 0.35rem;
|
||||
border-radius: 0.75rem 0.75rem 0 0;
|
||||
margin-bottom: 0.5rem;
|
||||
margin-right: 2px;
|
||||
background-color: var(--card-background);
|
||||
border: 1px solid var(--p-content-border-color);
|
||||
|
||||
@@ -538,3 +609,7 @@
|
||||
.book-state-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.book-state-content-refreshing {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user