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(devtools): support icons in offline mode #45743
feat(devtools): support icons in offline mode #45743
Conversation
Yes please! Great idea! |
Thank you for taking on this PR
A couple of notes:
- Currently material icons are being loaded from the
index.html
file. Lets do the same thing here but load our local font instead - Ideally we want to use this local material icons font for our extension popups as well. Right now they try to load in material icons from https://fonts.googleapis.com/icon?family=Material+Icons. Can we try replacing these with this local font as well? See
devtools/projects/shell-browser/src/popups/
third_party/github.com/google/material-design-icons/BUILD.bazel
exports the LICENSE for material-design-icons as well. I think we should include that in the build in the same directory that our font is located in.
@AleksanderBodurri thanks for reviewing this PR and catching the typo! Will follow your notes to double-check everything. Regarding the license file, are you suggesting adding the path to that license file into the filegroup within this devtools/projects/shell-browser/src/assets/BUILD.bazel so it gets brought into the build as well together with the other two font files? |
Hi @AleksanderBodurri , a couple of questions from myself:
Thanks in advance! |
@@ -2,15 +2,19 @@ licenses(["notice"]) | |||
|
|||
# Downloaded from: https://github.com/google/material-design-icons/blob/3.0.1/LICENSE | |||
# Timestamp: 06/02/2019 | |||
exports_files(["LICENSE.txt"]) | |||
exports_files(["LICENSE"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LICENSE does not have a txt extension
Thanks for addressing the comments, I'll answer some of your questions here and do a more thorough review soon.
The build should be working. Can you elaborate on what you mean by the add-on doesn't seem ready?
This should be fine since it looks like the only code that was relying on the vendored material icons font was removed in #38846. CC @devversion
Could be some incompatibility with our bazel tests and windows. I'll investigate this more to see what can be done. When this PR leaves draft status the CI will trigger tests that run |
@AleksanderBodurri Thanks for the reply. No, nothing wrong with the firefox add-on, apparently it is some minor issues with my local environment and it's fixed now. I've converted my PR to ready-to-review status, hopefully CI could run the test for me anyhow. I tried our devtools as a temporary firefox extension and the icons are all loaded in offline mode as well. Please feel free to give it a try and see if it works on your end. Thanks! |
Awesome work, I tried it on my end and it looks great
I left one nit suggesting we remove an unnecessary comment. LGTM otherwise
third_party/github.com/google/material-design-icons/LOCAL_MODS.md
Outdated
Show resolved
Hide resolved
LGTM for the vendoring, just one suggestion. The rest I will leave to Aleksander for devtools
third_party/github.com/google/material-design-icons/BUILD.bazel
Outdated
Show resolved
Hide resolved
@AleksanderBodurri @devversion I have pushed my refactor based on your comments. Do we need to add the "target" label for this pull request to trigger CI testing? Thanks. |
No CI testing is triggered yet |
@hereiskeith Could you rebase this PR onto |
6e19207
e3d1ccc
to
6e19207
Compare
Merge-assistance: I've pushed a rebase to rerun the CI as it was failing the @AleksanderBodurri FYI I've changed the label to |
@hereiskeith the rebase triggered a CI rerun and as a result, the |
Add support to material design icons in offline mode for Angular Devtools. Self hosting the web font so icons are loaded regardless of network connection. Bring the font file as well as its corresponding css file from third_party repo through bazel into shell-browser directory while building.
6e19207
to
b99c18a
Compare
Thanks, @AndrewKushnir for the help and the follow-up. I have merged those three commits into one. Let me know if it's still not working, thanks! |
This PR was merged into the repository by commit 5e404d3. |
Add support to material design icons in offline mode for Angular Devtools. Self hosting the web font so icons are loaded regardless of network connection.
Bring the font file as well as its corresponding css file from third_party repo with bazel into shell-browser directory while building. No extra file needs to be commited to the codebase.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #45430
What is the new behavior?
Support material design icons in offline mode
Does this PR introduce a breaking change?