-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Add margin between radio buttons/checkboxes and their labels/strings #17948
Conversation
/botio-linux preview |
/botio test |
I'll trigger a new round of tests. If the change is visible in existing test cases we don't have to do more, but otherwise we'll need to add a (linked or in-repo PDF file) test case to avoid regressions. (We have guidelines on how to do that, but we'll get to that if it actually turns out to be necessary.) /botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://54.193.163.58:8877/7c48208cbdd4612/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://54.241.84.105:8877/7ca844cc39c2e10/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/7ca844cc39c2e10/output.txt Total script time: 26.92 mins
Image differences available at: http://54.241.84.105:8877/7ca844cc39c2e10/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/7c48208cbdd4612/output.txt Total script time: 41.71 mins
Image differences available at: http://54.193.163.58:8877/7c48208cbdd4612/reftest-analyzer.html#web=eq.log |
cdf6d22
to
eca2352
Compare
I squashed the two commits into one. Thanks for your help and patience on this. I will keep an eye out for the test results. |
Fortunately this change is clearly visible in the existing test cases, so we don't have to add new tests, but I do see some unexpected movement. For example in I haven't really noticed other unexpected changes, but there are a lot of reference image changes and I haven't looked through all of them yet, so it'd be good if @calixteman also has a look here given the experience with the XFA code. |
@timvandermeij I reviewed the pdfs and all the observed movement was intended. I agree that it would be great if @calixteman had the time to review the changes though. |
Sorry but I don't see why the movement could have been intended in |
The requirements outlined in Bugzilla Bug 1716806 specify the need to add spacing between radio buttons (not regular buttons), checkboxes, and text inputs and their associated captions. This pull request (PR) addresses the bug by targeting the captions associated with any radio button, checkbox, or text input element that is a direct descendant of an element with either the Regarding PDF firefox-xfa_issue14071:
I did attempt to approach the implementation of my CSS styles differently, but couldn't come up with a superior solution. If these changes are still deemed unacceptable, I will close the PR. |
Why do you want to close this PR ? |
eca2352
to
92c61f3
Compare
I gave the styles another go. The updated styles only affect the margin of checkboxes and radio buttons. |
@@ -157,6 +157,10 @@ | |||
max-height: 100%; | |||
} | |||
|
|||
.xfaRight > :is(.xfaRadio, .xfaCheckbox) { |
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.
Don't we need a rule for .xfaLeft
as well? Moreover, in the Bugzilla ticket the margin directions are reversed, so .xfaRight
sets a margin-left
but here we set a margin-right
; is that correct?
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 styles in the bugzilla ticket target the .xfaCaption
and .xfaCaptionForCheckButton
classes which leads to the unexpected html element movement we observed last week (See calixteman's comment re: xfa_issue14071.pdf).
I took an alternative approach by targeting the .xfaRadio
and .xfaCheckbox
classes instead and as a result had to swap the margin left/right properties.
The xfaRight
styles below work correctly and are included in the PR:
.xfaRight > :is(.xfaRadio, .xfaCheckbox) {
margin-right: 4px;
}
The xfaLeft
styles below do not work correctly and were not included in the PR (I apologize, I should have explained my rationale for this). These styles once again lead to unexpected HTML element movement.
.xfaLeft > :is(.xfaRadio, .xfaCheckbox) {
margin-left: 4px;
}
See the attached examples of incorrect element movement. The green background was add by me to highlight the element shift.
Any suggestions on how to proceed?
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.
@Joewebsta Can you share a link to the pdf you used ?
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 images above were taken from the following test pdfs:
- xfa_issue13994
- xfa_issue14150
- xfa_issue13213
Some additional examples are:
- xfa_bug1716816.pdf
- xfa_bug1716980.pdf
- xfa_bug1718735.pdf
- xfa_dhl_shipment.pdf
- xfa_hsbc_closure.pdf
- xfa_issue13597.pdf
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://54.241.84.105:8877/019065b41c17c79/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://54.193.163.58:8877/47deb7aa1bcec96/output.txt |
As @timvandermeij pointed it, the |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/019065b41c17c79/output.txt Total script time: 26.97 mins
Image differences available at: http://54.241.84.105:8877/019065b41c17c79/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/47deb7aa1bcec96/output.txt Total script time: 42.75 mins
Image differences available at: http://54.193.163.58:8877/47deb7aa1bcec96/reftest-analyzer.html#web=eq.log |
I've previously tried applying margins to the checkbox and radio button inputs (more specifically the Despite a couple of attempts, I've been unable to resolve this issue satisfactorily. @calixteman and @timvandermeij, thank you for help and patience, but I believe this bug exceeds my current ability to address. |
Did you try something like (and its equivalent for
? |
That said, don't give up :) |
@calixteman Thanks for your suggestion. I applied the styles below locally, but still observed the element shifting unfortunately. .xfaRight > input {
margin-right: 4px;
}
.xfaLeft > input {
margin-left: 4px;
} |
Closing since there has been no activity on this PR for over a month. However, please feel free to reopen this PR or create a new PR once the reference tests are passing locally; you can run them locally using |
Bugzilla Bug 1716806
This PR adds margin between radio buttons/checkboxes and their labels/strings.
Links to images that illustrate the changes can be found below:
Links to the original PDFs can be found below:
I don't have extensive experience creating PRs, so I'd be happy to receive any feedback you might have.