-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display live remaining time for timer on tile card #21290
Conversation
WalkthroughWalkthroughThe updates center around enhancing the timer display functionality within a TypeScript project. Key changes include refactoring timer calculation and display logic into a modular component, Changes
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (5)
Additional context usedBiome
Additional comments not posted (16)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does fix it for the tile card, but you need to keep the state content empty. If you're adding "remaining" and "duration" both to the state content, it will just show the initial duration of the timer for both "remaining" and "duration".
protected createRenderRoot() { | ||
return this; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why no shadowroot?
Yep I will look to create another PR to let the user select these special states. |
Proposed change
Only the state was displayed before.
I also clean up state-summary and state-card to share the same logic.
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed:
Summary by CodeRabbit
New Features
state-display-timer
component for displaying timer information in various parts of the UI.Refactor
HuiTileCard
rendering logic for "update" and "timer" domains, improving display and maintainability.HuiTimerEntityRow
andstate-card-timer
components to utilize the newstate-display-timer
component, removing redundant timer logic.Bug Fixes