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
Move Instructed PL Sections to My PL page #57947
Conversation
I'm so excited to see this coming too life! Yay!! Nit: Can we update the tab names to what is on this page in figma: https://www.figma.com/file/sZ6d1uhJWFksJ6j3Fnmbnc/PL-Flow-Improvements?type=design&node-id=1958-8045&mode=design&t=x4CDcEPgC2GtTFe6-0 Professional Learning |
Oh gotcha I was going off the spec tab names, I'll update these! Do we still want to do "Instructors" instead of "Instructor Center" like we discussed offline? |
// value: 'myWorkshopOrganizerCenter', | ||
// text: i18n.plLandingTabWorkshopOrganizerCenter(), | ||
// }, | ||
// { |
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.
nit: should this one still be commented out?
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 since we haven't set up any content yet for those tabs I've been leaving them commented out until they are useful. Otherwise Regional Partners and Workshop Organizers will have empty tabs
)} | ||
{deeperLearningCourseData?.length >= 1 && ( | ||
{['myFacilitatorCenter', 'instructors'].includes(currentTab) && ( |
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 facilitator tab should have more components at some point. While adding those components is outside the scope of this PR, it might be worth separating out this logic
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.
Yes for sure, my plan once we started implementing more components was to simplify the logic to a series of {shouldRenderXComponent && (<XComponent/>)}
where shouldRenderXComponent would contain the logic of checking if the user has the right permissions and any other qualifications
|
||
return isPlSections ? ( | ||
<OwnedPlSectionsTable | ||
isPlSections={true} |
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.
is isPlSections
needed?
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.
No not anymore, I guess I just wasn't sure how much I should change in the scope of this PR for updating OwnedSections
and OwnedSectionsTable
. Since this change would remove the need for isPlSections
in several files would it be okay if I did a followup cleanup task for 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.
Cleanup work set up in this PR: #58075
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.
But it's not a prop on OwnedPlSectionsTable
is 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.
Maybe to clarify, totally fine with cleaning it up on OwnedSectionsTable
as a follow-up but I'd prefer it be removed here in this PR.
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.
Oh gotcha! Yes you're super right, just committed a fix!
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 for adding all of these tests!!
@@ -1,45 +1,16 @@ | |||
@no_mobile | |||
Feature: Professional learning Sections | |||
|
|||
Scenario: Create new professional learning section as levelbuilder |
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.
Just so I'm clear, it looks like the test for "as a levelbuilder" was removed but creating PL sections is still covered by other tests in this file?
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.
Yep! I removed it because this section was moved to the My PL page and levelbuilders won't have their own view to see this section there
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.
🎉
Moves the Professional Learning sections the user is teaching from studio.code.org/home to studio.code.org/my-professional-learning.
Following the spec, this PR should:
Note about recreating the Owned Sections Table
Unfortunately, there are a lot of different table setups used across the Teacher Dashboard and the My PL page so it was not as simple as moving the
OwnedSectionsTable
component over because the styling was pretty off as the My PL page's styles, the imported styles fromtableConstants.js
, and the in-file styles within astyles
object were all blending together. I figured taking the time to refactorOwnedSectionsTable
to maintain its current styles on the Teacher Dashboard but have different functionality and styling on the My PL page would be scope creep. So, my solution was to make a similarOwnedPlSectionsTable
that is the same content copied over but with anything unnecessary removed. I also consolidated the style updates for this in thetableConstants.js
file so that it wasn't as confusing to track. If this seems like a concern I'm open to pushback and/or can make a ticket for building out this table following the way Kelby did with theSelfPacedProgressTable
so that the styles can be better reused.Demos
View of page by permission
Facilitator:
(note: this Facilitator also has a non-PL section to demonstrate that this table only shows PL sections (both active and archived))
Universal instructor:
Peer reviewer:
Teacher (should not be able to see it):
Co-teacher invite
Teacher Dashboard message where table used to be
Links
Jira ticket: here
Spec: here
Figma: here
Testing story
Local testing and adding a Storybook for
OwnedPlSectionsTable
.