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

The hybrid learning home page #8504

Merged
merged 27 commits into from
Oct 28, 2021

Conversation

MisRob
Copy link
Member

@MisRob MisRob commented Oct 18, 2021

Summary

Add a new home page. It doesn't follow the full spec in Figma but is rather an MVP based on #8137. See test scenarios below for details. This PR is meant to be reviewed together with #8430, both code and testing, which contains the majority of work and was merged prematurely due to the string freeze. You're welcome to add review comments to already merged #8430.

References

Reviewer guidance

See the following test scenarios in Notion


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

MisRob added 17 commits October 18, 2021 18:37
for the class assignments page.

Its subcomponents are already using the composable
instead of store. This removes some confusion and fragility
around fetching and storing data which was previously done
by both composable and Vuex.
To be able to use loading and API error states properly
when initalliy loading a page, it needs to respect the standard
way pages are initialized in Kolibri - through a route handler.
no matter of their classess memberships, access to unasigned resources
settings, or whether they're signed-in or anonymous. From now on,
everyone wil lbe taken to the home page which content will adjust
correspondingly.
when no channels are available
after navigation in 'Learn'
'Continue learning on your own' and 'Explore channels'
should be displayed only after learner finished all their classes
resources and quizzes rather than when not having any classes
resources or quizzes in progress
@MisRob MisRob added this to the 0.15.0 milestone Oct 19, 2021
@MisRob MisRob added the TODO: needs review Waiting for review label Oct 19, 2021
@MisRob MisRob marked this pull request as ready for review October 19, 2021 17:50
@MisRob
Copy link
Member Author

MisRob commented Oct 19, 2021

I am not sure why the linting check doesn't pass, will investigate later

Copy link
Contributor

@indirectlylit indirectlylit left a comment

Choose a reason for hiding this comment

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

Intriguing use of composable as a vuex replacement - I hadn't seen this before. Do you like it better than vuex?

@MisRob
Copy link
Member Author

MisRob commented Oct 20, 2021

@jtamiace's feedback:

could we use text.annotation as the color of class names in these cards?

screen_shot_2021-10-19_at_6 17 28_pm

Will update

@MisRob
Copy link
Member Author

MisRob commented Oct 21, 2021

In "Continue learning on your own", a topic title that should be displayed above a resource title is missing (it's implemented so I might introduce a bug with the most recent updates)

Screenshot from 2021-10-21 15-41-42

@MisRob
Copy link
Member Author

MisRob commented Oct 21, 2021

@rtibbles As for API requests that the new home page is responsible for triggering, they're defined in this handler and for example, for a signed-in user (who needs more data than a guest) it's four calls to these API endpoints:

  • /api/content/channel/?available=true
  • /learn/api/learnerclassroom/
  • /api/content/contentnode/<user_id>/resume/
  • /api/content/contentnodeprogress/

@pcenov
Copy link
Member

pcenov commented Oct 21, 2021

Hi @MisRob, I spent some time yesterday and today testing the buildkite builds on Win10 and Ubuntu, went through all of the neatly written Notion scenarios and I'm happy to report that I didn't uncover any issues with the Home Page or the sections which are displayed depending on various variables such as whether the user is signed in or not and whether the user is enrolled in classes or not. Let me know when you fix the issue with the missing topic title in "Continue learning on your own" and I'll check for regression issues.

@MisRob MisRob added the changelog Important user-facing changes label Oct 21, 2021
@MisRob
Copy link
Member Author

MisRob commented Oct 25, 2021

Annotation text color is now properly used for a class/topic name on cards
Screenshot from 2021-10-25 13-19-08 (copy)
Screenshot from 2021-10-25 13-19-27
Screenshot from 2021-10-25 13-19-34
Screenshot from 2021-10-25 13-19-39
:

@MisRob
Copy link
Member Author

MisRob commented Oct 25, 2021

Missing topic title in "Continue learning on your own" has been fixed

Screenshot from 2021-10-25 13-19-08

cc @pcenov

@MisRob
Copy link
Member Author

MisRob commented Oct 25, 2021

@indirectlylit

Intriguing use of composable as a vuex replacement - I hadn't seen this before. Do you like it better than vuex?

Yes, I'd say it has brought lots of clarity into the home page logic and writing tests even for more complex views that need to use composables feels much simpler than for those utilizing the whole Vuex machinery. Feels like a step towards functional programming with reactivity advantages. I am not sure how it compares to things that need to be handled accross plugins and would like to get a bit more experience - this was the first time I used it in production code since originally I was building it on top of JB's work who started using composables for the home page. If there's anything specific you're curious about, happy to chat more.

@MisRob
Copy link
Member Author

MisRob commented Oct 25, 2021

While testing something else in IE11, I've noticed two new problems:

  1. Text ellipsis characters showing on cards even when a title is not overflowing:
    bug-2

  2. Broken thumbnails on channel cards: Might be caused by flex being buggy in IE. I used new channel cards with simpler thumbnails styling but until we get to merging our old and new cards components, it may be better to copy the original styling that doesn't seem to break in this way
    bug-1

@MisRob
Copy link
Member Author

MisRob commented Oct 25, 2021

@MisRob
Copy link
Member Author

MisRob commented Oct 26, 2021

While testing something else in IE11, I've noticed two new problems:

  1. Text ellipsis characters showing on cards even when a title is not overflowing
  2. Broken thumbnails on channel cards

Fixed

@MisRob
Copy link
Member Author

MisRob commented Oct 26, 2021

@MisRob
Copy link
Member Author

MisRob commented Oct 27, 2021

@pcenov Thank you for testing. I finished all updates so if you'd like to check it out, I'll appreciate it. I haven't changed any logic related to what sections are displayed, it was rather some smaller UI tweaks that you can read more about in the comments above, so I think it'd be helpful to focus on cards in different resolutions across browsers, especially in IE.

@pcenov
Copy link
Member

pcenov commented Oct 27, 2021

Hi @MisRob all looks very well, I tested in several browsers (including IE11) and different resolutions and was not able to identify any new issues.
Just one question though: there are no time/progress indicators in the 'Continue learning on your own' cards as indicated in Figma. Is this covered in a separate PR?

2021-10-27_18-00-11

Copy link
Member

@nucleogenesis nucleogenesis left a comment

Choose a reason for hiding this comment

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

The code looks brilliant. Excellent work with thorough tests, JSDoc comments <3, excellent clarifying comments and good separation of concerns. I enjoyed getting a deeper dive into a and non-trivial real-world composition API implementation!

Do we need these breadcrumbs? Are they in scope here or will they be fixed in follow up?

screenshot-localhost_8000-2021 10 27-12_38_53

I'm also seeing things that are off with the card styling where the thing under the ActivityType is centered, which looks odd - see "reference" is unaligned with anything else.

screenshot-localhost_8000-2021 10 27-12_51_47

@rtibbles
Copy link
Member

Do we need these breadcrumbs? Are they in scope here or will they be fixed in follow up?

I think the errant breadcrumbs are fixed in #8548, so we can ignore for now.

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.

Follow up issues filed, and manual testing checks out.

Code read through by @nucleogenesis and a quick skim from me raised no red flags.

@rtibbles rtibbles merged commit f642bee into learningequality:release-v0.15.x Oct 28, 2021
@MisRob MisRob deleted the home-page branch November 4, 2021 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog Important user-facing changes TODO: needs review Waiting for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create first version of Learn > Home tab
5 participants