-
Notifications
You must be signed in to change notification settings - Fork 65
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
fix: title would not get rendered and rendering times be wrong #254
Conversation
Also the game_info message type which should only display in action bar was sent to chat.
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
@@ -14,6 +16,20 @@ const ticksToMs = (ticks: AnimationTimes) => { | |||
return ticks | |||
} | |||
|
|||
const getComponent = (input: string | any) => { |
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.
const getComponent = (input: string | any) => { | |
const getComponent = (input: string | Record<string, any>) => { |
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.
👍 makes sense. I'm not that well versed in TypeScript so I don't really know the appropriate types at times 😅
Very good and quality fix (at least as I can see from code). |
User description
This fixes that titles would not be displayed at all due to parsing errors of the received data.
Additionally to that the default timing was not what is actually used so that was adjusted too (the legacy action bar also does not fade in) and the the
game_info
message type which should only display in action bar was sent to chat too, this is filtered out now.PR Type
Bug fix, Enhancement
Description
Fixed titles not rendering due to parsing errors.
Adjusted default transition times for better accuracy.
Ignored
game_info
messages in chat to prevent incorrect display.Improved handling of title and action bar components with new parsing logic.
Changes walkthrough 📝
ChatProvider.tsx
Ignore `game_info` messages in chat
src/react/ChatProvider.tsx
game_info
messages in chat.TitleProvider
.Title.stories.tsx
Update default transition times in stories
src/react/Title.stories.tsx
Title.tsx
Refactor transition timing logic
src/react/Title.tsx
TitleProvider.tsx
Enhance title component parsing and timing
src/react/TitleProvider.tsx
getComponent
function for parsing title components.