-
Notifications
You must be signed in to change notification settings - Fork 70
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
[SOL-1944] Submit Answer UI #86
[SOL-1944] Submit Answer UI #86
Conversation
Thanks for the pull request, @e-kolpakov! It looks like you're a member of a company that does contract work for edX. If you're doing this work as part of a paid contract with edX, you should talk to edX about who will review this pull request. If this work is not part of a paid contract with edX, then you should ensure that there is an OSPR issue to track this work in JIRA, so that we don't lose track of your pull request. To automatically create an OSPR issue for this pull request, just visit this link: https://openedx-webhooks.herokuapp.com/github/process_pr?number=86&repo=edx-solutions%2Fxblock-drag-and-drop-v2 |
0d660d4
to
0450f4c
Compare
@mtyaka for some reason tests are extremely flaky - at least one UPD: and just after I have said that, CI build finishes successfully. :) |
display_name=_("Maximum number of attempts"), | ||
help=_( | ||
"Limits the number of attempts learner can use to complete the problem. " | ||
"For unlimited attempts, set to zero. This setting have no effect in standard mode." |
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.
typo: "have no effect" -> "has no effect"
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.
Actually, this field and related studio edit functionality have already been implemented in #81, you should probably remove this code from this PR.
2af17ff
to
a909bd8
Compare
@e-kolpakov Thanks for the updates! FYI both #81 and #82 have been merged into master, so if you rebase you can remove the extra commits from this PR. I have been testing this locally. The code looks good and it's working correctly. I only have a few suggestions regarding the styles of the buttons. (I am no UI expert, but these suggestions should make the styles closer to the CAPA styles from https://github.com/edx/edx-platform/pull/13052) :
Tiny buttons in the Studio: Buttons in the LMS: The sizes are good, but notice the issues outlined above:
|
a909bd8
to
f822741
Compare
Rebased from a909bd8 |
289df94
to
ca3f822
Compare
@mtyaka I've addressed the issues you have outlined - please review one more time. |
Thanks @e-kolpakov, it looks very nice! 👍
|
@cahrens, @staubina, @cptvitamin, @sstack22 this PR is ready for your review. |
@alisan @chris-mike, look, they've copied our new button bar design! 💯 |
The focus should go someplace sensible after "Reset" is pressed. For capa problems, focus will go back to the top of the problem (the "meta" section after the problem name). See https://openedx.atlassian.net/browse/TNL-4882 And I know Submit isn't working yet, but for that story you should think about where keyboard focus should go. |
I believe the number of attempts remaining should be linked to the Submit button through aria-describedby. @cptvitamin can confirm. |
In Studio the icons are italicized. You should be using spans for icons, not i tags. Also make sure to mark the icons as aria-hidden. For examples, see http://ux.edx.org/design_elements/icons/. |
h('button.modal-dismiss-button', gettext("OK")) | ||
h('div.keyboard-help-dialog', [ | ||
h('div.modal-window-overlay'), | ||
h('div.modal-window', {attributes: {role: 'dialog', 'aria-labelledby': 'modal-window-title'}}, [ |
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.
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.
@cahrens technically I've just moved this code around (so this is an issue with previous versions of the code), but I've fixed it anyway.
@cahrens no, I was trying to explain that I was not able to do that :) |
@cahrens I've just updated the sandbox |
For focus after pressing Reset, it might be better to put the focus up on the problem description (so it is read again by the screen reader). @cptvitamin can advise on this detail in his review. Also, as I mentioned above the number of attempts remaining should be linked to the Submit button through aria-describedby. Again, @cptvitamin can confirm. |
I still have a concern about the button bar on small devices-- when it wraps, the help and reset buttons should be left-aligned above Submit (to match the new capa behavior). If you have trouble achieving this, check in with @alisan617. |
@@ -202,7 +202,7 @@ function DragAndDropTemplates(configuration) { | |||
h('div.modal-window-overlay'), | |||
h('div.modal-window', {attributes: {role: 'dialog', 'aria-labelledby': 'modal-window-title'}}, [ | |||
h('div.modal-header', [ | |||
h('h2.modal-window-title', gettext('Keyboard Help')) | |||
h('h2.modal-window-title#modal-window-title', gettext('Keyboard Help')) |
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.
f1406ec
to
c3b0cca
Compare
|
My issue was corrected in another PR |
@e-kolpakov Can you update the sandbox? I'm still seeing the help and reset buttons be right-aligned on wrap. |
@cahrens sure - give me 15 minutes. |
@cahrens updated. |
@cahrens that's because I'm just copying WIP styles from CAPA problems redesign: https://github.com/edx/edx-platform/pull/13052#issuecomment-237292836 :) I've fixed the problem, but there it is not ideal still - for some screen sizes and "Submit" button length, sidebar buttons will still be shown on the right: I would suggest keeping this "good enough" solution (I believe it is good enough, but correct me if I'm wrong) and make it better when/if CAPA redesign yields a better approach. I'm updating sandbox right now, so hopefully by the time you see this message it will be ready. |
343eb54
to
5754ac6
Compare
Nit: the Help/Reset buttons stay left-aligned for a time during the "wrapping" phase. See image below. Perhaps @alisan617 will come up with a better approach in the capa work, and then you guys can copy it then. Update: Oh, and I just saw your comment about this! :) |
👍 |
@cahrens Thank you! |
Sorry for not commenting sooner - 👍 |
Merging now. Thanks all! Due to scheduling requirements, full a11y review of this work is being tracked separately as SOL-1978 Edit: Actually, will squash first. |
[#SOL-1944] Review notes: responsiveness, ARIA attributes, focus after reset
1037959
to
dd94251
Compare
Description: This PR introduces concept of attempts to DnDv2 and adds UI elements to submit an answer and display number of attempts.
JIRA: Part of SOL-1944
Discussions: Discovery document for DnDv2 assessment mode (relevant section: 2.2.3) - covers only UI part of it, click handlers and backend processing will be implemented as a separate PR.
Sandbox URLs:
Currently pinned to 5754ac6
Screenshots:
Note "Reset problem" and "Keyboard help" are reworked to look more like the upcoming CAPA Problem redesign and edx-pattern-library in general.
Testing instructions:
Not implemented as part of this PR - expected behavior:
Author concerns:
This PR copies some classes from edx-pattern-library into DnDv2 own css. Other options considered seems like a greater evil:
lms-main-v2.css
in edX-platform, and that file is not added to courseware pageOn the other hand, classes copied are more or less colocated, so when edx-pattern-library classes become available on courseware pages it should be sufficient to just drop their copied counterparts from DnDv2 css.
Reviewers