-
Notifications
You must be signed in to change notification settings - Fork 748
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
Remove corebase from learn index #9222
Remove corebase from learn index #9222
Conversation
Build Artifacts
|
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.
Overall, this looks great! I'm really happy that you found it relatively easy to take the patterns over. I've left a few comments requesting changes:
- One cleaning up a function a bit
- Open for discussion re: the styles overriding, just want to hear your and @MisRob 's thoughts about my suggestion vs keeping as-is
- Optional and non-blocking suggestion that maybe we move ImmersivePageRoot to core (and clean up Facility's version and imports in the process - but can do that in follow-up too)
import { mapState } from 'vuex'; | ||
|
||
export default { | ||
name: 'ImmersivePageRoot', |
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 this might be worth having as a Core component - I think I probably should have done this in the Facility PR as I had no good reason not to - also your version addresses the lack of KLinearLoader in the Facility ImmersiveToolbar which we'll need in that plugin too.
If that's not too much to add into this PR, then you could delete the one in Facility and update the imports (and maybe add it to the API Spec).
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.
Otherwise we can make a follow-up issue to do that before moving on into the other components for CoreBase extraction
kolibri/plugins/learn/assets/src/views/LearnImmersiveLayout.vue
Outdated
Show resolved
Hide resolved
kolibri/plugins/learn/assets/src/views/classes/LessonPlaylistPage.vue
Outdated
Show resolved
Hide resolved
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.
Good work, thank you @marcellamaki. Overall, it's looking really great.
Regarding code, I left several comments, most of them non-blocking. I think it's important to resolve loading
v-if
s in slot
s and also need some clarification in regard to linear loaders.
I noticed some issues when testing sidebar scrolling locally and maybe one or two other problems. I want to check those places on develop
at first to be sure it's not broken there. I'll report it all in another comment later.
import LearnTopNav from './LearnTopNav'; | ||
|
||
export default { | ||
name: 'LearnAppBarPage', |
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'd suggest not using _Page
in layout components names to make their purpose clear and to allow ourselves easily differentiate between layout components and real pages connected to routes. Maybe LearnAppBarLayout
?
@marcellamaki I tested only briefly and in Chrome. So far I've noticed the following problems that don't seem to be present on (1) Blank page after navigating to a channel for the first time from the library or after the channel page reload
Interestingly, when I navigate back to the library from the blank page and click again the channel folder, I can then see the channel as expected. However, reloading it results in the same blank page and console error. (2) Scrolling behavior
Both "China" and "Russia" items in the side panel should be visible. Note that the problem with "China" disappearing is present on |
Thanks @MisRob and @nucleogenesis for your comments here! Sorry it has taken me so long to get back to them. I hope to have the changes ready for review by end of day tomorrow. |
ebbb6fd
to
af8b9ce
Compare
3df2ad0
to
d40d6bf
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.
As we're doing a refactor, I'm going to be slightly picky and request changes rather than just comment for these things.
@marcellamaki Thank you for all the new work on this. Did you have a chance to look into the problem with the blank page and scrolling behavior, too (#9222 (comment))? Should I re-review something or is it fine to just dismiss my review? Wouldn't like to block this and can see that other folks had a chance to review while I was gone. Please let me know if I can do something to support. Thank you. |
Hi @MisRob -- I remember looking into them, but now I cannot remember if I made and committed the changes. I will review and follow up with you if a re-review will be helpful! Thank you |
@marcellamaki - #9335 is merged so this should be hopefully unblocked except for by the conflicts that I've created 😅 |
6cbc847
to
d00463f
Compare
I believe all feedback has now been addressed, and this is ready for a final review (and hopefully approval, or close to it! 🤞) |
@pcenov Let's test this tomorrow, thank you! |
…elBrowsingMainContent on TopicsPage
…csPage scroll is accurate
9e9110d
to
962f128
Compare
Overview
Fixes #9137
This PR removes CoreBase from
LearnIndex.vue
and adopts the<router-view/>
pattern created by @nucleogenesis in hisFacilityIndex
refactor. (For more background on the logic of the architecture, see #9196)There are two wrapper pages,
LearnAppBarPage
andImmersivePageRoot
that manage the style of the page.In the Learn plugin versions, I've added a new prop
applyStandardLayout
which defaults to true and applies the default styles of each type of page, but can also be overridden, such as in the Library and Topics pages, where the use the full screen, rather than a centered block of main content.This PR also removes
LearnImmersiveLayout
fromLearnIndex
and puts it in a router-view (although this is probably out of scope) for the sake of consistency. I have not addressed the rather chaoticbackRoute
situation inLearnImmersiveLayout
, but the existing logic has been moved out ofLearnIndex
and is working.Places of consideration
Basically all of Learn has been refactored, so this will require a thorough going-over with manual QA. I have tried to be very thorough with my testing on multiple browsers and screen sizes in advance of this PR, but... definitely probably that I have missed something. On the flip side, very few of the code changes are different from the pattern @nucleogenesis set up, and they actually are mostly straightforward (I hope).
Tricky spots were mostly around
content
since it is no longer passed from LearnIndex. So, things to think about here:CSS changes to note:
ImmersiveToolbar
that is inLearnIndex
due to the cards (without it, they scroll over it). Is this okay? Is there something I should do instead that would make adding an explicit z-index unnecessary?card
width property which resolved the problems with the grid. I do not know why this is necessary in this version 🙃 but it seems to be working now. Are there any places on Library or Topics page where the grid layout is wrong?