-
Notifications
You must be signed in to change notification settings - Fork 940
wsd: preprocess the per-user accessibility feature. #11854
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
wsd: preprocess the per-user accessibility feature. #11854
Conversation
4acdc08 to
6c9413a
Compare
caolanm
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.
| browserContainer.classList.add('section'); | ||
|
|
||
| let elem = document.createElement('h3'); | ||
| elem.textContent = _('Browser Settings'); |
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.
Lets call this "View Settings" instead of "Browser Settings".
| saveButton.type = 'button'; | ||
| saveButton.id = 'xcu-save-button'; | ||
| saveButton.classList.add('button', 'button-primary'); | ||
| saveButton.title = _('Save Document settings'); |
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.
And "Save View Settings"
| resetButton.type = 'button'; | ||
| resetButton.id = 'xcu-reset-button'; | ||
| resetButton.classList.add('button', 'button--vue-secondary'); | ||
| resetButton.title = _('Reset to default Document settings'); |
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.
And: Reset to default View settings
| class SettingIframe { | ||
| private wordbook; | ||
| private xcuEditor; | ||
| private _browserSetting; |
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.
Can we rename browser/_browser to view/_view so its different to the existing browser settings. We want this as an additional thing separate from the existing "Interface" which contains the existing browser settings.
|
Thank you. The renaming of labels has been completed. |
bcb3e2c to
c393887
Compare
|
UI works for me now, no reload/save duplication problem. Just need to download/apply these settings and if view accessibility is enabled then force the appropriate accessibiltyState flag to kit as on so that screen reading is automatically enabled when this setting was toggled on |
wsd/FileServer.cpp
Outdated
|
|
||
| std::string enableAccessibility = stringifyBoolFromConfig(config, "accessibility.enable", false); | ||
| if (!userAccessibility.empty()) { | ||
| enableAccessibility = userAccessibility; |
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.
We should make sure userAccessibility can only be true|false, here it will inject any value it receives without any check.
enableAccessibility = "true";
For instance.
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.
Yes, I believe the parseJSON does the prerequisite validation. Anyway, I will check it. Thanks.
8818b5d to
2663f3d
Compare
wsd/RequestVettingStation.cpp
Outdated
| "ClientRequestDispatcher and creating DocBroker for [" | ||
| << docKey << ']'); | ||
|
|
||
| _ws->sendMessage("browsersetting: null"); |
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 imagine the intent was to put this inside the isUnitTesting and not duplicate it
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.
Checking ..
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 first is a raw WebSocket connection established before session creation, while the second uses the session instance, making them distinct. We can consider improvements after the unit tests pass.
Yes, please click reset to save the new values |
0b8b81d to
3ff26b1
Compare
Change-Id: I986c274213c07d5b7b81eb0cceca162fcbebd09e Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: I41da74292328345dea4f680134ce77995b72819c Signed-off-by: Henry Castro <hcastro@collabora.com>
It is the correct name to use in client-side JavaScript. Change-Id: I6c4a884de1c9ca82ff2573d277e4e9b07e2a289a Signed-off-by: Henry Castro <hcastro@collabora.com>
It is necessary because the system must wait for a server response (e.g., 'browsersetting:') to retrieve the user's data view settings before loading a document. Change-Id: If74ad7aa00a35e7ee0851b6ca887726651221c90 Signed-off-by: Henry Castro <hcastro@collabora.com>
Use the new 'browsersetting:' data to forward to the child session. Change-Id: Ic8bbdb18ee94f5eba94dc22fc9ecbefdd83831aa Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: I70779c13bed96454f19deaa07a11afb349f352c4 Signed-off-by: Henry Castro <hcastro@collabora.com>
: Send null browser setting data as soon as the WebSocket connection is upgraded, to load the document for the "file://" protocol. Change-Id: I0a479d6e5a3a757195accbd300ee33fd3705ba29 Signed-off-by: Henry Castro <hcastro@collabora.com>
Otherwise, our example file "debug.html" will not work. Change-Id: I6b37ade12ddec545587a088d2c671631b3818812 Signed-off-by: Henry Castro <hcastro@collabora.com>
It should be processed uniquely during the very early WebSocket connection opening and should not be queued. Change-Id: Iaca25ba81da5287d9c45ef0c6e01b59197b7ef2c Signed-off-by: Henry Castro <hcastro@collabora.com>
It must be initialized when the server sends 'browsersetting:' data; otherwise, the input will have the wrong class type upon initialization. Change-Id: I5226e92c4be921d93dd6c9e236db4bf428c1c8a5 Signed-off-by: Henry Castro <hcastro@collabora.com>
Our C++ unit tests handle manual URL loading. It’s better not to disrupt the progress of loading messages. Change-Id: I1446fc230938a6ecd86892496e51430acc112a2d Signed-off-by: Henry Castro <hcastro@collabora.com>
undefined empty() Change-Id: Id008dbc42d751b22e8557030dc760e9f6990f3bc Signed-off-by: Henry Castro <hcastro@collabora.com>
fc308f1 to
f213630
Compare
Loading the URL document takes a little longer than expected. Adjust the timeout accordingly. Change-Id: Ib9a7150c81b4386aa84cf49d95cc1588e1fe32c4 Signed-off-by: Henry Castro <hcastro@collabora.com>
| function documentChecks(skipInitializedCheck = false) { | ||
| cy.log('>> documentChecks - start'); | ||
|
|
||
| cy.cGet('#document-canvas', {timeout : Cypress.config('defaultCommandTimeout') * 2.0}); |
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.
Allowing document to load 300s seems to be too much (default is 10s * 2 IIRC).
CI is in a good shape now so not a problem.
When we can't get canvas there is most often problem on the server side, some error which kills websocket or similar. Did you try to run this locally and debug? make run-desktop in cypress_test directory. See logs in the browser, requests. Also there are error.log in workdir which might helpful to see.
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 was testing the values, but it still fails. I tried running it locally with run-mobile spec=something, and it loads the canvas and starts testing the unit tests. However, these changes should not affect loading the JavaScript bundle or initializing the map. Interestingly, I will start adding logs to identify the issue.
|
I think the admin ui stuff is good, but it looks fairly invasive for the browser side. I have a thought about how to make this a more minimal. |
08abf22
into
CollaboraOnline:private/caolan/view_settings_a11y


Each time the user requests the cool.html page
(an indirect request through an iframe), it will
include the user’s browser setting preferences.
In the case of accessibility, it will override the
global variable to enable the accessibility feature.
Change-Id: Ie56a4b3cc43e93cb7b72ede0ceaa184e3a438669
Signed-off-by: Henry Castro hcastro@collabora.com