-
Notifications
You must be signed in to change notification settings - Fork 4k
Preload fonts #3366
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
Preload fonts #3366
Conversation
|
gui.jsx was refactored in the meantime and I would appreciate help figuring out how to merge with the refactor |
rschamp
left a comment
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.
@fsih Is there any way to enumerate the fonts we need and include them in the head of the document instead? Then they'd just be a prerequisite to loading the GUI entirely.
If there's not a way to do that, please work with @benjiwheeler to resolve the conflicts — it's likely that will change this implementation somewhat because the way projects are loaded has changed.
|
I tested removing the scratch-font-styles block from gui and pasting it into playground/index.ejs, and it didn't fix the font cut-off issue. I think Chrome is trying to be smart and not load the font until it's referenced. |
e25ab36 to
6974a98
Compare
| // ability to compose reducers. | ||
| const WrappedGui = compose( | ||
| ErrorBoundaryHOC('Top Level App'), | ||
| FontLoaderHOC, |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
| process.nextTick(() => expect(mockedOnLoadedProject).toHaveBeenLastCalledWith(LoadingState.LOADING_VM_WITH_ID)); | ||
| }); | ||
| test('if there is no projectData, nothing is rendered', () => { | ||
| test('if there is projectData, the child is rendered', () => { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
rschamp
left a comment
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.
This was a tough one, DD, nice work tracking it down!
Resolves
What Github issue does this resolve (please include link)?
Proposed Changes
Preload fonts
Reason for Changes
Prevent imported text from being cut off
Test Coverage
Tested many browser/OS combos and IE by loading projects 249881325, 228228816, and loading the default project and then uploading those 2 projects.
Browser Coverage
Check the OS/browser combinations tested (At least 2)
Mac
Windows
Chromebook
iPad
Android Tablet