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 read only recent commits view #1322

Merged
merged 55 commits into from Mar 5, 2018

Conversation

Projects
None yet
3 participants
@kuychaco
Member

kuychaco commented Feb 24, 2018

Adding model changes and static markup for the recent commits view.

RFC: #1318

TODO

  • Fix layout in bottom dock
  • Make avatar dynamic
  • Make "time ago" dynamic
  • Format date (in title)
  • Display full message and body on hover

Nice to have

  • Responsive list (grows with window height)
  • Show multiple authors (avatar accordion like Desktop)
  • Render emoji in messages
  • Animate when commits appear This is blocked until we have a "add a class only to new commits".

Applicable issues

Closes #554

@kuychaco

This comment has been minimized.

Member

kuychaco commented Feb 24, 2018

@simurai if you like you can take a pass and give our markup and CSS a makeover. We still have to add some logic to convert the date to relative time stamps and grab GitHub avatars based on email addresses. But there's enough for you to work with right now if you wish to :). Otherwise we'll be picking up and adding more on Monday

@simurai

This comment has been minimized.

Member

simurai commented Feb 27, 2018

Made commits look more "compact" so they fit on a single line. Also, currently it has a max height of 3 commits, after it starts scrolling.

commits

Maybe ok like that? Well, depends a bit on these dividers (unpushed, unpulled, tags). Then it's harder to predict what height it should have.

<span className='github-RecentCommit-message'>{this.props.commit.getMessage()}</span>
<time className='github-RecentCommit-time'
title={this.props.commit.getAuthorDate()}>
1h

This comment has been minimized.

@simurai

simurai Feb 27, 2018

Member

For the "time ago" format, to keep it narrow as possible, how about this:

<1m, 1m, 1h, 1d, 1w, 1M, 1y

So they are all lower case, except for the month to differentiate from minutes. When hovering and waiting for a bit, the title could show the date like Feb 20, 2018 and maybe without time.

return (
<li className='github-RecentCommit'>
<img className='github-RecentCommit-avatar'
src="https://avatars3.githubusercontent.com/u/7910250?v=4&s=32"

This comment has been minimized.

@simurai

simurai Feb 27, 2018

Member

Default avatar (when there is no GitHub avatar) can be added with

src="atom://github/img/avatar.svg"

Should look like

screen shot 2018-02-27 at 3 11 07 pm

@@ -0,0 +1,38 @@
import {Emitter} from 'event-kit';
const LOADING_AVATAR_URL = 'https://github.com/simurai.png';

This comment has been minimized.

@smashwilson

smashwilson Feb 27, 2018

Member

@simurai: 😇

Think you could replace this with a suitable placeholder that we can show while we're waiting for the real avatar URL to come back from the GitHub API?

This comment has been minimized.

@simurai

simurai Feb 28, 2018

Member

Maybe it could be the same as the default atom://github/img/avatar.svg avatar: #1322 (comment)

I'll try to add that.

@simurai

This comment has been minimized.

Member

simurai commented Feb 28, 2018

Bottom dock should be ok:

dock

kuychaco and others added some commits Feb 23, 2018

Make commits compact
So they fit on a single line
@simurai

This comment has been minimized.

Member

simurai commented Mar 1, 2018

The list is now responsive and shows more commits (5, 10) if the window height gets larger.

responsive

This doesn't work well when you add a split pane, but maybe ok until there are persistent docks.

smashwilson and others added some commits Mar 1, 2018

Merge pull request #1326 from atom/sm-short-timeago
Shorter time ago in recent commits

@smashwilson smashwilson merged commit d1fb2a3 into master Mar 5, 2018

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@smashwilson smashwilson referenced this pull request Mar 5, 2018

Merged

Recent commit changes RFC #1318

3 of 6 tasks complete

@smashwilson smashwilson deleted the ku-aw-read-only-recent-commits branch Sep 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment