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

Add GitHub information in mobile view. #2716

Merged
merged 1 commit into from
Jan 28, 2022

Conversation

TueeNguyen
Copy link
Contributor

@TueeNguyen TueeNguyen commented Jan 23, 2022

Issue This PR Addresses

Fixes #2373
This continues the work from #2491

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

Mobile device

2022-01-22.19-51-51.mp4

Tablet

2022-01-22.19-51-18.mp4

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)

@gitpod-io
Copy link

gitpod-io bot commented Jan 23, 2022

@humphd
Copy link
Contributor

humphd commented Jan 23, 2022

@TueeNguyen can you assign some reviewers to this please?

Copy link
Contributor

@AmasiaNalbandian AmasiaNalbandian left a comment

Choose a reason for hiding this comment

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

This actually looks REALLY great! I just had a few questions/ and one issue I found:

  1. When you expand an accordion, and I scroll down, then I go back up to the post, the accordion is still open - do we want this?

  2. personally, i think its hard to figure out how to close the accordion... a suggestion could be to create a chevron that is at the bottom of all the info once its opened, that we can click to close? Maybe the feature is more friendly if we do the same to open. I've attached my version of paint for this.
    image

  3. When I click on the chevron pointing down, I am sometimes also copying the link to the blog... we should try to avoid the overlap in the click area.
    chrome_11pHspHrSl

Copy link
Contributor

@Kevan-Y Kevan-Y left a comment

Choose a reason for hiding this comment

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

This looks great, finally, we can have the GitHub status on mobile.

Found some CSS to fix:
Avatar image cut off for smaller screen size.
image

@HyperTHD
Copy link
Contributor

Once this is merged in, we need to start consolidating all this new github info so we don't bloat the posts folder. I wanna see if it's possible to make a POC for a custom hook for this issue at some point this week. Will discuss in more detail whenever

@TueeNguyen
Copy link
Contributor Author

TueeNguyen commented Jan 25, 2022

@AmasiaNalbandian, I believe I've fixed all issues you pointed out

@TueeNguyen
Copy link
Contributor Author

Once this is merged in, we need to start consolidating all this new github info so we don't bloat the posts folder. I wanna see if it's possible to make a POC for a custom hook for this issue at some point this week. Will discuss in more detail whenever

Definitely, in my recent commit, I also added a function to keep track of scrolling, it could be destructure as a hook, we'll take a look

Copy link
Contributor

@AmasiaNalbandian AmasiaNalbandian left a comment

Choose a reason for hiding this comment

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

All of UI for me is good to go now! We just have a few bugs to fix now. Also when we view info and then scroll up, but come back down, the info is open. I think you resolved this for only one direction. I'll leave it up to you whether this is how we want it. I just think we should make both cases consistent (keep info open no matter scroll, or close if you go to another post)

src/web/src/components/Posts/GitHubInfoMobile.tsx Outdated Show resolved Hide resolved
src/web/src/components/Posts/Post.tsx Outdated Show resolved Hide resolved
</a>
<ShareButton url={post.url} />
</h1>
<ExpandIcon small={false} expandHeader={expandHeader} />
Copy link
Contributor

@AmasiaNalbandian AmasiaNalbandian Jan 25, 2022

Choose a reason for hiding this comment

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

What's happening now is that when I click the copylink, it is expanding the information section.
chrome_RIBsde7WVd

This icon needs to go into the H1 div, I believe. I inspected the elements, and the H1 is the div that holds the date, and the copy icon. If we add the chevron in this div, they should not overlap one another. We might have to remove the padding from the copy icon(its massive...). Heres a gif to show the tree::
chrome_DSUXwSBbfD

{expandHeader ? (
<ExpandLessIcon className={classes.smallIcon} />
) : (
<ExpandMoreIcon className={classes.smallIcon} />
Copy link
Contributor

Choose a reason for hiding this comment

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

The expand more icon doesn't show up when we have the info section collapse, so we're only seeing it when we close it and see a quick flash of it
chrome_bjEnvfSajU

Can you decide if we need it and use it, or remove the code for it please

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll remove the condition that toggles the big icon. Maybe we don't need it

Comment on lines 31 to 32
width: '2.5em',
height: '2.5em',
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to restate width and height? If you removed it, I think it will inherit from the previous breakpoint.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah that's what I noticed too, I think it's ok to remove it

@TueeNguyen
Copy link
Contributor Author

This is how it currently behaves

2022-01-25.21-05-29.mp4

Kevan-Y
Kevan-Y previously approved these changes Jan 26, 2022
Copy link
Contributor

@Kevan-Y Kevan-Y left a comment

Choose a reason for hiding this comment

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

LGTM, great feature👍

HyperTHD
HyperTHD previously approved these changes Jan 27, 2022
Copy link
Contributor

@HyperTHD HyperTHD left a comment

Choose a reason for hiding this comment

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

I have a small nit-pick with the accordion being hard to view in light mode, contrast being the root cause, but functionally speaking, everything appears to be in order.

@TueeNguyen
Copy link
Contributor Author

TueeNguyen commented Jan 27, 2022

I have a small nit-pick with the accordion being hard to view in light mode, contrast being the root cause, but functionally speaking, everything appears to be in order.

Right, I should have added the color based on the theme

I'd love to finish the design but this PR is already a very long one. I'll file an issue for it if that's ok @HyperTHD

Copy link
Contributor

@DukeManh DukeManh left a comment

Choose a reason for hiding this comment

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

@TueeNguyen, great work, let's continue to improve in later PRs.

@DukeManh DukeManh added this to the 2.6 Release milestone Jan 27, 2022
@humphd
Copy link
Contributor

humphd commented Jan 27, 2022

@TueeNguyen let's tie this up and get it landed soon, it's been open for so long.

@TueeNguyen TueeNguyen requested a review from DukeManh January 28, 2022 00:07
src/web/src/components/Posts/Post.tsx Show resolved Hide resolved
src/web/src/components/Posts/Post.tsx Show resolved Hide resolved
src/web/src/components/Posts/Post.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@AmasiaNalbandian AmasiaNalbandian left a comment

Choose a reason for hiding this comment

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

We can clean up the code as Duke suggested, and then let's ship this. It's excellent work! Also can we unlink the issue #2708 I wrote more info about it on the issue, however this PR does not address that one. We can tackle that one in 2.7!

- Changed repos display to row, added border bottom for header, added hint icon for accordion
- Fixed clicking on expand icon copies link to blog post
- Added expand icons in the bottom of the github info
- Added function to auto close accordion when scroll pass post
- Added css for mobile device < 375 px width
@TueeNguyen
Copy link
Contributor Author

Noted all your comments, I've unlinked issue #2708

@TueeNguyen TueeNguyen merged commit d7062de into Seneca-CDOT:master Jan 28, 2022
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.

Mobile UX/UI for GitHub post info
8 participants