-
Notifications
You must be signed in to change notification settings - Fork 46.4k
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 Bug]: provide an icon to Edge devtools? #26352
Comments
@yanlingwang23: We're sorry you've seen this error. ❤️ It looks like you forgot to specify a valid URL. (This means that we will not be able to reproduce the problem you're reporting.) Please help us by providing a link to a CodeSandbox (https://codesandbox.io/s/new), a repository on GitHub, or a minimal code example that reproduces the problem. (Screenshots or videos can also be helpful if they help provide context on how to repro the bug.) Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve Issues without repros are automatically closed but we will re-open if you update with repro info. |
Thank you for providing repro steps! Re-opening issue now for triage. |
I was looking at the code a little bit yesterday and, as Yanling said, the React extension does not include an icon when calling The icon was probably omitted from this line of code because Firefox was, so far, the only browser to support DevTools panel icons, but also supported using the icon defined in the manifest file if the panel icon was missing. Now, Edge DevTools also supports icons on DevTools panels (only when Focus Mode is enabled), but does so only if the icon is passed in the So it'd be great if React would pass an icon there, and remove the emoji in the panel title. This way, both Firefox and Edge (Focus Mode) would have the nice icon on the DevTools panel. |
Hi! I'm interested in working on this as a first contribution. Is the intention to pass the icon to |
After looking into the issue, I found that the reason the icon was omitted is because Firefox was the only browser to support DevTools panel icons, but also supported using the icon defined in the manifest file if the panel icon was missing. However, Edge DevTools now also supports icons on DevTools panels (only when Focus Mode is enabled), but does so only if the icon is passed in the To solve this issue, I propose that we add an icon URL as the second argument to the |
Hi Diego, thanks for looking into this. Yes, you are right about the icon. But we're good with the current panel title since we still have the default UI that does not support the icon. I think Harry is working on this and has a PR out, I've left a few comments there. Thank you all for looking into this issue. |
is it still open if yes i want to work on this |
@yanlingwang23 Thanks for the feedback. I have updated the PR. |
@harryzumwalt-wk Would it be possible for you to show me how you are working on this issue? I'm new to open source contributions and would like to learn more about the process. |
@chaithraramesh31 You can look at the PR linked in this issue to see the work I’ve done. I recommend reading the contribution docs that are referenced in the README. There is also this video, which shows how some of the key internals work. |
if this is taken can you guys change the tag to good-first-issue (taken) |
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary Addresses #26352. This PR explicitly passes an icon to `chrome.devtools.panels.create()`, so that edge devtools will display the icon when in [Focus Mode](https://learn.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/experimental-features/focus-mode). <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> ## How did you test this change? Passing test suite (`yarn test` & `yarn test --prod`) ✅ Passing lint (`yarn linc`) ✅ Passing type checks (`yarn flow`) ✅ **Visual Testing** Before Changes | After Changes :-------------------------:|:-------------------------: ![](https://user-images.githubusercontent.com/15645169/229591145-fe99df06-e2e3-4f21-ae31-f770d584ca6c.png) | ![](https://user-images.githubusercontent.com/15645169/229591594-26c6cbaf-f345-4367-b234-8f3c8ab3ccb1.png) <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? If you leave this empty, your PR will very likely be closed. -->
Resolved with #26543 |
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary Addresses facebook#26352. This PR explicitly passes an icon to `chrome.devtools.panels.create()`, so that edge devtools will display the icon when in [Focus Mode](https://learn.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/experimental-features/focus-mode). <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> ## How did you test this change? Passing test suite (`yarn test` & `yarn test --prod`) ✅ Passing lint (`yarn linc`) ✅ Passing type checks (`yarn flow`) ✅ **Visual Testing** Before Changes | After Changes :-------------------------:|:-------------------------: ![](https://user-images.githubusercontent.com/15645169/229591145-fe99df06-e2e3-4f21-ae31-f770d584ca6c.png) | ![](https://user-images.githubusercontent.com/15645169/229591594-26c6cbaf-f345-4367-b234-8f3c8ab3ccb1.png) <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? If you leave this empty, your PR will very likely be closed. -->
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary Addresses facebook#26352. This PR explicitly passes an icon to `chrome.devtools.panels.create()`, so that edge devtools will display the icon when in [Focus Mode](https://learn.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/experimental-features/focus-mode). <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> ## How did you test this change? Passing test suite (`yarn test` & `yarn test --prod`) ✅ Passing lint (`yarn linc`) ✅ Passing type checks (`yarn flow`) ✅ **Visual Testing** Before Changes | After Changes :-------------------------:|:-------------------------: ![](https://user-images.githubusercontent.com/15645169/229591145-fe99df06-e2e3-4f21-ae31-f770d584ca6c.png) | ![](https://user-images.githubusercontent.com/15645169/229591594-26c6cbaf-f345-4367-b234-8f3c8ab3ccb1.png) <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? If you leave this empty, your PR will very likely be closed. -->
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary Addresses #26352. This PR explicitly passes an icon to `chrome.devtools.panels.create()`, so that edge devtools will display the icon when in [Focus Mode](https://learn.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/experimental-features/focus-mode). <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> ## How did you test this change? Passing test suite (`yarn test` & `yarn test --prod`) ✅ Passing lint (`yarn linc`) ✅ Passing type checks (`yarn flow`) ✅ **Visual Testing** Before Changes | After Changes :-------------------------:|:-------------------------: ![](https://user-images.githubusercontent.com/15645169/229591145-fe99df06-e2e3-4f21-ae31-f770d584ca6c.png) | ![](https://user-images.githubusercontent.com/15645169/229591594-26c6cbaf-f345-4367-b234-8f3c8ab3ccb1.png) <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? If you leave this empty, your PR will very likely be closed. --> DiffTrain build for commit 5426af3.
Website or app
Website: https://reactjs.org/
Repro steps
open developer tools in Edge
go to settings -> experiment -> enable Focus Mode -> reload DevTools
we can see the react extension is loaded as below in devtools:
since the react extension doesn't provide the icon when it's created, devtools fallback to use the default icon to represent the extension. However, we've received couple of requests from users that they'd like to see the icon in the panel.
for instance:
Wondering if it's possible to provide an icon to Edge in the
chrome.devtools.panels.create()
?Thank you for your support.
How often does this bug happen?
Every time
DevTools package (automated)
No response
DevTools version (automated)
No response
Error message (automated)
No response
Error call stack (automated)
No response
Error component stack (automated)
No response
GitHub query string (automated)
No response
The text was updated successfully, but these errors were encountered: