-
Notifications
You must be signed in to change notification settings - Fork 254
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
IllustratedMessage: Flickers on resize #5852
Comments
Thanks for reporting! I'll forward this issue to our UI5 Web Components Colleagues as the affected component is developed in their repository. |
Hello @SAP/ui5-webcomponents-topic-p, The issue is easily reproducible in the CodeSandbox provided. Could you please look over? Thank you in advance! Kind Regards, |
* fix(ui5-illustrated-message): prevent infinite resize By caching the offsetWidth of the IllustratedMessage for each media, in the case of infinite resize, we check if the newly set media isn't with the same offsetWidth as the last time. If it is (case of infinite resize), we don't change the media. Fixes: #5852
Hi there @plamenivanov91, It looks like the bug is back on Recording.2024-03-18.182522.mp4Isolated Example
import { Dialog, IllustratedMessage } from '@ui5/webcomponents-react';
import '@ui5/webcomponents-fiori/dist/illustrations/EmptyList.js';
function App() {
return (
<Dialog open={true} resizable={true} draggable={true}>
<IllustratedMessage
name="EmptyList"
titleText={'Your selection is empty.'}
subtitleText={'Select items from the list.'}
/>
</Dialog>
);
}
export default App; |
Hi @plamenivanov91, FYI Isolated issue with pure webcomponents: https://stackblitz.com/edit/js-2gfmuu?file=index.js |
Describe the bug
We have an IllustratedMessage in a resizable Dialog. The "size" property on the IllustratedMessage is set to "Auto" by default, so when resizing the dialog, the illustrated message will change its size depending on the available space. As we resize the dialog, the bug happens on the transition from one size to another: As we get close to the threshold, there's a small moment where the message doesn't seem to be sure which of the two sizes to go for, and switches back and forth between both, causing flickering.
Isolated Example
Here's a sandbox.
To Reproduce
Resize the dialog until the illustrated message starts flickering. I unfortunately can't provide a video screenshot right now. If you struggle to reproduce the issue with the sandbox, please let me know and I will provide a video.
UI5 Web Components for React Information
@ui5/webcomponents
version: 1.7.1@ui5/webcomponents-react
version: 0.28.1Operating System: Win10
Browser: Chrome
The text was updated successfully, but these errors were encountered: