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

Make sure that only one radio button is checked in its group (bug 1864136) #17318

Merged
merged 1 commit into from
Nov 24, 2023

Conversation

calixteman
Copy link
Contributor

@calixteman calixteman commented Nov 22, 2023

When the first checked radio is met, the others in the group are set to false.

@Snuffleupagus
Copy link
Collaborator

What happens if multiple, or even all, radio-buttons in one group tries to set itself to checked?
Won't they all attempt to disable each other, and whoever "wins" depends only on the order in the /Annots array?
(Maybe that's not really a problem, since I suppose that this is undefined behaviour from a specification point of view.)

Also, this patch has merge conflicts as-is; please run all tests and I'll review this tomorrow.

@calixteman
Copy link
Contributor Author

What happens if multiple, or even all, radio-buttons in one group tries to set itself to checked? Won't they all attempt to disable each other, and whoever "wins" depends only on the order in the /Annots array? (Maybe that's not really a problem, since I suppose that this is undefined behaviour from a specification point of view.)

Also, this patch has merge conflicts as-is; please run all tests and I'll review this tomorrow.

When the first checked radio is met then the storage will contain false for the others.
When an other radio in the group is met, then we take its value from the storage.
So only the first checked radio will be checked at the end.

@calixteman
Copy link
Contributor Author

/botio test

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_test from @calixteman received. Current queue size: 0

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_test from @calixteman received. Current queue size: 0

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

@Snuffleupagus
Copy link
Collaborator

So only the first checked radio will be checked at the end.

Oh, right!
Can you please extend the comment, slightly, to also mention that the first checked radio-button will always "win" here?

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

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

Total script time: 25.50 mins

  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: FAILED
  different ref/snapshot: 16
  different first/second rendering: 1

Image differences available at: http://54.241.84.105:8877/d7d68630df88e24/reftest-analyzer.html#web=eq.log

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

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

Total script time: 34.49 mins

  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: FAILED
  different ref/snapshot: 21

Image differences available at: http://54.193.163.58:8877/fcece3dd21ea927/reftest-analyzer.html#web=eq.log

@calixteman
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

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

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

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

Live output at: http://54.193.163.58:8877/00938b1eb719c76/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

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

Total script time: 5.69 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/00938b1eb719c76/output.txt

Total script time: 15.81 mins

  • Integration Tests: Passed

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

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

There appears to be ref-test failures in issue14301-page2, in all OSes and browsers, since there's now duplicate rendering in a couple of fields.

src/display/annotation_layer.js Outdated Show resolved Hide resolved
test/integration/scripting_spec.mjs Outdated Show resolved Hide resolved
…4136)

When the first checked radio is met, the others in the group are set to false.
@calixteman
Copy link
Contributor Author

/botio test

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_test from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/1497fafa50e00d2/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_test from @calixteman received. Current queue size: 0

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/1497fafa50e00d2/output.txt

Total script time: 28.48 mins

  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: FAILED
  different ref/snapshot: 17
  different first/second rendering: 1

Image differences available at: http://54.241.84.105:8877/1497fafa50e00d2/reftest-analyzer.html#web=eq.log

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

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

Total script time: 34.37 mins

  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 25

Image differences available at: http://54.193.163.58:8877/eb498f38ff72773/reftest-analyzer.html#web=eq.log

Copy link
Collaborator

@Snuffleupagus Snuffleupagus 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, thank you!

@Snuffleupagus Snuffleupagus mentioned this pull request Nov 23, 2023
@calixteman calixteman merged commit d679078 into mozilla:master Nov 24, 2023
@calixteman
Copy link
Contributor Author

/botio makeref

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_makeref from @calixteman received. Current queue size: 0

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_makeref from @calixteman received. Current queue size: 0

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

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

Total script time: 19.58 mins

  • Lint: Passed
  • Make references: Passed
  • Check references: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

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

Total script time: 23.52 mins

  • Lint: Passed
  • Make references: Passed
  • Check references: Passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants