Skip to content
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

Consistently dispatch events, if needed, when setting AppOptions #18495

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

Currently we'll only dispatch events, for the options that support it, when updating preferences. Since this could potentially lead to inconsistent behaviour, let's avoid any future surprises by always dispatching events regardless of how the relevant option is being changed.

Obviously we should then also dispatch events in AppOptions.set, and to avoid adding even more duplicated code this method is changed into a wrapper for AppOptions.setAll.
While this is technically a tiny bit less efficient I don't think it matters in practice, since outside of development- and debug-mode AppOptions.set is barely used.

@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/08bc7d52569a0bb/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/08bc7d52569a0bb/output.txt

Total script time: 1.75 mins

Published

Copy link
Contributor

@timvandermeij timvandermeij left a comment

Choose a reason for hiding this comment

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

r=me, with the comment below addressed. I like the idea of making set a simple wrapper for setAll; thanks!

web/app_options.js Outdated Show resolved Hide resolved
Currently we'll only dispatch events, for the options that support it, when updating preferences. Since this could potentially lead to inconsistent behaviour, let's avoid any future surprises by *always* dispatching events regardless of how the relevant option is being changed.

Obviously we should then also dispatch events in `AppOptions.set`, and to avoid adding even more duplicated code this method is changed into a wrapper for `AppOptions.setAll`.
While this is technically a tiny bit less efficient I don't think it matters in practice, since outside of development- and debug-mode `AppOptions.set` is barely used.
@Snuffleupagus Snuffleupagus force-pushed the AppOptions-setAll-EVENT_DISPATCH branch from 5a9d4c3 to 58c7b5b Compare July 27, 2024 08:11
@Snuffleupagus
Copy link
Collaborator Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/a3448461d1560c9/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/e945d87146cc0d6/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/a3448461d1560c9/output.txt

Total script time: 11.06 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/e945d87146cc0d6/output.txt

Total script time: 19.95 mins

  • Integration Tests: FAILED

@Snuffleupagus
Copy link
Collaborator Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/e9dae332131dc80/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/f8cbbb759b2a507/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/f8cbbb759b2a507/output.txt

Total script time: 10.93 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/e9dae332131dc80/output.txt

Total script time: 18.19 mins

  • Integration Tests: FAILED

@Snuffleupagus Snuffleupagus merged commit 3a21f03 into mozilla:master Jul 27, 2024
7 checks passed
@Snuffleupagus Snuffleupagus deleted the AppOptions-setAll-EVENT_DISPATCH branch July 27, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants