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

Card fixes #12374

Merged
merged 7 commits into from
Jul 2, 2024
Merged

Card fixes #12374

merged 7 commits into from
Jul 2, 2024

Conversation

marcellamaki
Copy link
Member

Summary

Makes some mostly-cosmetic card layout and styling adjustments. Does a teensy refactor to put the learning activity chips and icon mapping into kolibri-common, which will be used in 0.18 as part of the card and refactoring work.

References

Fixes #12280
Related slack conversation

Reviewer guidance

Testing updates:
content cards (both channel and resources) used in coach resources management

  • lesson and quiz creation
  • Navigate up and down the topic tree from channel into folders and to resources and ensure all render correctly.
  • Confirm that the layout and text does not collide even when on mobile screens, or when there is additional "helper text" on the card regarding question selection
  • Ensure that there are no regressions in the lesson management work flow

Learn:
I refactored the "LearningActivityChip" to kolibri-common so the places where it is used in learn should be regression tested.
Screenshot 2024-06-27 at 1 53 41 PM
It's present in the resource's information side panel accessed in

  • Bookmarks - clicking on the info for the card
  • Topics - clicking on the info for the card
  • Content Renderer/Resource page - clicking on the info for the open resource
  • Library - clicking on the info for the card

Testing checklist

  • 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

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

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

@github-actions github-actions bot added APP: Learn Re: Learn App (content, quizzes, lessons, etc.) APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: frontend labels Jun 27, 2024
Copy link
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.

I am kind of confused by the names.

@@ -45,7 +45,7 @@
:title="content.title"
:thumbnail="content.thumbnail"
:description="content.description"
:kind="content.kind"
:kind="content.is_leaf ? content.learning_activities : 'folder'"
Copy link
Member

Choose a reason for hiding this comment

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

Let's change the prop name here to indicate that it is no longer accepting a content kind?

v-if="!windowIsSmall"
class="thumbnail"
:thumbnail="thumbnail"
:kind="kind"
Copy link
Member

Choose a reason for hiding this comment

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

It seems that no updates have been made to the CardThumbnail component, but we are now passing a learning activity array to this, rather than a content kind, I haven't checked, but I expect this to end poorly.

<CoachContentLabel
class="coach-content-label"
:value="numCoachContents"
:isTopic="isTopic"
/>
</div>
<slot name="notice"></slot>
<LearningActivityChip
v-if="isLeaf"
:kind="kind"
Copy link
Member

Choose a reason for hiding this comment

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

Is it a kind or a learning_activity? I know the component was already like this, but this naming all seems very confusing.

@pcenov
Copy link
Member

pcenov commented Jun 28, 2024

Hi @marcellamaki - looks great in both desktop and mobile view, couldn't spot any issues caused by the changes made here.

I'm gonna mention that I noticed the following issue with overlapping learning activity chips, which is preexisting and I'm not sure whether is not caused by anything on Studio's end:

Overlapping.chips.mp4

You can replicate it by going to the following resource Hoja de Reflexión para Estudiantes - Acertijos Wiixii

….kind and content.learning_activities. there be dragons/tech debt there
},
isLeaf: {
type: Boolean,
content: {
Copy link
Member

Choose a reason for hiding this comment

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

As a tech debt cleanup, we should define a content node spec using the core validator stuff, so that we can just reuse that every time we want content/contentnode as a prop. I would be happy to be assigned to this.

Copy link
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.

I am confident now that even if the LearningActivityChip component exposes a very misleading prop name, it and the CardThumbnail component are both being given the correct values.

@rtibbles rtibbles merged commit 680dbba into learningequality:develop Jul 2, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) APP: Learn Re: Learn App (content, quizzes, lessons, etc.) DEV: frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EQM: Improve card layout alignments/prevent overlapping text
3 participants