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

fixes issue-1180 fixes the post padding for mobile devices found in timeline.jsx #1292

Merged
merged 3 commits into from
Nov 11, 2020

Conversation

pyvelkov
Copy link
Contributor

@pyvelkov pyvelkov commented Nov 5, 2020

Issue This PR Addresses

Fixes #1180

Type of Change

  • Bugfix: Change which fixes an issue
  • New Feature: Change which adds functionality
  • Documentation Update: Change which improves documentation
  • UI: Change which improves UI

Description

I traced how the padding was being applied through Chrome developer tools. I saw that the default root padding was being applied meaning the posts have padding to the left and right and were not being overridden as expected. From the previous fix that was made I saw that root style was being overridden with a padding of 0 in posts.jsx but since the change in #1217 , timeline.jsx was created and that is where the issue stemmed from. I saw that the Timeline function was returning the wrapped array in a container that had the className={classes.root}. However custom overriding of the root style was not being called in "useStyles".

Before

without fix

After

with fix




EDIT:
I believe this also fixed #1226
fixed search

I also ran npm run test and everything passed. Everything looks alright on my end.

Let me know what you think and if this is what we are after in #1180 , my JS is terrible and I probably spent far longer than needed for something like this. I hope it is what we are after.

Checklist

  • Quality: This PR builds and passes our npm test and works locally
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not (if applicable)
  • Documentation: This PR includes updated/added documentation to user exposed functionality or configuration variables are added/changed or an explanation of why it does not(if applicable)

@humphd
Copy link
Contributor

humphd commented Nov 5, 2020

I'm not sure if we should deal with this here or in another issue, but I also notice we have an overflow problem on mobile with content extending beyond the parent container(s):

width-bug

@pyvelkov
Copy link
Contributor Author

pyvelkov commented Nov 5, 2020

I'm not sure if we should deal with this here or in another issue, but I also notice we have an overflow problem on mobile with content extending beyond the parent container(s):

width-bug

I don't mind doing this in another post but I can do it here. I sort of found a fix by applying style ofoverflown content to auto and it added a scroll like effect for posts like this.
scroll on certain posts

@humphd
Copy link
Contributor

humphd commented Nov 5, 2020

Sure, push another commit and let's do it here.

@pyvelkov
Copy link
Contributor Author

pyvelkov commented Nov 5, 2020

Sure, push another commit and let's do it here.

I just added the commit that adds the scrollbar for overflown posts. Let me know, Thanks :)

cindyorangis
cindyorangis previously approved these changes Nov 7, 2020
Copy link
Contributor

@cindyorangis cindyorangis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for fixing this

src/frontend/src/components/Post/Post.jsx Outdated Show resolved Hide resolved
@c3ho
Copy link
Contributor

c3ho commented Nov 11, 2020

@pyvelkov Feel free to squash and merge

@pyvelkov
Copy link
Contributor Author

@pyvelkov Feel free to squash and merge

would you like me to do it, or..?

@humphd
Copy link
Contributor

humphd commented Nov 11, 2020

@pyvelkov go for it! With 2 reviews giving an approval, you can squash and merge.

@pyvelkov pyvelkov merged commit 569c3c4 into Seneca-CDOT:master Nov 11, 2020
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.

Fix timeline width in search results Remove outside post padding in mobile
5 participants