-
Notifications
You must be signed in to change notification settings - Fork 214
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
Added Courseware Search container popover #1212
Conversation
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.
See my questions and comments inline. I understand your tech decisions here. I think your choices here are sensible.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1212 +/- ##
==========================================
+ Coverage 88.09% 88.18% +0.08%
==========================================
Files 268 270 +2
Lines 4537 4587 +50
Branches 1145 1151 +6
==========================================
+ Hits 3997 4045 +48
- Misses 526 528 +2
Partials 14 14
☔ View full report in Codecov by Sentry. |
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.
Minor feedback and a learning question. Good job 👍
* feat: Added Courseware Search container popover * chore: Added unit tests for CoursewareSearch and CoursewareSearchToggle * chore: Updated unit test for CourseTabsNavigation * chore: Partial coverage on Courseware Search Hooks * chore: Finished Courseware Search Hooks unit testing * fix: Fixed an overlook that caused a conditional hook * fix: Reduced bounce timeout on scroll/resize to 100ms * chore: Updated snapshots * chore: Moved @testing-library/react-hooks dep to DEV * chore: Minor adjustments on unit tests * chore: Fixed test issue
Description
Ticket: KBK-42 🔒
We need a modal 🔒 to show the search components and the results.
Important
I've added
@testing-library/react-hooks@^8.0.1
dependency. This allows testing standalone hooks rather than creating a testing component to use the hook. It makes it much cleaner to test.UI changes
instructor view
Student view
The Design is a bit peculiar, and I couldn't match the UI using Paragon's FullscreenModal, ModalLayer nor ModalDialog.
The UI has a modal-like overlay without a backdrop that anchors just over the Course Home tabs and extends to the bottom of the page.
I've managed to create some hooks to solve the UI. Maybe this can be revisited and replaced by some of Paragon's previously mentioned components in the future.
The overlay has some placeholder text to test the inner scrolling. When the modal pops up, it scrolls to the top of the page and freeze the
<body>
scrolling.Notes
I've added a prop to the slice
course-home/data/slice.js
. I don't see there's any unit tests on slices in the repo, maybe because they are small and simple or maybe they can be tested indirectly. I could add aslice.test.js
for that extra prop if needed.Testing Instructions:
In order to see the search button and overlay:
Results:
You should be able to click and open the search modal when the waffle flag is enabled.