Skip to content

Updates to completion duration for references#3705

Merged
rtibbles merged 7 commits intolearningequality:hotfixesfrom
marcellamaki:updates-to-completion-duration-for-references
Sep 30, 2022
Merged

Updates to completion duration for references#3705
rtibbles merged 7 commits intolearningequality:hotfixesfrom
marcellamaki:updates-to-completion-duration-for-references

Conversation

@marcellamaki
Copy link
Copy Markdown
Member

@marcellamaki marcellamaki commented Sep 30, 2022

Summary

Description of the change(s) you made

As decided in Slack, "Reference" should be moved to the "Completion" dropdown, rather than the duration dropdown. Now, reference is an option for audio, video, and documentation resources. This moves that and makes some small edits to ensure everything works smoothly, and updates gherkin scenarios.

Fixes #3673
Fixes #3659 (mostly because this UI no longer exists as a result of these changes)

Manual verification steps performed

  1. Open the edit modal for a document, audio, or video resource
  2. Reference should be an option under completion on the form
  3. If reference is selected, no duration form should be visible, and the "reference hint" should be displayed
  4. If "When time spent is equal to duration" is selected, there are duration options to select below
  5. "Reference" is no longer present as a "duration" option

Screenshots (if applicable)

Screen Shot 2022-09-30 at 11 12 19 AM

Screen Shot 2022-09-30 at 11 12 24 AM

Screen Shot 2022-09-30 at 11 12 31 AM


Reviewer guidance

How can a reviewer test these changes?

See steps above

Are there any risky areas that deserve extra testing?

Comments

Is this right?? And, do the changes to the gherkins (and tests) accurate reflect the changes made?


Contributor's Checklist

PR process:

  • If this is an important user-facing change, PR or related issue the CHANGELOG label been added to this PR. Note: items with this label will be added to the CHANGELOG at a later time
  • If this includes an internal dependency change, a link to the diff is provided
  • The docs label has been added if this introduces a change that needs to be updated in the user docs?
  • If any Python requirements have changed, the updated requirements.txt files also included in this PR
  • Opportunities for using Google Analytics here are noted
  • Migrations are safe for a large db

Studio-specifc:

  • All user-facing strings are translated properly
  • The notranslate class been added to elements that shouldn't be translated by Google Chrome's automatic translation feature (e.g. icons, user-generated text)
  • All UI components are LTR and RTL compliant
  • Views are organized into pages, components, and layouts directories as described in the docs
  • Users' storage used is recalculated properly on any changes to main tree files
  • If there new ways this uses user data that needs to be factored into our Privacy Policy, it has been noted.

Testing:

  • Code is clean and well-commented
  • Contributor has fully tested the PR manually
  • If there are any front-end changes, before/after screenshots are included
  • Critical user journeys are covered by Gherkin stories
  • Any new interactions have been added to the QA Sheet
  • Critical and brittle code paths are covered by unit tests

Reviewer's Checklist

This section is for reviewers to fill out.

  • Automated test coverage is satisfactory
  • PR is fully functional
  • PR has been tested for accessibility regressions
  • External dependency files were updated if necessary (yarn and pip)
  • Documentation is updated
  • Contributor is in AUTHORS.md

@rtibbles
Copy link
Copy Markdown
Member

Everything is working as described - the one slight issue I saw is that for Videos and Audio when you set Reference, then set it back to Time to Complete, then it does not revert back to the default Duration value that it first has, instead duration is blank:

Screencast.from.09-30-2022.09.16.44.AM.webm.mp4

Copy link
Copy Markdown
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

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

Need to revert a string change, and fix the default value for audio and video after clearing Reference.

exactTime: 'Time to complete',
reference: 'Reference material',
/* eslint-enable */
exactTime: 'Exact time to complete',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This was a deliberate string update in #3686 this should be reverted.

…tionAndDuration setter that caused problems when switching from reference to other options
Copy link
Copy Markdown
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

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

Default restoring now works, and previously set durations are also persisted and not overwritten by the default. Perfect.

@pcenov
Copy link
Copy Markdown
Member

pcenov commented Oct 3, 2022

@marcellamaki for some reason I'm not seeing the Completion drop-down at all at https://hotfixes.studio.learningequality.org/:

2022-10-03_13-55-45

@marcellamaki
Copy link
Copy Markdown
Member Author

Thanks for letting me know @pcenov. Do you recall what kind of resource it was that you were testing here? (i.e. document, video, etc.).

@pcenov
Copy link
Copy Markdown
Member

pcenov commented Oct 3, 2022

Hi @marcellamaki strangely enough it's missing for all resource types.

@marcellamaki
Copy link
Copy Markdown
Member Author

Well, that is very strange! I will take a look and try to replicate. Will let you know if I make any updates @pcenov

@pcenov
Copy link
Copy Markdown
Member

pcenov commented Oct 3, 2022

I was granted Admin rights to one of my users and I can see the Completion drop-down with that user. However I still can't see it with the other one - could the difference of permissions be playing a role here, somehow...?

@marcellamaki
Copy link
Copy Markdown
Member Author

Oh, this is definitely possible! Thank you for noticing that @pcenov. I do not think I would have noticed this myself!! I will dig into this a bit more and update the code accordingly :)

@marcellamaki
Copy link
Copy Markdown
Member Author

@pcenov - I think I have identified the problem. Just going to check with Richard if my solution is in line with the UX that we want, and then I'll work on getting a PR for these changes in. Thanks again for identifying the permissions problem - it really helped me figure out what was going on!

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