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

[Devtools] Add React Conf banner in component inspector panel #28414

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mattcarrollcode
Copy link
Contributor

@mattcarrollcode mattcarrollcode commented Feb 21, 2024

This PR adds a dismissable React Conf banner to the DevTools extension. One dismissed the banner will not reappear and the banner will automatically disappear after React Conf is over (React Conf is happening from May 15-16th).

Screenshot 2024-02-21 at 3 21 55 PM

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Feb 21, 2024
@mattcarrollcode mattcarrollcode marked this pull request as ready for review February 21, 2024 23:28
Copy link
Contributor

@hoxyq hoxyq left a comment

Choose a reason for hiding this comment

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

Left one comment, please also consider these:

  1. Will Profiler panel display the banner as well? Is this expected?
  2. Please test this on Firefox, we don't list storage permission in the manifest for Firefox yet, so it would not work, probably.

Comment on lines +23 to +28
chrome.storage.local.get(['bannerClosed']).then(result => {
if (result.bannerClosed) {
const banner = document.querySelector('.dismissable-banner');
banner.remove();
}
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Since storage.local.get is asynchronous, this will probably leave the banner on the screen for a couple of milliseconds?

Can we actually do the opposite thing here? Instead of hiding based on the flag from storage, can we show the banner, if there is no bannerClosed flag in storage?

@AhmedMuhammedElsaid

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants