Skip to content

feat: t-timers UI#76

Open
anteeek wants to merge 4 commits intofeat/t-timersfrom
feat/t-timers-ui
Open

feat: t-timers UI#76
anteeek wants to merge 4 commits intofeat/t-timersfrom
feat/t-timers-ui

Conversation

@anteeek
Copy link
Collaborator

@anteeek anteeek commented Feb 17, 2026

About the Contributor

This PR is made on behalf of the BBC

Type of Contribution

This is a:

Feature

Current Behavior

Currently, there is no UI for t-timers

New Behavior

This PR adds UI for t-timers in playlist view

Testing

  • I have added one or more unit tests for this PR
  • I have updated the relevant unit tests
  • No unit test changes are needed for this PR

Affected areas

playlist view

Time Frame

Other Information

note: merge to feature branch

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

@anteeek anteeek marked this pull request as ready for review February 17, 2026 09:12
Comment on lines +46 to +50
className={classNames('timing__header_t-timers__timer', {
'timing__header_t-timers__timer__countdown': timer.mode!.type === 'countdown',
'timing__header_t-timers__timer__freeRun': timer.mode!.type === 'freeRun',
'timing__header_t-timers__timer__isRunning': isRunning,
'timing__header_t-timers__timer__isPaused': !isRunning,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need the ! after mode? Can't Typescript infer it exists because you checked it on line 32?

Also can you do:

Suggested change
className={classNames('timing__header_t-timers__timer', {
'timing__header_t-timers__timer__countdown': timer.mode!.type === 'countdown',
'timing__header_t-timers__timer__freeRun': timer.mode!.type === 'freeRun',
'timing__header_t-timers__timer__isRunning': isRunning,
'timing__header_t-timers__timer__isPaused': !isRunning,
className={classNames('timing__header_t-timers__timer',
'timing__header_t-timers__timer__'+ timer.mode!.type
'timing__header_t-timers__timer__is' + isRunning ? 'Running' : 'Paused',
{

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's right, typescript detects it but after moving it out higher (to the rendering component) it doesn't anymore. As for the class concatenation, I would advise against it as it will make the classes un-ctrl+f-able across the codebase, and prone to unexpected breaks

Comment on lines 51 to 52
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These seem to be the same test - I assume the second one is supposed to be type countup or something.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@anteeek anteeek requested a review from rjmunro February 17, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments