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

Preliminary handling for missing content in editing lessons and quizzes #7431

Merged

Conversation

rtibbles
Copy link
Member

@rtibbles rtibbles commented Aug 4, 2020

Summary

  • Stops frontend from auto-removing missing content
  • Removes separate ancestor fetching to avoid errors on content management page for lessons
  • Adds missing resource placeholder for lesson resource details
  • Allows saving resources that are missing
  • Adds a message in quiz preview when trying to render a question that is missing
  • Adds an icon and tooltip to each question that is missing its exercise

Reviewer guidance

Quiz preview
Screenshot from 2020-08-03 17-51-05

Lesson resources
Screenshot from 2020-08-03 17-52-18

References

Fixes #7327


Contributor Checklist

PR process:

  • PR has the correct target branch and milestone
  • PR has 'needs review' or 'work-in-progress' label
  • If PR is ready for review, a reviewer has been added. (Don't use 'Assignees')
  • If this is an important user-facing change, PR or related issue has a 'changelog' label
  • If this includes an internal dependency change, a link to the diff is provided

Testing:

  • 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
  • Critical and brittle code paths are covered by unit tests

Reviewer Checklist

  • 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 rtibbles added the TODO: needs review Waiting for review label Aug 4, 2020
@rtibbles rtibbles added this to the 0.14.0 milestone Aug 4, 2020
@micahscopes micahscopes self-requested a review August 4, 2020 17:23
@jonboiser jonboiser self-assigned this Aug 4, 2020
@indirectlylit
Copy link
Contributor

partially addresses #7325

Comment on lines +57 to +58
<KIcon icon="warning" :style=" { fill: $themePalette.orange.v_400 }" />
{{ resourceMissingText }}
Copy link
Contributor

Choose a reason for hiding this comment

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

can these be implemented with KLabeledIcon?

Copy link
Member

Choose a reason for hiding this comment

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

Also there is a color prop on KIcon

Copy link
Member Author

@rtibbles rtibbles Aug 4, 2020

Choose a reason for hiding this comment

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

Using KLabeledIcon makes the appearance and formatting significantly worse:

Screenshot from 2020-08-04 11-48-37

vs with just a <p>:
Screenshot from 2020-08-04 11-49-24

Copy link
Member

Choose a reason for hiding this comment

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

Is the bad one a KLabeledIcon in a <p> or by itself?

Copy link
Member Author

Choose a reason for hiding this comment

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

The first one is with the KLabeledIcon and I think it gives a much worse result than the second one which is using a <p> tag

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, the KLabeledIcon is by itself, sorry, no p

Copy link
Contributor

Choose a reason for hiding this comment

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

Fine to leave for now, but FYI that looks like something was misconfigured. From KLabeledIcon:

  .debug-warning > svg {
    // if you see this, you need to pass the icon into the slot
    border: 1px solid red;
  }

@codecov
Copy link

codecov bot commented Aug 4, 2020

Copy link
Contributor

@micahscopes micahscopes left a comment

Choose a reason for hiding this comment

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

I tested this pretty thoroughly and it works very well as far as I can tell! There was one edge case, but Richard and I were able to debug it over a call and he figured out how to fix it!

There was just one minor issue with the display of the missing content tooltip in the "coach --> plan --> edit quiz" view, but this is probably a separate issue, as I can't see that KTooltip is used any differently in this PR than it is elsewhere in Kolibri:
fluttering tooltip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog Important user-facing changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ensure that quizzes and lessons are not modified when they reference missing content
5 participants