-
Notifications
You must be signed in to change notification settings - Fork 187
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
Implement recommendations display #4803
base: search-recommendations
Are you sure you want to change the base?
Implement recommendations display #4803
Conversation
…endations-display
…endations-display
…endations-display
Thanks @akolson! I will prioritize reviewing parts related to cards in this PR and follow-up on your Slack feedback on that opportunity. |
…mplement-recommendations-display # Conflicts: # contentcuration/contentcuration/frontend/RecommendedResourceCard/components/RecommendedResourceCard.vue # package.json # yarn.lock
@akolson Chiming in to say so far so good! The way the card is implemented around |
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.
Added a few questions/comments! I still want to do some manual testing but overall looking very good so far @akolson :)
@@ -2,70 +2,92 @@ | |||
|
|||
<ImportFromChannelsModal> | |||
<template #default="{ preview }"> | |||
<VSheet> | |||
<div style="width: 1400px;"> |
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.
I know we are not super concerned with mobile responsiveness/optimization on studio, but I'm wondering if this needs to be somewhat more dynamically sized?
this.defaultMessages = defaultMessages; | ||
this._nameSpace = nameSpace; | ||
this._defaultMessages = defaultMessages; | ||
for (const key in defaultMessages) { |
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.
Nice that this is now going to be in studio too! We've already made use of the same thing in Kolibri in the last few months since Richard added it :)
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.
💯
:headingLevel="2" | ||
:node="recommendation" | ||
:selected.sync="selected" | ||
@change_selected="handleChangeSelected" |
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.
I am not super familiar with using .sync so this may just be my own misunderstanding but I'm wondering why we have both a change selection event and a selection prop binding? are they doing different things? I'm also not clear on where handleChangeSelected
is coming from
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.
The RecommendedResourceCard reuses existing functionality (the selected
vuex state and handleChangeSelected
handler) used by the main panel to allow for resource imports, as they do pretty much the same thing.
- The
selected
state keeps track of what has been selected and deselected. - The
handleChangeSelected
handler updates theselected
state. - The
handleChangeSelected
receives anisSelected
callback from the clicked checkbox in the recommended resource card and passes back with the associated node selected or deselected - The
selected
prop is only passed for use in theisSelected
callback whichI think we can directly declare in the recommended resources card to remove the ambiguity.
@@ -312,6 +312,11 @@ | |||
const totalCount = this.recommendations.length + this.otherRecommendations.length; | |||
return displayCount < totalCount; | |||
}, | |||
browseWindowStyle() { | |||
return { | |||
width: this.isAIFeatureEnabled ? '1200px' : '800px', |
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.
I think I mentioned this somewhere else to, and I know this is sort of a pre-existing problem in studio, but just wanted to flag here as well and see if we want to have these larger hardcoded width values
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.
I'll post in design and see if they have any thoughts. The design changes I think were based on how studio was structured.
@@ -79,6 +72,9 @@ | |||
}, | |||
}, | |||
computed: { | |||
channelName() { | |||
return this.node.channel?.name || ''; |
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.
Would there ever not be a channel name?
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.
Most likely not. If I can recall correctly, this change was in response to a bug I was experience while simulating the recommendations while using Studio's local app data. For some reason, some the the resources returned no channel names. I'll add a comment so this can be removed once the integration is complete.
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.
Noting that this is only for illustration purposes on the frontend and will be removed once the integration with the recommendations API is in place
Summary
Description of the change(s) you made
This pr Implements the following
" page. See reference for details.
Manual verification steps performed
Screenshots (if applicable)
Good recommendations
![Screenshot 2024-11-04 at 08 21 40](https://private-user-images.githubusercontent.com/5203639/382649330-5e7cc282-3569-422f-bf7c-f9acd2c2315f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwNDk5MjcsIm5iZiI6MTczOTA0OTYyNywicGF0aCI6Ii81MjAzNjM5LzM4MjY0OTMzMC01ZTdjYzI4Mi0zNTY5LTQyMmYtYmY3Yy1mOWFjZDJjMjMxNWYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDhUMjEyMDI3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTViN2YxYWRmZmNhNTBlYzE0NWJkY2VmMGE4YWFkZjYxZWY1OGJhZjUyMjc0NTEyZjAxNzEzZjJkMWRjMzY3ZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.cTQZeKZNyx0LrmProgBjiIHBLjB-zwkOruGJAOtwe3o)
![Screenshot 2024-11-04 at 08 21 40](https://private-user-images.githubusercontent.com/5203639/392595642-eed8926c-b7f8-486c-b570-668023ca4c3a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwNDk5MjcsIm5iZiI6MTczOTA0OTYyNywicGF0aCI6Ii81MjAzNjM5LzM5MjU5NTY0Mi1lZWQ4OTI2Yy1iN2Y4LTQ4NmMtYjU3MC02NjgwMj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QwNjNlYzRhODE0ZDAxYTU1MzViNCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.RFR7b3TFSdCWEgNQLsHs_2kDrhh9sito7Wt1g8CNE8g)
![Screenshot 2024-12-05 at 02 17 09](https://private-user-images.githubusercontent.com/5203639/392596849-6230651b-2bb5-461d-bea2-68d5c30f6e8f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwNDk5MjcsIm5iZiI6MTczOTA0OTYyNywicGF0aCI6Ii81MjAzNjM5LzM5MjU5Njg0OS02MjMwNjUxYi0yYmI1LTQ2MWQtYmVhMi02OGQ1YzMwZjZlOGYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDhUMjEyMDI3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NWVlNDZmY2RiNzM4YzBlOWFlOTU4MjJiYjI4MDQzNjhjMmEwOTAzMjBkNDBmMDc2OGNhZWY4OWQ5ZmRiYmQ3YyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.CIFS7xTuAmqaDk0GMb-FDbkX-9I5sw_Rrv2JDKF-V4A)
![Screenshot 2024-12-05 at 02 15 39](https://private-user-images.githubusercontent.com/5203639/392596575-2578f1ef-a9ae-487f-95d9-19d33a8fd989.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6Im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dGU9MjAyNTAyMDhUMjEyMDI3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YTJkYTM2MGU2MzhiNzMxYjRhODg5MTBmZTBmMjA2M2E4ZjE1MmVkNmVlMWRhYTE5Y2ExNjQyYjQ2YTA2NjA3YiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.C7KJc5O_-_jdIavUNQcoj7FT6gg_DbuFPS7zIfbI6ys)
![Screenshot 2024-12-05 at 02 24 21](https://private-user-images.githubusercontent.com/5203639/392598079-1d871923-a2a8-4e7a-b348-397cb52922fa.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwNDk5MjcsIm5iZiI6MTczOTA0OTYyNywicGF0aCI6Ii81MjAzNjM5LzM5MjU5ODA3OS0xZDg3MTkyMy1hMmE4LTRlN2EtYjM0OC0zOTdjYjUyOTIyZmEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDhUMjEyMDI3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MjFhNTVlZjA3MTMzNDVlODAxMTlhOTYyNWZlZTczNTYwYTAxY2VmYTE1NzhhNmE2YTFlOGM4YzQ5YzUxOWVkYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.2e_T0KlBpMo1PpmPWgYWGm5WyLYPLtEuqqVjMRpZu_A)
Pagination - View more good recommendation
Pagination - Other (not so good) recommendations
Pagination - No good recommendations
Loading state
About recommendations
AI feature flag off
Are there any risky areas that deserve extra testing?
References
Closes #4565
Closes #4566
Closes #4683
Closes #4775
Comments
The
KCard
component is generally in a good place, however there could be few issues that could pop up here and there. For the latest changes you canyarn link
the KDSdevelop
branch or use the latest release on npm, if up-to-date withdevelop
Contributor's Checklist
PR process:
CHANGELOG
label been added to this PR. Note: items with this label will be added to the CHANGELOG at a later timedocs
label has been added if this introduces a change that needs to be updated in the user docs?requirements.txt
files also included in this PRStudio-specifc:
notranslate
class been added to elements that shouldn't be translated by Google Chrome's automatic translation feature (e.g. icons, user-generated text)pages
,components
, andlayouts
directories as described in the docsTesting:
Reviewer's Checklist
This section is for reviewers to fill out.
yarn
andpip
)