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
fix: replace backslash with slash so to support rendering on Windows (#3120) #3122
Conversation
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.
works for me but as you suggested, maybe it's better to have two fields instead of one field
…ontainers#3120) Signed-off-by: lstocchi <lstocchi@redhat.com>
@@ -46,7 +46,7 @@ onMount(() => { | |||
}); | |||
|
|||
fontsToAdd.forEach(font => { | |||
const src = font.src.map(l => `${toUrl(l.location)} format('${l.format}')`).join(', '); | |||
const src = font.src.map(l => `${toUrl(l.browserURL)} format('${l.format}')`).join(', '); |
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.
maybe it means we wouldn't need the toUrl method ?
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.
I thought there was a reason to have url('file://${location.replace(/'/g, '%27')}')
in the client. Do i move everything in the server?
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.
I think that now that we provide the field for the client on the server, we could do everything on the server side so client is dummy, just use the field
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.
Worked for me LGTM!
Signed-off-by: lstocchi <lstocchi@redhat.com>
@benoitf updated. Please give it another look |
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.
LGTM but we have a style error:
Strings must use singlequote
Signed-off-by: lstocchi <lstocchi@redhat.com>
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.
approving again
thanks @lstocchi |
…ontainers#3120) (containers#3122) * fix: replace backslash with slash so to support rendering on Windows (containers#3120) Signed-off-by: lstocchi <lstocchi@redhat.com> * generate whole browser url from server side Signed-off-by: lstocchi <lstocchi@redhat.com> * fix: lint warning Signed-off-by: lstocchi <lstocchi@redhat.com> --------- Signed-off-by: lstocchi <lstocchi@redhat.com>
What does this PR do?
This PR replaces backslashes with slashes when creating the url of a font style.
On Windows backslashes get removed and it results in a wrong url.
Screenshot/screencast of this PR
N/A
What issues does this PR fix or reference?
this fixes #3120
How to test this PR?
N/A
This is useful for #1899 to work