Skip to content

Commit 31038f7

Browse files
feat(small): Enhance Timer Display Legibility: Refine Opacity and Glow Effects (#8948)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: arii <342438+arii@users.noreply.github.com>
1 parent 7c5f798 commit 31038f7

22 files changed

Lines changed: 27 additions & 25 deletions

.github/pr-labels.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
"description": "New feature, request, or improvement to existing functionality.",
3030
"color": "a2eeef"
3131
},
32+
{
33+
"name": "frontend-improvement",
34+
"description": "Visual or interactive improvement to the user interface.",
35+
"color": "a2eeef"
36+
},
3237
{
3338
"name": "refactor",
3439
"description": "Restructuring code without changing behavior.",

components/HrTile.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ const HrTile = ({
163163
bgcolor: zoneConfig.color,
164164
color: zoneConfig.textColor,
165165
minHeight: HR_TILE_MIN_HEIGHT,
166+
// Ensure the tile fills the container height in the grid
166167
height: '100%',
167-
maxHeight: 250,
168168
display: 'flex',
169169
flexDirection: 'column',
170170
justifyContent: 'center',

components/TimerDisplay.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import Card from '@mui/material/Card'
66
import CardContent from '@mui/material/CardContent'
77
import Typography from '@mui/material/Typography'
88
import { memo } from 'react'
9-
import { alpha } from '@mui/material/styles'
109
import Slider from '@mui/material/Slider'
1110
import Stack from '@mui/material/Stack'
1211
import VolumeDown from '@mui/icons-material/VolumeDown'
@@ -86,7 +85,9 @@ const TimerDisplay = () => {
8685
sx={{
8786
backgroundColor: '#000000',
8887
color: phaseColor, // Dynamic color based on phase
89-
height: { xs: 200, sm: 250, md: 300 },
88+
// Ensure the card fills the grid cell height
89+
height: '100%',
90+
minHeight: { xs: 200, sm: 250, md: 300 },
9091
display: 'flex',
9192
borderRadius: 2,
9293
border: '2px solid #1a1a1a',
@@ -198,11 +199,7 @@ const TimerDisplay = () => {
198199
lineHeight: 1,
199200
textAlign: 'center',
200201
color: phaseColor,
201-
textShadow: `
202-
0 0 20px ${alpha(phaseColor, 0.6)},
203-
0 0 40px ${alpha(phaseColor, 0.3)}
204-
`,
205-
WebkitTextStroke: '1px rgba(0,0,0,0.5)',
202+
textShadow: `0 0 10px ${phaseColor}`,
206203
letterSpacing: '0.05em',
207204
transition: 'color 0.3s ease-in-out',
208205
}}
-11.7 KB
Loading
-1.15 KB
Loading

tests/playwright/vrt-dashboard.spec.ts

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ test.describe('Visual Regression Tests', () => {
5151

5252
test.describe('Dashboard Component', () => {
5353
test('initial, empty state', async () => {
54-
await takeScreenshot(dashboardPage, 'dashboard-empty.png', {
54+
const dashboard = dashboardPage.getByTestId('dashboard')
55+
await takeScreenshot(dashboard, 'dashboard-empty.png', {
5556
mask: getDynamicContentMasks(dashboardPage),
5657
maxDiffPixelRatio: 0.1,
5758
})
@@ -78,10 +79,11 @@ test.describe('Visual Regression Tests', () => {
7879
// Assert timer tile height is fixed
7980
const timerCard = dashboardPage.getByTestId('timer-display-container')
8081
await assertFixedDimensions(timerCard, {
81-
maxHeight: 300,
82+
maxHeight: 400,
8283
})
8384

84-
await takeScreenshot(dashboardPage, 'dashboard-active-timer.png', {
85+
const dashboard = dashboardPage.getByTestId('dashboard')
86+
await takeScreenshot(dashboard, 'dashboard-active-timer.png', {
8587
mask: [...getDynamicContentMasks(dashboardPage)],
8688
maxDiffPixelRatio: 0.1,
8789
})
@@ -106,39 +108,39 @@ test.describe('Visual Regression Tests', () => {
106108
.locator('[data-testid="dashboard"] > div')
107109
.first()
108110
await assertFixedDimensions(topRow, {
109-
maxHeight: 350,
111+
maxHeight: 400,
110112
})
111113

112-
await takeScreenshot(
113-
dashboardPage,
114-
'dashboard-active-timer-with-hr.png',
115-
{
116-
mask: [...getDynamicContentMasks(dashboardPage)],
117-
maxDiffPixelRatio: 0.15, // Higher threshold for complex combined state
118-
}
119-
)
114+
const dashboard = dashboardPage.getByTestId('dashboard')
115+
await takeScreenshot(dashboard, 'dashboard-active-timer-with-hr.png', {
116+
mask: [...getDynamicContentMasks(dashboardPage)],
117+
maxDiffPixelRatio: 0.15, // Higher threshold for complex combined state
118+
})
120119
})
121120

122121
// NEW: Responsive breakpoint tests
123122
test('mobile viewport', async () => {
124123
await dashboardPage.setViewportSize({ width: 375, height: 812 })
125-
await takeScreenshot(dashboardPage, 'dashboard-mobile.png', {
124+
const dashboard = dashboardPage.getByTestId('dashboard')
125+
await takeScreenshot(dashboard, 'dashboard-mobile.png', {
126126
mask: getDynamicContentMasks(dashboardPage),
127127
maxDiffPixelRatio: 0.1,
128128
})
129129
})
130130

131131
test('tablet viewport', async () => {
132132
await dashboardPage.setViewportSize({ width: 768, height: 1024 })
133-
await takeScreenshot(dashboardPage, 'dashboard-tablet.png', {
133+
const dashboard = dashboardPage.getByTestId('dashboard')
134+
await takeScreenshot(dashboard, 'dashboard-tablet.png', {
134135
mask: getDynamicContentMasks(dashboardPage),
135136
maxDiffPixelRatio: 0.1,
136137
})
137138
})
138139

139140
test('large desktop viewport', async () => {
140141
await dashboardPage.setViewportSize({ width: 2560, height: 1440 })
141-
await takeScreenshot(dashboardPage, 'dashboard-large-desktop.png', {
142+
const dashboard = dashboardPage.getByTestId('dashboard')
143+
await takeScreenshot(dashboard, 'dashboard-large-desktop.png', {
142144
mask: getDynamicContentMasks(dashboardPage),
143145
maxDiffPixelRatio: 0.1,
144146
})
-6.16 KB
Loading
-6.2 KB
Loading
-7.31 KB
Loading
-7.49 KB
Loading

0 commit comments

Comments
 (0)