-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Make ContextPopup
stateless, improve fetching logic
#31181
base: main
Are you sure you want to change the base?
Conversation
ContextPopup
stateless
In 434287a I added another data attribute to track the loading state, ensuring this will never issue two GET requests at the same time for the same link, no matter which DOM events trigger on the link. |
ContextPopup
statelessContextPopup
stateless, improve fetching logic
Sorry but I do not think the change is good enough. When you'd like to reuse an existing instance, all states should be handled carefully. For example
I do not think it's worth to force it only use one instance. I strongly prefer the old approach, which is simple enough and doesn't really cause any problem. |
I wouldn't say it is a serious problem, and it could be fixed by add some "hiding" code. |
The problem with double tooltip can also be seen with the commit status in commit list. I think it could be fixed by adding a |
ContextPopup
is now a stateless component, accepting only props to render the popuptooltip
role which enables singleton behaviour, so multiple such popups won't show at the same time (happens when links are close together)interactiveBorder
to 15pxFixes: #31161
Helps with: #30275
Popup over existing issue:
Nonexisting issue does not show anything:
I think this is a nice bugfix for 1.22.