Skip to content

Fancy pull request loading animations - #3228

Merged
shiftkey merged 44 commits into
masterfrom
fancy-load
Dec 1, 2017
Merged

shiftkey merged 44 commits into
masterfrom
fancy-load

Conversation

@joshaber

@joshaber joshaber commented Nov 3, 2017 •

Copy link
Copy Markdown
Contributor

Fixes #2868

liceap2

s/o to @niik for reminding me that key is a thing that one needs for animations, and for writing the pulse CSS

@joshaber joshaber added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Nov 3, 2017
@joshaber

joshaber commented Nov 3, 2017

Copy link
Copy Markdown
Contributor Author

@niik I'm gonna assign this to you in case you wanna tweak the timings or easing.

niik added 12 commits November 8, 2017 09:55
Since all icons are the same here. Even if we did want to this is the wrong way, we'd need to wrap it in a div and size that. Octicons should only be sized on height as they're variable width
To balance out the margin on the right
We have a right margin on .info
nextSelectableRow assumes that there's always one selectable row, that's not necessarily the case so it could end up recursing indefinitely. This rewrites it from a recursive method into a finite loop.

Fixes #996.
@niik niik mentioned this pull request Nov 8, 2017
@niik

niik commented Nov 8, 2017

Copy link
Copy Markdown
Member

@joshaber This looks great! I added a few tweaks in #3267 that I'd love to have included here as well

@joshaber

Copy link
Copy Markdown
Contributor Author

Friendly bump ☝️

giphy-2

@shiftkey shiftkey self-assigned this Nov 21, 2017

@shiftkey shiftkey left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code looks good.

Testing this out on desktop/desktop and microsoft/vscode shows the old "No open pull requests" view initially (probably while it's fetching the initial PRs?) rather than this loading panel (maybe it's quickly transitioning after that?) - any pointers on how I should be testing this?

public nextSelectableRow(
direction: 'up' | 'down',
row: number
): number | null {

This comment was marked as spam.

@donokuda

Copy link
Copy Markdown
Contributor

CSS looks legit 2 me but, like @shiftkey, I'm not quite sure how to test this. (I even tried opening the menu with my WiFi turned off 🙈)

@j-f1

j-f1 commented Nov 22, 2017

Copy link
Copy Markdown
Contributor

I'm not quite sure how to test this

This Stack Overflow answer shows how to simulate bad Internet connections with the Chrome DevTools. Does that help?

@shiftkey

Copy link
Copy Markdown
Member

Does that help?

I've got a sassy comeback here about Australian internets not requiring a simulation, but I'll try out the Chrome Dev Tools too 😉

@donokuda

Copy link
Copy Markdown
Contributor

This Stack Overflow answer shows how to simulate bad Internet connections with the Chrome DevTools. Does that help?

Ayyup! That does help. It looks like it still shows the empty state before loading the list, just like what @shiftkey stated earlier.

@shiftkey

Copy link
Copy Markdown
Member

@donokuda @j-f1 yeah, I'm not sure what's up - what I see doesn't match up with the initial GIF that @joshaber posted. I'm gonna hold up on merging this, just in case we've missed something.

@joshaber

joshaber commented Nov 30, 2017 •

Copy link
Copy Markdown
Contributor Author

Great catch @shiftkey and @donokuda. Fixing that also surfaced some problems with the pull request store, so this PR got a bit more involved, but we're better for it.

This should be ready for 👀 again.

this.emitError(error)
} finally {
this.changeActiveFetchCount(repository, c => c - 1)
this.emitUpdate(repository)

This comment was marked as spam.

This comment was marked as spam.

): Promise<void> {
const api = API.fromAccount(account)

this.changeActiveFetchCount(repository, c => c + 1)

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.


/** Is the store currently fetching the list of open pull requests? */
public isFetchingPullRequests(repository: GitHubRepository): boolean {
const key = repository.dbID

This comment was marked as spam.

This comment was marked as spam.

@joshaber

Copy link
Copy Markdown
Contributor Author

🏐

@iAmWillShepherd

Copy link
Copy Markdown
Contributor

I'll let @shiftkey close this out just in case he has more to add.

@shiftkey shiftkey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Gave it another test, all looks good (I saw the animation too! 😎)

@shiftkey

shiftkey commented Dec 1, 2017

Copy link
Copy Markdown
Member

Props to @iAmWillShepherd for helping out with the review 💎

@shiftkey
shiftkey merged commit 402eefc into master Dec 1, 2017
@shiftkey
shiftkey deleted the fancy-load branch December 1, 2017 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants