-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 #5755: Added padding to cards to fix alignment issue on mobile view #5968
Conversation
Hi @geetchoudhary, Thanks for the PR! :) |
Done. |
Codecov Report
@@ Coverage Diff @@
## develop #5968 +/- ##
==========================================
- Coverage 45.47% 45.3% -0.17%
==========================================
Files 517 520 +3
Lines 30380 30667 +287
Branches 4571 4597 +26
==========================================
+ Hits 13814 13893 +79
- Misses 16566 16774 +208
Continue to review full report at Codecov.
|
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.
Hi @geetchoudhary I am not sure of the intention of the issue. I have one question. Also, @kevinlee12 could you take a look at this PR (as you filed the corresponding issue).
@@ -235,11 +235,12 @@ <h2 ng-class="{'active': activeGroupIndex === $index}" class="oppia-library-grou | |||
height: 350px; | |||
margin-bottom: 72px; | |||
margin-top: 36px; | |||
max-width: 928px; | |||
max-width: 975px; |
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.
Could you explain the rationale for this change?
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.
Yes, as the maximum width of the div container was fixed to a certain amount adding padding was shrinking the content. Accordingly, I had to increase the max-width to take padding into account.
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.
Does this issue focus only on the left alignment of the cards? If so, I don't think the padding should change for the other 3 directions, and if no extra padding is applied on the top and bottom, then this max-width shouldn't be changed.
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.
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.
Ah I see. Thanks for explaining. Sounds good. I defer further review to @kevinlee12 though
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.
Okay :)
Hi @geetchoudhary, I'm currently pretty swamped with other things at the moment, I'll get to this by the weekend at the latest! |
Sure :) |
Hi @geetchoudhary, I think there was a bit of misunderstanding of what the issue needed to solve. It was so that the left side of the card would be flushed to the left side of the header, see Rachel's comment here: #5678 (comment) (this was the reason the issue was created). Please let me know if you any questions, I'm happy to answer them 😄 |
@kevinlee12 , So I just need to align the cards to the left side of the hamburger? |
Yup, along with the section headers. |
Screenshot @kevinlee12 , What should be done with the back arrow if we want to allign with the hamburger? |
Hmm, good point, do you have any thoughts @rachelwchen? |
Hi @geetchoudhary, since Rachel hasn't responded, let's go with the screenshot that you have (we align the left side of the card rather than the arrows). thanks! |
@kevinlee12 , What should I do with the arrow? |
If I remove it, How will the user be able to go back? |
My apologizes, I should have just mentioned that I like what you suggested in your screenshot 😄 |
@kevinlee12 , alright I will push the changes. Thanks :) |
thanks! |
Done. PTAL. |
Hi @geetchoudhary, did you push? (last commit that I see is from last week) |
I made the commit last week for the screenshots. I have pushed the changes today. |
Hi @geetchoudhary, I ran this on my iPhone and it's still slightly off (though on Firefox mobile preview it lines up). |
I am working on it. Thanks for the screenshot :) |
thanks @geetchoudhary! once you are done, feel free to assign this back to me so I know to review 😄 |
@kevinlee12 , PTAL. Thanks. |
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, thanks @geetchoudhary!
(and sorry for the delay)
@kevinlee12 , Thanks :) |
Explanation
Fixes #5755
Earlier the cards were not aligned with the headers in mobile view.
Screenshots
Checklist
python scripts/pre_commit_linter.py
andbash scripts/run_frontend_tests.sh
.