-
Notifications
You must be signed in to change notification settings - Fork 121
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
Code Runner: The full-screen and exit buttons lack keyboard tab support #773786 #209
Conversation
Well done on finding a pure CSS fix. I was thinking of a more complex solution that involved using JavaScript to wrap the wrapper. I am however a bit sad to see the 2px black rectangle around the full-screen image. I particularly liked how discreet the previous icon was. Once you knew about it, it was trivial to find it but it wasn't in your face. Since I don't think most users will want this functionality, at least in our environment, I'd prefer to keep it unobtrusive myself. And that would presumably mean you didn't need to expand the bottom of the editor, although that doesn't particularly worry me. How would you feel about running without the border for a while to get a feel for how much confusion the lack of a border causes? However, since OU is driving this, I don't wish to push my arguments too hard. How much feedback have you gathered on the appearance of the current version? I assume Tim is in favour of the louder icon? |
Hi @trampgeek, Thanks for your feedback. I want to increase the height of the bottom editor from 1 to 2 pixels. This change is necessary because, in certain browsers, such as Firefox, the resize icon near the button fullscreen is bigger than in another browser. Additionally, on the question editing page, I aim to ensure that the border (the black rectangle) is fully displayed when a user utilizes the "TAB" key to navigate to the fullscreen button. Consequently, I have adjusted its position slightly upward, as illustrated in the image below: I hope this makes sense to you. Thanks you @trampgeek. |
Oh, I'm sorry danghieu. I should have studied your code more closely to spot that the border was only there when selected by a TAB. I'm totally happy for you to increase the GUTTER variable in the UI wrapper by 1 or 2 pixels. Do you want to do that before I merge? I'm happy to merge right now if you prefer. |
Hi @trampgeek, |
Many thanks for all the work on this @danghieu1407. I dont understand the CI fail case - it looks spurious, and I don't see how it can possibly be due to your changes. So I've merged and we'll see what happens on the next CI run. |
Hi @trampgeek, |
True, and that one looked spurious, too. It was a different error: "ERR_CONNECTION_REFUSED" on trying to contact Jobe. Which makes no sense. The Master branch hasn't changed since your first pull request, which didn't throw up any CI errors. Perhaps it's the fact that the php 8.2 case - the one that has failed both times - is using moodle-branch 'master', whereas the other tests are all with moodle-branches tagged STABLE. |
Hi @trampgeek, First, I suspect my change of the JavaScript file (meaning the change of the GUTTER increasing to 2px), So I have reset the GUTTER to default (t.GUTTER = 14) and add Second, I have reverted all changes in the JS file (meaning I just pushed the screenmode_button.mustache, and style.css files). Then I push it to my temporary branch. Then the CI notify failed (test cli1) Third, I have reverted all changes including the style.css file(meaning I just pushed the screenmode_button.mustache) Then I pushed it to my temporary branch. Then the CI notify failed (test cli2) This is my CI result link: CI result Finally, I ran that fail at my local and the result got passed. I think my change is not a reason for the CI failure. |
I hope you didn't think I was blaming your changes for the CI fail. I certainly wasnt. Indeed it seemed obvious to me that since your previous commit had a clean run and your latest one differed only in the setting of the GUTTER variable, that either the fail was spurious (weird things happen occasionally!) or a consequence of a change to the latest Moodle branch. Since the same error occurred after the merge, I'm putting my money on a change in Moodle master. I'll look into it in due course. Please don't worry about it. Sorry if there was a misunderstanding but thanks for those extra checks.
…________________________________
From: Nguyen Dang Hieu ***@***.***>
Sent: Thursday, April 4, 2024 11:19:05 PM
To: trampgeek/moodle-qtype_coderunner ***@***.***>
Cc: Richard Lobb ***@***.***>; Mention ***@***.***>
Subject: Re: [trampgeek/moodle-qtype_coderunner] Code Runner: The full-screen and exit buttons lack keyboard tab support #773786 (PR #209)
Hi @trampgeek<https://github.com/trampgeek>,
I have a look for this CI fail. To demonstrate my pull request is not a reason for the CI failure.
This is an image for running CI:
image.png (view on web)<https://github.com/trampgeek/moodle-qtype_coderunner/assets/74227813/f4c20dca-ce7c-41af-ae10-b381183963b8>
First, I suspect my change of the JavaScript file (meaning the change of the GUTTER increasing to 2px), So I have reset the GUTTER to default (t.GUTTER = 14) and add const hAdjusted = h - this.GUTTER - 2; in 541<https://github.com/danghieu1407/moodle-qtype_coderunner/blob/bef9f8e024fa39c3d8f99b041fe4fc9d306dffff/amd/src/userinterfacewrapper.js#L541> . Then I push it to my temporary branch. Then the CI notify failed (test cli)
Second, I have reverted all changes in the JS file (meaning I just pushed the screenmode_button.mustache, and style.css files). Then I push it to my temporary branch. Then the CI notify failed (test cli1)
Third, I have reverted all changes including the style.css file(meaning I just pushed the screenmode_button.mustache) Then I pushed it to my temporary branch. Then the CI notify failed (test cli2)
This is my CI result link: CI result<https://github.com/danghieu1407/moodle-qtype_coderunner/actions>
Finally, I ran that fail at my local and the result got passed.
image.png (view on web)<https://github.com/trampgeek/moodle-qtype_coderunner/assets/74227813/e7071a16-e052-4133-9572-0050c4b803a9>
I think my change is not a reason for the CI failure.
I hope this makes sense to you.
Many thanks
—
Reply to this email directly, view it on GitHub<#209 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAIM2VVB6ET52P2RBXLPSVLY3USJTAVCNFSM6AAAAABFIQECL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZWG43TKNRUGE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
This email may be confidential and subject to legal privilege, it may not reflect the views of the University of Canterbury, and it is not guaranteed to be virus free. If you are not an intended recipient, please notify the sender immediately and erase all copies of the message and any attachments.
|
Hi @trampgeek, The root cause of the failure is a new change in the Moodle master. |
Hi @trampgeek, I have found the root cause and fix it in Pull request Behat fix Pull Request. |
…rt #773786 (#209) Co-authored-by: DangHieu1407 <hnd34@open.ac.uk>
Hi @timhunt, @trampgeek,
I have removed the tab index for using the "Tab" key to the button fullscreen and added the styling for buttons fullscreen and exit fullscreen button.
This modification is compatible with Firefox, Edge, Safari, and Chrome. Here's a screenshot of the implementation:
The bottom of the editor is too small as in the image below. The bottom outline of the button when focusing will not display fully like this:
The bottom outline:
The bottom editor:
I have used CSS to fix this in this pull request. This issue happens because of the
position-relative
of the wrapper. But we must use theposition-relative
because it will help the scratchpad UI display two fullscreen buttons.Could I expand the height bottom of the editor by 1 to 2 px in this code 541. This adjustment will address the bottom outline issues across different browsers and reduce the need for extensive CSS when focusing on buttons.
What do you think @timhunt, @trampgeek? If you disagree with expanding the bottom of the editor and prefer fixing it using CSS, please let me know. The code is ready for review (I have fixed the bottom outline in this PR, and test in Chrome, Edge, Firefox, and Safari).
I hope this clarifies the situation for you.
Many thanks.