-
Notifications
You must be signed in to change notification settings - Fork 117
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
Passing some UI Defaults to loleaflet frame #1211
Conversation
These ui defaults determine some widget states at the start of the document which is hidden or shown Some of them such as Ruler Statusbar and Sidebar can be hidden at start with this patch. If not set, collabora online will assume they are true Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
@juliushaertl Can you please review these patches? Thank you |
Signed-off-by: Mert Tumer <mert.tumer@collabora.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.
See inline for smaller comments. In general window.parent should be avoided as it doesn't work across different domains, which might occur in federated or global scale setups.
Otherwise 👍 from my side.
} | ||
var str = '' | ||
for (var cssVarKey in cssVarMap) { | ||
var cStyle = window.parent.getComputedStyle(document.documentElement).getPropertyValue(cssVarKey) |
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.
var cStyle = window.parent.getComputedStyle(document.documentElement).getPropertyValue(cssVarKey) | |
var cStyle = window.getComputedStyle(document.documentElement).getPropertyValue(cssVarKey) |
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.
The CSS variables are also properly loaded inside of the document frame.
var cStyle = window.parent.getComputedStyle(document.documentElement).getPropertyValue(cssVarKey) | ||
if (!cStyle) { | ||
// try suffix -dark instead | ||
cStyle = window.parent.getComputedStyle(document.documentElement).getPropertyValue(cssVarKey + '-dark') |
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.
cStyle = window.parent.getComputedStyle(document.documentElement).getPropertyValue(cssVarKey + '-dark') | |
cStyle = window.getComputedStyle(document.documentElement).getPropertyValue(cssVarKey + '-dark') |
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.
Thank you for the reply. Initially it was like this but later we discovered that it does not work on Firefox without parent. The CSS variables become empty string. The only solution I found was using window.parent.
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.
Indeed seems to be a firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1471231
Then let's get this in as it is and maybe see if we can work around that by not using display: none;
but opacity of 0 until the frame is loaded.
Co-authored-by: Julius Härtl <jus@bitgrid.net>
These ui defaults determine some widget states
at the start of the document which is hidden or shown
Some of them such as Ruler Statusbar and Sidebar can be
hidden at start with this patch. If not set, collabora
online will assume they are true
Signed-off-by: Mert Tumer mert.tumer@collabora.com
Summary
TODO
Checklist