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 #2001: Added bottom padding to improve visual break #2130

Merged
merged 1 commit into from
Apr 19, 2021

Conversation

rjayroso
Copy link
Contributor

Issue This PR Addresses

Fixes #2001

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've thought about how to improve the visual break between posts. I've looked at how Instagram separates their infinite timeline of posts and it turns out that they don't (unlike tumblr). I think that the easiest solution would just to simply give it more space, see below:

d5194b2a9b48e9400f05af91ad8f75c2.mp4

From my reasoning, the next post's title looks like a subtitle for the current post is because the spacing is basically equal and the user struggles to identify who the title belongs to. By adding more space between, it'll be easier to see the title belongs to the post below rather than the previous post above.

Let me know if we want a more drastic design change to improve the visual break or if the gap should be shortened or made larger.

How to Test

  1. View the file change, ask the following:
    • should I change the unit of measurement? (px instead of rem?)
  2. View deployment, ask the following:
    • is the extra space enough? too little?
    • should this warrant a more drastic design change?

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)

@PedroFonsecaDEV
Copy link
Contributor

@rjayroso @humphd

I think that increasing the space between the posts is not enough. We need to add something else.
Follow my suggestions:

1

Screen Shot 2021-04-12 at 5 15 51 AM

2 (I'm using the wrong colors here).

gif:


2021-04-12 05 30 21





img:

Screen Shot 2021-04-12 at 5 30 52 AM

Copy link
Contributor

@PedroFonsecaDEV PedroFonsecaDEV left a comment

Choose a reason for hiding this comment

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

Please check the comment above.

@rjayroso
Copy link
Contributor Author

@PedroFonsecaDEV I may have encountered a bug that was giving me trouble, though it may be intentional. That aside, do we still want to put the avatar at the bottom? I think when it is scaled down it will be hard to see and just be noise. I added the line and the "Written by: author" though and copied the colours and border width from the author container on the side, let me know what you think.

image

84f0283799b5cb18030dff197908838d.mp4

As for the aforementioned bug, there is an invisible image at the end of all medium posts.

.telescope-post-content img[src*='medium.com/_/stat'] {
  width: 1px;
  height: 1px;
}

image

If we put a line at the bottom, the gap will appear larger (specifically to medium posts).
I am unsure if I should remove it since I don't know if it serves a purpose elsewhere, thoughts?

Copy link
Contributor

@PedroFonsecaDEV PedroFonsecaDEV left a comment

Choose a reason for hiding this comment

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

I made some comments.
Regarding the medium ghost image, we can deal with it in a follow-up. Let's keep the scope of this PR.

src/web/src/components/Posts/Post.tsx Outdated Show resolved Hide resolved
@@ -302,6 +308,14 @@ const PostComponent = ({ postUrl }: Props) => {
dangerouslySetInnerHTML={{ __html: post.html }}
/>
</div>
<div className={classes.contentFooter}>
<p>
Written by:{' '}
Copy link
Contributor

@PedroFonsecaDEV PedroFonsecaDEV Apr 16, 2021

Choose a reason for hiding this comment

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

Let's add the <TelescopeAvatar> as well.

@@ -302,6 +308,14 @@ const PostComponent = ({ postUrl }: Props) => {
dangerouslySetInnerHTML={{ __html: post.html }}
/>
</div>
<div className={classes.contentFooter}>
<p>
Written by:{' '}
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure how I feel about Written by, we already show the user on the right, why add it again at the bottom? I do think the line is nice though.

What do others think?

@humphd
Copy link
Contributor

humphd commented Apr 16, 2021

What if we try only doing the bar with no extra info about the user or post for now, and iterate on that? That seems to be the general feedback I'm hearing on our call today.

@huyxgit
Copy link

huyxgit commented Apr 16, 2021

@rjayroso @humphd I'll stick with the idea I mentioned earlier in the call:

Keep the header and add a line like the picture below (+ some margin to the upper post), OR don't need the line anymore because the title+authorInfo will play a role like a line better this case, this not only help 2 separate posts more visible but also we can remove the current author info on right side. That place, instead of author info (which is a waste of space when it's not even visible on mobile/small screen), we can use that space (right) for the share feature in future, or a 'monthly/yearly timeline' (help user browsing old posts by that specific month/year when click on, sth like 'archive' on wordpress sites).

Screen Shot 2021-04-16 at 4 51 53 PM

@rjayroso
Copy link
Contributor Author

@PedroFonsecaDEV @huynguyez @chrispinkney, what do you think of the latest deployment? I think for the whole removing the sidebar thing should be done in another issue, lets just get the line and spacing for the visual break.

Anyways, should the line be close to the top post, in the middle, or as Huy suggested - closer to the bottom? Also: any comments on making a larger/smaller gap, darker/lighter, thinner/bolder line etc?

Copy link
Contributor

@chrispinkney chrispinkney left a comment

Choose a reason for hiding this comment

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

image

Looks great! Just needs some more margin-top I think, since the gap between the next post and the end of the current post are noticeably different. If others are fine with it then I don't mind giving an approval!

I'm not sure what a darker/bolder line would look like but I'm curious to try it. Feel free to suggest some css changes I can apply to the deployment via the browser!

* Added bottom padding
* Added bottom border and author in the footer of each post
* Removed author, kept the line
* Added more margin at the top of the line
@rjayroso
Copy link
Contributor Author

image

Looks great! Just needs some more margin-top I think, since the gap between the next post and the end of the current post are noticeably different. If others are fine with it then I don't mind giving an approval!

I'm not sure what a darker/bolder line would look like but I'm curious to try it. Feel free to suggest some css changes I can apply to the deployment via the browser!

@chrispinkney done n done! rebased and squashed too

Copy link
Contributor

@PedroFonsecaDEV PedroFonsecaDEV left a comment

Choose a reason for hiding this comment

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

LGTM.

@rjayroso rjayroso merged commit 239235f into Seneca-CDOT:master Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: design Issues needing design or assets area: front-end type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve the visual break between posts in timeline
6 participants