Skip to content
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

Closed
ej612 opened this issue Sep 27, 2022 · 4 comments · Fixed by #5882 or #8584
Closed

IllustratedMessage: Flickers on resize #5852

ej612 opened this issue Sep 27, 2022 · 4 comments · Fixed by #5882 or #8584
Assignees
Labels
bug This issue is a bug in the code Medium Prio TOPIC P

Comments

@ej612
Copy link

ej612 commented Sep 27, 2022

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.1
Operating System: Win10
Browser: Chrome

@ej612 ej612 added the bug This issue is a bug in the code label Sep 27, 2022
@MarcusNotheis
Copy link
Collaborator

Thanks for reporting! I'll forward this issue to our UI5 Web Components Colleagues as the affected component is developed in their repository.

@MarcusNotheis MarcusNotheis transferred this issue from SAP/ui5-webcomponents-react Sep 27, 2022
@niyap niyap self-assigned this Sep 28, 2022
@niyap niyap removed their assignment Sep 28, 2022
@niyap niyap added this to Issues in Maintenance - Topic P via automation Sep 28, 2022
@niyap
Copy link
Contributor

niyap commented Sep 28, 2022

Hello @SAP/ui5-webcomponents-topic-p,

The issue is easily reproducible in the CodeSandbox provided.
Open the sample in full screen and keep resizing the dialog slowly. In a moment, the ui5-illustrated-message starts flickering and its media is changing between scene and dialog endlessly.

Could you please look over?

Thank you in advance!

Kind Regards,
Niya

@plamenivanov91 plamenivanov91 self-assigned this Sep 29, 2022
@PetyaMarkovaBogdanova PetyaMarkovaBogdanova moved this from Issues to In Progress in Maintenance - Topic P Oct 3, 2022
plamenivanov91 added a commit to plamenivanov91/ui5-webcomponents that referenced this issue Oct 3, 2022
plamenivanov91 added a commit to plamenivanov91/ui5-webcomponents that referenced this issue Oct 3, 2022
plamenivanov91 added a commit that referenced this issue Oct 13, 2022
* 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
Maintenance - Topic P automation moved this from In Progress to Completed Oct 13, 2022
@ej612
Copy link
Author

ej612 commented Mar 18, 2024

Hi there @plamenivanov91,

It looks like the bug is back on 1.23.1:

Recording.2024-03-18.182522.mp4

Isolated 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;

@nnaydenow
Copy link
Contributor

Hi @plamenivanov91,

FYI

Isolated issue with pure webcomponents: https://stackblitz.com/edit/js-2gfmuu?file=index.js

@nnaydenow nnaydenow reopened this Mar 19, 2024
@plamenivanov91 plamenivanov91 moved this from Completed to In Progress in Maintenance - Topic P Mar 19, 2024
plamenivanov91 added a commit to plamenivanov91/ui5-webcomponents that referenced this issue Mar 29, 2024
Maintenance - Topic P automation moved this from In Progress to Completed Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug in the code Medium Prio TOPIC P
Projects
Status: Completed
Status: 🆕 New
5 participants