-
Notifications
You must be signed in to change notification settings - Fork 709
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
Basic layout for displaying "resources currently in lesson" #12845
Basic layout for displaying "resources currently in lesson" #12845
Conversation
64c274c
to
e18471f
Compare
Build Artifacts
|
38f90a6
to
4fa945b
Compare
hey @nucleogenesis this is the first part of the layout for displaying "resources currently in lesson. I have left few requirements out will get back to it on monday |
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.
Hi @AllanOXDi. A lot of the foundational pieces are here! overall, I think the display of each item is visually close to done, and some of the core interactions on the side panel seem to be working. I'll leave additional feedback tomorrow, but I wanted to make sure I had done a preliminary review so that you had something to work on before I'm online.
my main question is I'm wondering why the planLessonRoutes
file has been added back in here. Since Alex's finalization of the navigation updates and the refactoring there, it's no longer needed. Not sure if this just wasn't clear from the other project updates, or if this was a side effect of the rebase that you did and just got committed accidentally.
Other than that, I've left some inline comments, and I'll do a second pass tomorrow. Thank you! :)
icon="back" | ||
@click="$router.go(-1)" | ||
/> | ||
<span |
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.
We may refactor this a bit when we update the side panel overall, but this should be an h1 not a span. You may need to override some of the styles so it still is the same size, but it's important that semantically it's an h1
<div class="bottom-buttons-style"> | ||
<KButton | ||
:primary="true" | ||
text="save & finish" |
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.
Unwrapped string!
If this string already exists, let's use that one. If it doesn't, please add it to the searchAndFilters
strings
}, | ||
mounted() { | ||
setTimeout(() => { | ||
console.log(this.currentLesson); |
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.
was this just here for testing?
:key="index" | ||
> | ||
<KGrid :style="lessonOrderListButtonBorder"> | ||
<KGridItem :layout12="{ span: 6 }"> |
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.
Can you update the KGridItems so that this aligns better on mobile? right now it's stacking oddly.
<div> | ||
<DragSortWidget | ||
moveUpText="up" | ||
moveDownText="down" |
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.
once you merge #12817, you'll need to update these^. you are now an expert on the fact that these need to be translated strings to use for the aria labels :)
@@ -0,0 +1,158 @@ | |||
<template> |
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.
This is a bit of a nitpick, but I think calling this SelectedResources
is more accurate than SelectedResource
- to me the plural indicates the list, and the singular indicates the one item in the list
mounted() { | ||
setTimeout(() => { | ||
this.resources = this.resourceList; | ||
}, 1000); |
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.
This is causing you to have an "extra" loading state, and it's mismatched with your loading spinner condition. I'm not sure if this is also here for testing, or if there is something else happening with loading/state management that you're trying to work around, but if that's the case, let's chat more about the situation and see if we can find another solution
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.
on a second read, I think perhaps what is happening is that you are making a copy of the resource list to test the "remove" functionality. Let's talk about this more, because we'll need a slightly different approach, based on the resources that will ultimately be passed in here (the current selection, as opposed to the current state of the lesson)
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.
Left a few pieces of feedback, great work so far Allan!
}, | ||
methods: { | ||
closeSidePanel() { | ||
this.$router.go(-2); |
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.
This should probably just go straight to the root page rather than relying on the specific configuration in the browser history.
For example, if you refreshed while on this page and closed the side panel, you might not get the behavior you expect here.
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 see this is called when the user clicks "Save & Finish" - should this be updating something somewhere?
...bri/plugins/coach/assets/src/views/lessons/LessonSummaryPage/sidePanels/SelectedResource.vue
Outdated
Show resolved
Hide resolved
e888e12
to
d1cfe13
Compare
515574c
to
b2fdfa0
Compare
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.
Some notes from review. Some of these things seem related to how things are being routed so I think that it might be worth chatting w/ @AlexVelezLl and looking at #12895 where he's working on the resource selection.
I mention this because I wonder if any changes there to how resources are selected altogether, so how you handle things like the bottom bar link respond to the user's choices may be affected by Alex's work.
Back arrow & side panel layout
When I am in the "Manage resources" page and open the "Shopping Cart" side panel, the underlying page is redirected back to the LessonRootPage somehow - so when I click the back arrow OR the X, I find myself at the list of all of my lessons.
Additionally, when I Save & Finish, I am not returned to the Lesson itself like I'd expect.
Bottom bar link
- Shows when the value is 0
- Does not update when I change my selection
Changes applied immediately, No "Are you sure?" confirmation modal when leaving without saving
When I remove an item and click the X to close the panel, I should be given an "Are you sure?" modal similar to what you'll see in Quiz Section Editor.
15c17e9
to
26142c6
Compare
}, | ||
}, | ||
|
||
computed: { |
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.
Could use the themeToken fineLine
here https://design-system.learningequality.org/colors/#tokens-fineLine
setTimeout(() => { | ||
this.getResources(); | ||
}, 2000); | ||
}, |
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.
This will be taken off- was for testing
The reason for the delay was to enable the component load fully with data, otherwise the function was returning undefined.
}; | ||
}, | ||
computed: { | ||
...mapState('lessonSummary', ['currentLesson', 'workingResources', 'resourceCache']), |
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.
This will be removed in favor of a composable
this.getLearnersForLesson(this.currentLesson), | ||
); | ||
|
||
const tableRow = { |
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.
This will also be replaced by useResourceselection compasable. We will not need it anymore
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.
Okay @AllanOXDi - I think this is ready to go! Please remove any code that will not be used (such as what you reference with the setTimeout, etc. that was just for testing). Once you do that, we will be able to merge. I'll open a follow up issue about the next steps once we get this and Alex's work into develop! Nice work
Okay! thanks |
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.
Thank you, @AllanOXDi!
Discussed requested changes with Jacob - some addressed, some will be follow up
Summary
This PR implements the "shopping cart" preview functionality as part of aligning the lesson management workflow with the side panel management
References
closes #12787
Reviewer guidance
For now test if
It displays an array of contentnodes, all of which are resources (no folders)
In the bottom bar a link should be displayed whenever the array length is > 0
On "select" it opens "shopping cart"
The header should display the number of items in the selection array
The lesson name is rendered in
The "back" arrow "minimizes" the shopping cart view. The "X" closes the side panel. no validation for closing is required
If each resource in the array is displayed as an item
If each item should have a content node icon
Not working.
Displaying the file size for each item in the list.
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)