-
Notifications
You must be signed in to change notification settings - Fork 189
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
Conversation
5fd9f88
to
3440918
Compare
@TueeNguyen can you assign some reviewers to this please? |
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.
This actually looks REALLY great! I just had a few questions/ and one issue I found:
-
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?
-
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.
-
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.
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.
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 |
@AmasiaNalbandian, I believe I've fixed all issues you pointed out |
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 |
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.
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)
</a> | ||
<ShareButton url={post.url} /> | ||
</h1> | ||
<ExpandIcon small={false} expandHeader={expandHeader} /> |
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.
What's happening now is that when I click the copylink, it is expanding the information section.
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::
{expandHeader ? ( | ||
<ExpandLessIcon className={classes.smallIcon} /> | ||
) : ( | ||
<ExpandMoreIcon className={classes.smallIcon} /> |
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.
I'll remove the condition that toggles the big icon. Maybe we don't need it
width: '2.5em', | ||
height: '2.5em', |
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.
Do we need to restate width
and height
? If you removed it, I think it will inherit from the previous breakpoint.
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.
Yeah that's what I noticed too, I think it's ok to remove it
This is how it currently behaves 2022-01-25.21-05-29.mp4 |
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, great feature👍
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 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 |
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.
@TueeNguyen, great work, let's continue to improve in later PRs.
@TueeNguyen let's tie this up and get it landed soon, it's been open for so long. |
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.
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
a7c8d68
f5b22b7
to
a7c8d68
Compare
Noted all your comments, I've unlinked issue #2708 |
Issue This PR Addresses
Fixes #2373
This continues the work from #2491
Type of Change
Description
row
,wrap
forrepos
informationMobile device
2022-01-22.19-51-51.mp4
Tablet
2022-01-22.19-51-18.mp4
Checklist