-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix: modal popup should be grouped with toggle button #40
Conversation
511dcb5
to
74139b8
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #40 +/- ##
=======================================
Coverage 82.35% 82.35%
=======================================
Files 13 13
Lines 204 204
Branches 27 27
=======================================
Hits 168 168
Misses 34 34
Partials 2 2 ☔ 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.
lgtm! Nice screenshots. Just had a clarifying question.
@@ -72,47 +72,48 @@ const ToggleXpert = ({ | |||
&& (localStorage.getItem('completedLearningAssistantTour') || !isModalOpen) | |||
); | |||
|
|||
const chatMargin = contentToolsEnabled ? 'mb-5' : 'mb-3'; |
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.
Question: is the 'mb-5': 'mb-3' something that is hard-coded? Is this okay? Kind of a css newb so if I'm missing something obvious here lemme know haha. I like how you separated this as a const though--looks a lot cleaner! Nice!
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.
It's a bootstrap class (see https://getbootstrap.com/docs/4.0/utilities/spacing/). It's just to accomadate for different margins depending on whether or not the content tools are enabled (and therefore displayed at the bottom of the page).
Before I had additional margin space added, but just as a class. I figured bootstrap would be better!
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.
Ooooh, cool! Nice! And thanks for clarifying.
Because the popup modal did not share the same parent div as our toggle component, the position of the modal popup and the toggle would differ as the courseware page loaded.
As part of this PR I also fixed some margins for both the toggle and the popup to ensure that they do not overlay over the course tools (i.e. calculator and notes).
Before:
After: