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

feat(RecommendationsRegistry): uses deterministic method to choose which banner is displayed #6947

Merged

Conversation

axel7083
Copy link
Contributor

What does this PR do?

In todays implementation we are using a random system to determine which banner will be displayed.

This has a serious drawback, each call a different one could be returned, leading to ui flickering, since the extension banner store is subscribed to specific events (required) it get re-render a little bit too often

const windowEvents = [
'extension-starting',
'extension-started',
'extension-stopping',
'extension-stopped',
'extension-removed',
'extensions-started',
'configuration-changed', // Required to capture the ignoreRecommendations preference change
];

To avoid this flickering, we need to have the same result for a period of time, here we choose by the hours.

Screenshot / video of UI

What issues does this PR fix or reference?

Fixes #6941

How to test this PR?

  • Tests are covering the bug fix or the new feature

…extension banners

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
@axel7083 axel7083 requested review from benoitf and a team as code owners April 25, 2024 09:46
@axel7083 axel7083 requested review from dgolovin and lstocchi and removed request for a team April 25, 2024 09:46
@axel7083 axel7083 requested a review from jeffmaury April 25, 2024 14:23
Copy link
Contributor

@jeffmaury jeffmaury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@axel7083 axel7083 merged commit 299fb52 into containers:main Apr 25, 2024
8 checks passed
@podman-desktop-bot podman-desktop-bot added this to the 1.10.0 milestone Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extension banners displayed should be deterministic for a period of time
4 participants