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

fix: modal popup should be grouped with toggle button #40

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

alangsto
Copy link
Member

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:
Screenshot 2024-01-24 at 2 35 02 PM

After:
Screenshot 2024-01-24 at 2 27 03 PM

Screenshot 2024-01-24 at 2 26 48 PM

Copy link

codecov bot commented Jan 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f706d72) 82.35% compared to head (74139b8) 82.35%.

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.
📢 Have feedback on the report? Share it here.

Copy link
Member

@varshamenon4 varshamenon4 left a 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';
Copy link
Member

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!

Copy link
Member Author

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!

Copy link
Member

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.

@alangsto alangsto merged commit 7b940f4 into main Jan 24, 2024
6 checks passed
@alangsto alangsto deleted the alangsto/fix_modal_css branch January 24, 2024 19:52
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.

2 participants