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

fix(OverflowPopover): make OverflowPopoverContext to a single to issue on multiple instances (#5738) #5739

Merged
merged 3 commits into from
Apr 29, 2024

Conversation

Jianrong-Yu
Copy link
Contributor

This PR fixes #5738 by make the context OverflowPopoverContext to a singleton, to make it works for multiple UI5 instanced introduced by UI5 scoping. The singleton solution is copied from packages/base/src/context/StyleContext.ts:

const SYMBOL = Symbol.for('@ui5/webcomponents-react/StyleContext');
//...
export function getStyleContext(): typeof StyleContext {
  globalThis[SYMBOL] ??= StyleContext;
  return globalThis[SYMBOL];
}

Before:
image
After:
image

Pull Request Checklist

@coveralls
Copy link

coveralls commented Apr 22, 2024

Pull Request Test Coverage Report for Build 8837819142

Details

  • 8 of 8 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.009%) to 88.484%

Totals Coverage Status
Change from base Build 8834380725: 0.009%
Covered Lines: 5417
Relevant Lines: 6122

💛 - Coveralls

@Lukas742
Copy link
Contributor

Hi @Jianrong-Yu

thanks for creating this PR! Unfortunately I don't know when I'll get around to looking at it in depth, but your contribution is much appreciated :)

Copy link
Contributor

@Lukas742 Lukas742 left a comment

Choose a reason for hiding this comment

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

LGTM 🚢

Thank you!

@Lukas742 Lukas742 merged commit 368815a into SAP:main Apr 29, 2024
17 checks passed
@ui5-webcomponents-react-bot
Copy link
Contributor

🎉 This PR is included in version v1.28.1 🎉

The release is available on v1.28.1

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants