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: search results cards #1041

Closed
wants to merge 33 commits into from
Closed

feat: search results cards #1041

wants to merge 33 commits into from

Conversation

katrinan029
Copy link
Contributor

@katrinan029 katrinan029 commented Sep 26, 2023

Description

Display formatted search results on budget detail "Catalog" tab for top-down assignment based off the search filtering/search results from ticket https://2u-internal.atlassian.net/browse/ENT-7339.

Solution

Implement Paragon's Datatable and cards with the appropriate badges for exec ed and open courses.

Files to review for this PR:

  • src/components/learner-credit-management/search/CatalogSearchResults.jsx
  • src/components/learner-credit-management/cards/CourseCard.jsx
  • src/components/learner-credit-management/constants.js
  • src/components/settings/data/hooks.js

UI

Screenshot 2023-09-26 at 2 11 02 PM

Screenshot 2023-09-26 at 2 11 16 PM

Screenshot 2023-09-29 at 10 46 53 AM
Screenshot 2023-09-29 at 10 47 04 AM

For all changes

  • Ensure adequate tests are in place (or reviewed existing tests cover changes)

Only if submitting a visual change

  • Ensure to attach screenshots
  • Ensure to have UX team confirm screenshots

Comment on lines -135 to -141
.btn-primary {
background-color: ${brandColors.primary.regular.hex()} !important;
border-color: ${brandColors.primary.regular.hex()} !important;
color: ${brandColors.primary.textColor.hex()} !important;
}
.btn-primary:hover {
background-color: ${brandColors.primary.dark.hex()} !important;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was overriding the styles for the buttons in SearchPagination component. I removed this and it doesn't look like it affected other areas of the app.

[question] should we be using hooks to override styles and is this the best approach?

Comment on lines +88 to +189
pageSize: 15,
pageIndex: 0,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[question] I'm setting the initial prop pageSize to display 15 results per the figma mock, but the datatable displays 20. The same behavior happens when I set the prop pageSize on line 98 to 15 as well. Why is this happening?

@katrinan029 katrinan029 marked this pull request as ready for review October 11, 2023 23:43
@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

Attention: 22 lines in your changes are missing coverage. Please review.

Comparison is base (f902ee1) 83.20% compared to head (78d039c) 83.05%.
Report is 4 commits behind head on master.

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1041      +/-   ##
==========================================
- Coverage   83.20%   83.05%   -0.15%     
==========================================
  Files         432      436       +4     
  Lines        9164     9219      +55     
  Branches     1875     1889      +14     
==========================================
+ Hits         7625     7657      +32     
- Misses       1497     1518      +21     
- Partials       42       44       +2     
Files Coverage Δ
...nts/learner-credit-management/cards/CourseCard.jsx 93.10% <100.00%> (+13.10%) ⬆️
.../components/learner-credit-management/constants.js 100.00% <100.00%> (ø)
src/components/settings/data/hooks.js 91.89% <ø> (ø)
src/data/constants/learnerCredit.js 100.00% <100.00%> (ø)
src/components/learner-credit-management/utils.jsx 55.55% <55.55%> (ø)
...mponents/learner-credit-management/algoliaUtils.js 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

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

@katrinan029 katrinan029 changed the base branch from master to knguyen/ENT-7592 October 12, 2023 15:31
@katrinan029 katrinan029 changed the base branch from knguyen/ENT-7592 to master October 12, 2023 15:31
@katrinan029 katrinan029 changed the base branch from master to Ali-Abbas/react-router-upgrade October 12, 2023 15:56
@katrinan029 katrinan029 changed the base branch from Ali-Abbas/react-router-upgrade to master October 12, 2023 15:56
@katrinan029
Copy link
Contributor Author

closing this PR due to merging conflicts. duplicate PR here #1059

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants