Skip to content

Conversation

@hcvcastro
Copy link
Member

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

@hcvcastro hcvcastro force-pushed the pr/master/AD branch 2 times, most recently from 4acdc08 to 6c9413a Compare May 8, 2025 11:18
Copy link
Contributor

@caolanm caolanm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I seem to find that every time I press the "save" or "reset" button I get a duplicate section?

Like this: image

browserContainer.classList.add('section');

let elem = document.createElement('h3');
elem.textContent = _('Browser Settings');
Copy link
Contributor

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');
Copy link
Contributor

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');
Copy link
Contributor

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;
Copy link
Contributor

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.

@hcvcastro
Copy link
Member Author

Thank you. The renaming of labels has been completed.

@hcvcastro hcvcastro force-pushed the pr/master/AD branch 2 times, most recently from bcb3e2c to c393887 Compare May 13, 2025 11:05
@caolanm
Copy link
Contributor

caolanm commented May 13, 2025

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


std::string enableAccessibility = stringifyBoolFromConfig(config, "accessibility.enable", false);
if (!userAccessibility.empty()) {
enableAccessibility = userAccessibility;
Copy link
Contributor

@meven meven May 14, 2025

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.

Copy link
Member Author

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.

@hcvcastro hcvcastro force-pushed the pr/master/AD branch 5 times, most recently from 8818b5d to 2663f3d Compare May 16, 2025 13:30
"ClientRequestDispatcher and creating DocBroker for ["
<< docKey << ']');

_ws->sendMessage("browsersetting: null");
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking ..

Copy link
Member Author

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.

@caolanm
Copy link
Contributor

caolanm commented May 19, 2025

Since the "rename the 'accessibilityState'" commit the option does show in the settings page: I just get a blank section like this:

image

@hcvcastro
Copy link
Member Author

Since the "rename the 'accessibilityState'" commit the option does show in the settings page: I just get a blank section like this:

Yes, please click reset to save the new values

@hcvcastro hcvcastro force-pushed the pr/master/AD branch 2 times, most recently from 0b8b81d to 3ff26b1 Compare May 19, 2025 14:31
hcvcastro added 6 commits May 19, 2025 10:51
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>
hcvcastro added 5 commits May 19, 2025 10:51
: 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>
@hcvcastro hcvcastro force-pushed the pr/master/AD branch 2 times, most recently from fc308f1 to f213630 Compare May 19, 2025 19:04
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});
Copy link
Contributor

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.

Copy link
Member Author

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.

@caolanm
Copy link
Contributor

caolanm commented May 20, 2025

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.

@caolanm caolanm changed the base branch from master to private/caolan/view_settings_a11y May 20, 2025 13:20
@caolanm caolanm merged commit 08abf22 into CollaboraOnline:private/caolan/view_settings_a11y May 20, 2025
10 of 13 checks passed
@github-project-automation github-project-automation bot moved this from To Review to Done in Collabora Online May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants