-
Notifications
You must be signed in to change notification settings - Fork 122
refactor: remove references of ENABLE_HOME_PAGE_COURSE_API_V2 #1611
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
base: master
Are you sure you want to change the base?
Conversation
Thanks for the pull request, @bra-i-am! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
994e1b6
to
eb6203a
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1611 +/- ##
=======================================
Coverage 93.68% 93.68%
=======================================
Files 1142 1141 -1
Lines 23456 23423 -33
Branches 5046 5024 -22
=======================================
- Hits 21974 21944 -30
- Misses 1406 1411 +5
+ Partials 76 68 -8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
95ebf9d
to
dfabaab
Compare
82b976e
to
c6b6c64
Compare
@bradenmacdonald: Can you help us review this PR which is part of the openedx/public-engineering#287 deprecation effort? Thank you! |
Hmm, I don't think I'll be able to answer these questions. Maybe @jristau1984 or @KristinAoki can answer? |
I think the ProcessingCourses component work should be moved to another PR. I have only seen it one time when a course creation job was hung. I am unable to say if it should be skipped or not. If you want to see the feature, you can manually force a course be in-progress by hard-coding the status. |
6456ccc
to
65b4d0f
Compare
@KristinAoki, taking this into account, I removed the ProcessingCourses related changes from this merge request and left only the related with dropping ENABLE_HOME_PAGE_COURSE_API_V2 |
@bra-i-am checking in on this PR. What is the current status of this PR? I am working on removing the v1 API from edx-platform in this PR, and was wondering when we would be able to merge that PR! cc: @mariajgrimaldi |
* fix: infinite requests when clearing filters * fix: some requests were being duplicated when changing filters
65b4d0f
to
72892ca
Compare
Hi @saadyousafarbi and @bra-i-am! Is this still in progress? |
@saadyousafarbi, I'm really really sorry... I didn't see your comment before 🙏 answering you and @mphilbrick211, I already made the required changes, and I think this PR is ready I am waiting for review |
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.
A couple minor requests. Also can you please rebase this? It seems a bit old at this point. Then I'll test and approve, and we can get it merge. Thanks!
@@ -29,15 +29,17 @@ describe('<CardItem />', () => { | |||
render(<CardItem {...props} />); | |||
const courseTitleLink = screen.getByText(props.displayName); | |||
expect(courseTitleLink).toHaveAttribute('href', `${getConfig().STUDIO_BASE_URL}${props.url}`); | |||
const dropDownMenu = screen.getByTestId('toggle-dropdown'); |
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.
Please try to avoid getByTestId
. In fact, I can see there's an accessibility issue with this button - it doesn't have a name
for non-visual users
Please add an aria-label
to the button then change this to something like screen.getByRole('button', {name: /Course Actions/i})
as={IconButton} | ||
iconAs={MoreHoriz} | ||
variant="primary" | ||
data-testid="toggle-dropdown" |
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 mentioned above, I think this needs an aria-label
:
data-testid="toggle-dropdown" | |
aria-label={intl.formatMessage(messages. ... )} |
See also openedx/paragon#3616
const props = { isLoading: false, coursesDataItems: [] }; | ||
const customStoreData = { studioHomeCoursesRequestParams: { isFiltered: true } }; | ||
const { store } = renderComponent(props, customStoreData); | ||
const cleanFiltersButton = screen.queryByTestId('clean-filters'); |
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.
const cleanFiltersButton = screen.queryByTestId('clean-filters'); | |
const cleanFiltersButton = screen.queryByRole('button', {name: /Clear filters/i}); |
@@ -199,7 +184,7 @@ const CoursesTab: React.FC<Props> = ({ | |||
<p data-testid="courses-not-found-alert"> | |||
{intl.formatMessage(messages.coursesTabCourseNotFoundAlertMessage)} | |||
</p> | |||
<Button variant="primary" onClick={handleCleanFilters}> | |||
<Button data-testid="clean-filters" variant="primary" onClick={handleCleanFilters}> |
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.
<Button data-testid="clean-filters" variant="primary" onClick={handleCleanFilters}> | |
<Button variant="primary" onClick={handleCleanFilters}> |
Description
This PR primarily aims to eliminate references to ENABLE_HOME_PAGE_COURSE_API_V2: it intends to use that API, enabling the pagination and the course filters by default without needing the flag. Moreover, it also solves some issues related to the requests to the API that make the UI blink or request more times than required.
Supporting information
https://github.com/eduNEXT/consulting-issues-mapping/issues/118
Side effects
Archived Courses Tab
has been removed as it is no longer necessary because it relied on the previously used attributearchived_courses
, which is no longer in use. With the implementation of the courses API v2, courses are marked as archived when theisActive
attribute of the retrieved courses istrue
, as reviewed through the new filters.Testing instructions
Mount this MFE on this specific branch in a Sumac/Nightly environment
Be sure you count with many courses (11 makes to appear the pagination component)
You should watch by default the search bar and filters without adding any env variable
Open the inspect and go to the Network tab, every time you change the search bar input or change any filter, you should see only one endpoint call is made