-
Notifications
You must be signed in to change notification settings - Fork 111
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: improve text prompts of empty group components #982
Conversation
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!
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.
@Skaiir Even though this component won't ResizeObserver
+ refs are no that great for performance.
Let's try to use container queries instead which allows use to avoid shipping more JS
|
||
return ( | ||
<div class="fjs-empty-component" ref={ emptyComponentRef }> | ||
<span style={ { display: isHidden ? 'none' : 'inline' } }>Drag and drop components here.</span> |
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.
Let's use classes instead of inlining it
Oooh snazzy new feature I (and GPT) wasn't aware of. |
df63da5
to
404a750
Compare
Closes #965
@volodymyr-melnykc I made the hiding threshold 100pixels instead because it still seems to look okay, let me know how it seems to you.
@vsgoulart Opted for a mutationobserver for simplicity, since this is purely a visual thing