Refactor EventTimeline to Option 2 layout: Unified Panel with 3 scrolling tracks
This commit is contained in:
@@ -55,8 +55,15 @@ export default function EventTimeline() {
|
|||||||
};
|
};
|
||||||
}, [events]);
|
}, [events]);
|
||||||
|
|
||||||
const renderTimeline = (zone, zoneEvents) => (
|
const renderTimeline = (zone, zoneEvents, index) => (
|
||||||
<div className="glass-panel" style={{ flex: 1, overflowY: 'auto', maxHeight: '70vh' }}>
|
<div style={{
|
||||||
|
flex: 1,
|
||||||
|
overflowY: 'auto',
|
||||||
|
maxHeight: '70vh',
|
||||||
|
paddingLeft: index === 0 ? '0' : '1.5rem',
|
||||||
|
paddingRight: index === 2 ? '0' : '1.5rem',
|
||||||
|
borderRight: index === 2 ? 'none' : '1px solid rgba(255,255,255,0.05)'
|
||||||
|
}}>
|
||||||
<h2 style={{
|
<h2 style={{
|
||||||
position: 'sticky',
|
position: 'sticky',
|
||||||
top: 0,
|
top: 0,
|
||||||
@@ -64,8 +71,7 @@ export default function EventTimeline() {
|
|||||||
backdropFilter: 'blur(16px)',
|
backdropFilter: 'blur(16px)',
|
||||||
WebkitBackdropFilter: 'blur(16px)',
|
WebkitBackdropFilter: 'blur(16px)',
|
||||||
paddingBottom: '1rem',
|
paddingBottom: '1rem',
|
||||||
paddingTop: '1rem',
|
paddingTop: '0.5rem',
|
||||||
marginTop: '-1rem',
|
|
||||||
borderBottom: '1px solid var(--panel-border)',
|
borderBottom: '1px solid var(--panel-border)',
|
||||||
zIndex: 10
|
zIndex: 10
|
||||||
}}>
|
}}>
|
||||||
@@ -134,10 +140,10 @@ export default function EventTimeline() {
|
|||||||
<p>Location-wise sequential breakdown of events</p>
|
<p>Location-wise sequential breakdown of events</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style={{ display: 'flex', gap: '2rem', alignItems: 'flex-start' }}>
|
<div className="glass-panel" style={{ display: 'flex', padding: '1.5rem', alignItems: 'stretch' }}>
|
||||||
{renderTimeline('CO', groupedEvents.CO)}
|
{renderTimeline('CO', groupedEvents.CO, 0)}
|
||||||
{renderTimeline('Mill', groupedEvents.Mill)}
|
{renderTimeline('Mill', groupedEvents.Mill, 1)}
|
||||||
{renderTimeline('Conveyor', groupedEvents.Conveyor)}
|
{renderTimeline('Conveyor', groupedEvents.Conveyor, 2)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -175,3 +175,23 @@ tbody tr:last-child td {
|
|||||||
.animate-fade-in {
|
.animate-fade-in {
|
||||||
animation: fadeIn 0.4s ease forwards;
|
animation: fadeIn 0.4s ease forwards;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Custom Scrollbars */
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-track {
|
||||||
|
background: rgba(255, 255, 255, 0.02);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
background: rgba(255, 255, 255, 0.1);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: rgba(255, 255, 255, 0.2);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user