Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe Your Changes
This pull request aims to improve the progress bar animation for model loading and chat generation. waiting for the model to load is already frustrating, and the glitchy effects make it even worse
Before:
After:
Future update:
Pull progress from the engine and update accordingly.
Changes made
The changes made in this git diff involve two components —
GenerateResponse.tsx
andModelStart.tsx
— both of which add animation to progress loaders using theframer-motion
library.Import Framer Motion:
import { motion as m } from 'framer-motion'
.Modify Progress Bar:
<div>
used for displaying the progress bar is replaced with<m.div>
, indicating the use of a framer-motion div to add animations.initial
prop with a width of0
to start the animation from zero width.style
for the width is hardcoded to250
before the animation so it starts from a set size.animate
prop to both loaders, which animates the width to${loader}%
over a0.25
second duration using thetransition
property.These changes enhance the user interface with smooth animated transitions for loader width changes.