-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 #4683: Altered positioning of help card to make it appropriate #4696
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #4696 +/- ##
===========================================
- Coverage 44.84% 44.83% -0.01%
===========================================
Files 384 384
Lines 23339 23343 +4
Branches 3769 3769
===========================================
Hits 10467 10467
- Misses 12872 12876 +4
Continue to review full report at Codecov.
|
LGTM! Thanks @nithusha21 ! |
Thank you @tjiang11 |
…te (oppia#4696) * fix positioning of help card * fixed linting * minor fix
…te (oppia#4696) * fix positioning of help card * fixed linting * minor fix
…te (oppia#4696) * fix positioning of help card * fixed linting * minor fix
$scope.getHelpCardBottomPosition = function() { | ||
var helpCard = $('.conversation-skin-help-card'); | ||
var container = $('.conversation-skin-supplemental-card-container'); | ||
return Math.max(container.height() - helpCard.height() / 2, 0); |
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.
@nithusha21 I am working on migrating this directive but failing to understand this formula.
Can you please answer the following questions?
- What is the ideal position of the help card. Where should it be shown to the user?
- How this formula achieves the expected positioning?
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.
I don't remember to be frank. If I did actually make this change, it was probably because the help card was getting hidden below the footer, which made the continue button not clickable. To fix this we moved it further up. Ideal position being bottom right, but above footer (make sure to check different screen sizes)
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.
Thanks, I have got the answer which I was looking for.
Fix #4683. I have added a function that returns the top position of the help card. This function will return a minimum value of 0 so it will at least be aligned to the top of the supplemental interaction card (and the page will expand below). If the card is not that big, it is centered about the bottom edge of the image. Does this look ok?
Checklist
python scripts/pre_commit_linter.py
andbash scripts/run_frontend_tests.sh
.