-
Notifications
You must be signed in to change notification settings - Fork 36
chore(animated-header): Handling of loading and disabled states #588
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
base: main
Are you sure you want to change the base?
chore(animated-header): Handling of loading and disabled states #588
Conversation
❌ Deploy Preview for carbon-labs-web-components failed. Why did it fail? →
|
✅ Deploy Preview for carbon-labs-react ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Looks good. Added 2 minor comments.
Points to consider later:
- Usage of Lottie-web animation is not recomended on component level. Many issues was reported on inflated bundle size and issue in next js application.
- Currently you have followed an approach where whole capabilities are passed via single configuration. I think this would make the usage bit complicated. Instead you can think of a composite approach or composite approach with compound component pattern in react.
Current
<AnimatedHeader {...argsWithSelectors} />
Proposed
<AnimatedHeader {...config} heading ... >
<AnimatedHeaderTaskController description>
<TaskControllerButton></TaskControllerButton>
or
<TaskControllerDropDown></TaskControllerDropDown>
</AnimatedHeaderTaskController>
<AnimatedHeaderWorkspaceSelector isLoading config />
<AnimatedHeaderMainContent>
<AnimatedHeaderTile></AnimatedHeaderTile>
<AnimatedHeaderTile></AnimatedHeaderTile>
<AnimatedHeaderAIChat></AnimatedHeaderTile>
</AnimatedHeaderMainContent>
</AnimatedHeader>
@@ -226,6 +226,18 @@ body { | |||
max-inline-size: fit-content; | |||
} | |||
|
|||
.#{$prefix}__task-controller-skeleton { |
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.
can you use carbon tokens for spacings across the style 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.
Thanks! done
} | ||
|
||
if (tasksControllerConfig?.type === 'dropdown' && dropdownProps) { | ||
console.log(dropdownProps); |
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.
Remove logs
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.
Done!
Thanks for the comments! |
Significant refactor of Animated Header. I grouped and cleaned up some props.
I added handling for full component loading state + tasks or selectors loading states.
Changelog
New
Changed
Testing / Reviewing
Screen.Recording.2025-05-08.at.23.07.50.mov