Skip to content
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

feat: home studio search filters #846

Merged
merged 25 commits into from
Apr 11, 2024

Conversation

johnvente
Copy link
Contributor

@johnvente johnvente commented Feb 20, 2024

Description

This PR adds a search input and two dropdown menus to filter courses in studio home:

  • first dropdown menu: Allows us to filter by "All courses," "Active," or "Archived" courses.
  • second dropdown menus: Allow for ascending/descending course names and the newest/oldest courses.

NOTE: this applies only for "courses" tab

This Uses ENABLE_HOME_PAGE_COURSE_API_V2 in the environment

DEMO

studio-home-courses-filter-demo.mp4
Screen Shot 2024-04-04 at 8 17 11 AM Screen Shot 2024-02-19 at 8 25 54 PM Screen Shot 2024-02-19 at 8 26 13 PM

Supporting information

To review a little bit more about this implementation, please check this:
https://openedx.atlassian.net/wiki/spaces/OEPM/pages/4032856101/Studio+Home+incremental+upgrades+-+product+approach

How to test it

  1. Set up your edx-platform
     cd path-to-your-edx-platform
     git fetch origin pull/34175/head:MJG/course-home-api-v2-pagination
     git checkout MJG/course-home-api-v2-pagination
    
  2. Check it out this branch inside frontend-app-course-authoring
     cd path-to-frontend-app-course-authoring
     git fetch origin pull/846/head:jv/feat-home-studio-filters
     git checkout jv/feat-home-studio-filters
     nvm use && npm install
     npm start
    

@openedx-webhooks
Copy link

Thanks for the pull request, @johnvente! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Feb 20, 2024
Copy link

codecov bot commented Feb 20, 2024

Codecov Report

Attention: Patch coverage is 92.30769% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 92.01%. Comparing base (99a144a) to head (a13068d).
Report is 5 commits behind head on master.

❗ Current head a13068d differs from pull request most recent head ef793fe. Consider uploading reports for the commit ef793fe to get more accurate results

Files Patch % Lines
src/studio-home/tabs-section/courses-tab/index.jsx 66.66% 7 Missing ⚠️
...tabs-section/courses-tab/courses-filters/index.jsx 97.22% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #846      +/-   ##
==========================================
+ Coverage   92.00%   92.01%   +0.01%     
==========================================
  Files         612      618       +6     
  Lines       10746    10835      +89     
  Branches     2305     2320      +15     
==========================================
+ Hits         9887     9970      +83     
- Misses        830      836       +6     
  Partials       29       29              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mphilbrick211 mphilbrick211 requested a review from a team February 20, 2024 19:17
@jristau1984 jristau1984 added the product review PR requires product review before merging label Feb 20, 2024
@johnvente johnvente force-pushed the jv/feat-home-studio-filters branch from d46f555 to d01912a Compare February 21, 2024 15:08
@felipemontoya
Copy link
Member

felipemontoya commented Mar 15, 2024

I tested this PR when reviewing openedx/edx-platform#34173. It worked great, but I have a minor wording suggestion:

When the sum of filter+search returns an empty list, the message looks like an error happened.
image
I would only suggest that we make it less error like and just say that "There are no courses with the current filters. --Clear filters"

That would be wording + removing the alert icon.

@johnvente johnvente requested a review from a team as a code owner March 20, 2024 12:47
@johnvente
Copy link
Contributor Author

johnvente commented Mar 20, 2024

I tested this PR when reviewing openedx/edx-platform#34173. It worked great, but I have a minor wording suggestion:

When the sum of filter+search returns an empty list, the message looks like an error happened. image I would only suggest that we make it less error like and just say that "There are no courses with the current filters. --Clear filters"

That would be wording + removing the alert icon.

Hi @felipemontoya I changed the message for something like this it doesn't look like an error now
Screen Shot 2024-03-20 at 7 28 11 AM

Could you check again please?

@johnvente
Copy link
Contributor Author

Note for reviewer: this PR will use ENABLE_HOME_PAGE_COURSE_API_V2 feature flag when this one is merged

Copy link
Member

@mariajgrimaldi mariajgrimaldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing all the changes made in #825 so I'll re-review once that's done. However, I still tested the filters locally, and they worked as described in the cover letter. Thank you.

@johnvente
Copy link
Contributor Author

johnvente commented Mar 22, 2024

I won't be able to review this in a week, so I will check for any changes on April 1st

@jmakowski1123
Copy link

jmakowski1123 commented Mar 25, 2024

This was one of the first projects we put through both product review and design first, before implementing, so this already had product review and is good to go! Original spec here.

This looks great, very exciting to see in action!

One very nit-picky thing, @johnvente . When a user types in the search field, do they have to hit enter in order to display the results, or do the results display in real time as they are typing? I'm asking because the in-course search is being implemented now too, and I believe the behavior there is that the results being to display immediately as the user types. It'd be nice to have consistent behavior across both search experiences. Pinging @bradenmacdonald here for more input on the in-course side.

@jesperhodge
Copy link
Member

@johnvente my thoughts on this.

  • the x bug needs to be fixed
  • for the shifting layout, could we leave a spinner in the search box (left of the X for example) to show the user that some action is underway, but only replace the list after the results come back?

@felipemontoya I love that idea.

@johnvente
Copy link
Contributor Author

johnvente commented Apr 5, 2024

  • I found a bug where if you type in a search query and then not click x, but remove it with backspace again, often it does not go back to the default and you have no way of clearing the query other than refreshing the page. See my screen recording.

Hi @jesperhodge I added the fix for this bug, and changed the debounced flow for your recommendation here

  • for the shifting layout, could we leave a spinner in the search box (left of the X for example) to show the user that some action is underway, but only replace the list after the results come back?
    @felipemontoya I added a spinner of the left of the X and I replace the list when it has finished to bring the data

Sorry for the delay,

after today I won't be able to check this pr but please let know to @felipemontoya @mariajgrimaldi any
any additional change

@johnvente johnvente force-pushed the jv/feat-home-studio-filters branch from 181291d to 82c263b Compare April 5, 2024 23:19
@johnvente johnvente force-pushed the jv/feat-home-studio-filters branch from 82c263b to a13068d Compare April 5, 2024 23:28
@mariajgrimaldi mariajgrimaldi force-pushed the jv/feat-home-studio-filters branch from bbfcc47 to d30f3f8 Compare April 8, 2024 22:23
@mariajgrimaldi
Copy link
Member

I'm still facing this issue:

I found a bug where if you type in a search query and then not click x, but remove it with backspace again, often it does not go back to the default and you have no way of clearing the query other than refreshing the page. See my screen recording.

I'm working on fixing it.

@mariajgrimaldi mariajgrimaldi force-pushed the jv/feat-home-studio-filters branch from d30f3f8 to 9eb9bfe Compare April 9, 2024 13:32
@mariajgrimaldi
Copy link
Member

The coverage upload is failing even after a few attempts. @jesperhodge: could you help us run it manually? Thanks!

@mariajgrimaldi
Copy link
Member

mariajgrimaldi commented Apr 9, 2024

I'm still facing this issue:

I found a bug where if you type in a search query and then not click x, but remove it with backspace again, often it does not go back to the default and you have no way of clearing the query other than refreshing the page. See my screen recording.

I'm working on fixing it.

I believe I solved this. Now, the coverage upload is still failing.

@mariajgrimaldi
Copy link
Member

@jesperhodge: thank you for running the coverage upload manually, but I think it's also happening in other PRs:
https://github.com/openedx/frontend-app-course-authoring/actions/runs/8604487493/job/23601521237#step:6:38
https://github.com/openedx/frontend-app-course-authoring/actions/runs/8617944055/job/23619770035#step:6:38
I'm not sure if it's a 3rd party failure or related to the changes themselves.

@jesperhodge
Copy link
Member

jesperhodge commented Apr 9, 2024

Thanks, @mariajgrimaldi . Yeah usually the coverage upload works after retrying, but it seems broken. From my side, I reviewed and everything looks and works great. I'm waiting for a confirmation from @cablaa77 for the UX but I don't expect any objections at all, then I'll approve.
I think after that I'll just go ahead and merge despite the failing upload, assuming I have the permissions for that. I'll also open a github request with axim to have a look at the coverage problem if nobody has done that yet.
Fantastic work on this. I really like the look and feel of it.

Copy link
Member

@jesperhodge jesperhodge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure @cablaa77 is available today, so I'm approving this. I don't expect any pushback on the UX and since this is behind a feature flag it's fine to merge.

@jesperhodge
Copy link
Member

@mariajgrimaldi sorry this is all a lot of back and forth and taking a while. You can see I opened a request with axim to look into the CodeCov situation. I plan to just wait for them to get back to me, so if there's any need to merge this sooner than that please just notify me and I can take care of it.

@mariajgrimaldi
Copy link
Member

Thank you for all the help and the review, @jesperhodge! Due to time constraints, we'd like to merge this PR soon. If the coverage check is a blocking issue, could we check the report another way?

Feel free to let me know if you folks need anything else from us. Thanks again!

@jesperhodge
Copy link
Member

Hi @mariajgrimaldi , if you rebase or merge master into your branch, it should fix the pipeline.

@mariajgrimaldi
Copy link
Member

@jesperhodge: done! Thank you so much for all the help :)

@jesperhodge jesperhodge merged commit 2641aec into openedx:master Apr 11, 2024
4 checks passed
@openedx-webhooks
Copy link

@johnvente 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U product review PR requires product review before merging
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

8 participants