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

UI elements moving across the screen considered harmful #63

Closed
mvdan opened this issue Jan 7, 2017 · 6 comments
Closed

UI elements moving across the screen considered harmful #63

mvdan opened this issue Jan 7, 2017 · 6 comments

Comments

@mvdan
Copy link

mvdan commented Jan 7, 2017

When I click on "update", the repo item moves to a separate section. This has two inconvenients:

  • It is racy. If I click these buttons faster than they can sync (i.e. multiple running at a time), sometimes they don't move properly and stay in the "to update" section.
  • It makes reading worse. I can't read commits properly if text is jumping up and down (e.g. if I click "update" on the first and go read the second)

To fix both, I instead suggest that each element is changed somehow, instead of moved around. For example, changing "Update" by "Done" or simply nothing. Colours or other styling could be added to make the difference stand out more.

@dmitshur
Copy link
Member

I agree it feels not great. I'll just share some notes.

I tend to try to update packages from bottom, going up. That way things don't move around.

GPS Updates tab is heavily inspired by Apple's App Store on macOS. Its design suffers from the same issue, however, it's less noticeable for a few reasons. There are generally fewer updates for macOS apps than there are for Go packages. They tend to be slower and you can update many packages before the first one completes. And finally, there's an extra delay between an update completing and it moving to the bottom.

I kinda like the general idea of moving completed updates out of the way rather than having them intertwined with the rest of available updates... But yeah. So I'm not sure what to do here.

@dmitshur
Copy link
Member

dmitshur commented Jan 14, 2017

One really interesting idea in this space IMO is how Chrome tackles this problem.

See the following 15 second video:

image

Basically, they try to avoid moving things unexpectedly as long as your mouse cursor is hoving over the tabs. As soon as you move mouse elsewhere, that's when it tries to shuffle things around.

It would require tracking the mouse on the frontend and doing some experimentation, but if done well, this might be a good idea. There's also a high chance it won't be a good idea. It's definitely going to be complicated to implement.

@dmitshur
Copy link
Member

dmitshur commented Feb 16, 2017

Ok, I can't believe I didn't notice it until now, but the logic for moving a completed update down was wrong (not what I had in mind):

// Move it down the OrderedList towards all other updated.
{
var i, j int
for ; c.pipeline.GoPackageList.OrderedList[i].Repo.Root != updateRequest.root; i++ { // i is the current package about to be updated.
}
for j = len(c.pipeline.GoPackageList.OrderedList) - 1; c.pipeline.GoPackageList.OrderedList[j].Updated; j-- { // j is the last not-updated package.
}
c.pipeline.GoPackageList.OrderedList[i], c.pipeline.GoPackageList.OrderedList[j] =
c.pipeline.GoPackageList.OrderedList[j], c.pipeline.GoPackageList.OrderedList[i]
}

Instead of taking the updated item and moving it down, it swapped that item with the bottom-most available update. So the update you'd expect to be next was preceded by some update from the bottom.

Fixing that is going to help this issue very little, but nonetheless, it's something.

dmitshur added a commit that referenced this issue Feb 25, 2017
This is a large change that primarily moves HTML rendering and display
logic from backend to frontend (#67).

Previously, the HTML for displaying updates was rendered on backend and
streamed to browser. This worked surprisingly well and got me far, but
in order to be able to have more fine grained control over frontend
details, it was no longer viable to keep doing that. Now, the HTML is
fully rendered on frontend, and most of the logic resides on the
frontend. The backend provides services to the frontend. See issue #67
for full rationale why this is desired.

Implement a long-standing feature request of having an "Update All"
button (#6). This is both made possible and easy thanks to the frontend
HTML rendering.

This change partially helps #63, but also enables potential future
changes to help it even more.

In general, the move to frontend HTML rendering will help potentially
achieve some of enhancements described in #8.

Close #66 by removing the popup altogether. It wasn't well implemented,
so it's better to remove. In the future, a better replacement
implementation of the notification (without the modal popup) can be
considered.

Resolves #67.
Closes #66.
Helps #63.
Helps #8.
Resolves #6.
dmitshur added a commit that referenced this issue Apr 13, 2017
This is a large change that primarily moves HTML rendering and display
logic from backend to frontend (#67).

Previously, the HTML for displaying updates was rendered on backend and
streamed to browser. This worked surprisingly well and got me far, but
in order to be able to have more fine grained control over frontend
details, it was no longer viable to keep doing that. Now, the HTML is
fully rendered on frontend, and most of the logic resides on the
frontend. The backend provides services to the frontend. See issue #67
for full rationale why this is desired.

Implement a long-standing feature request of having an "Update All"
button (#6). This is both made possible and easy thanks to the frontend
HTML rendering.

This change partially helps #63, but also enables potential future
changes to help it even more.

In general, the move to frontend HTML rendering will help potentially
achieve some of enhancements described in #8.

Close #66 by removing the popup altogether. It wasn't well implemented,
so it's better to remove. In the future, a better replacement
implementation of the notification (without the modal popup) can be
considered.

Resolves #67.
Closes #66.
Helps #63.
Helps #8.
Resolves #6.
@dmitshur
Copy link
Member

I tend to try to update packages from bottom, going up. That way things don't move around.

After doing this enough times, I came up with another idea that I think I'd like to try next. It's not a perfect solution (meaning it's an improvement in some ways, but worse in other ways), but it seems like a net win, and I want to try it.

The idea is to place the "Installed Updates" section on top, above all the available updates:

--- installed package ---
    updated package 1
    updated package 2
    updated package 3

--- available updates + installing updates ---
    available update 4
    available update 5
    available update 6

That way, when you press "update" going from top to bottom, there's a lot less drastic movement, as the package smoothly transitions from the top of second section to the bottom of the first section:

--- installed package ---
    updated package 1
    updated package 2
    updated package 3
    updated package 4

--- available updates + installing updates ---
    available update 5
    available update 6

I've implemented it locally and will do some testing myself the next few days/weeks. If I'm happy with it, I'll proceed forward.

dmitshur added a commit that referenced this issue Oct 28, 2018
This change implements a minor presentation redesign, where the
"Recently Installed Updates" section is moved at the top, above
the "Updates Available" section. Previously it was at the bottom.

The motivation to do this is to improve the user experience when
installing updates from top to bottom. This way, the recently
updated package moves up to the section above, which is a much
smaller jump than moving it all the way to the bottom of the page.

Clean up some of the code in the process.

Regenerate assets.

Fixes #63.
@dmitshur
Copy link
Member

I've pushed the code to a recently-updated-on-top branch and opened PR #94, for anyone who wants to try it.

@mvdan
Copy link
Author

mvdan commented Oct 28, 2018

Thanks! These days I've moved most of my software to modules, so I've stopped using this tool ~weekly for now. I no longer hoard random stuff in my GOPATH, so my workflow has changed a bit.

I presume that a tool to update a module's direct dependencies (seeing what new versions are available and their changelogs/commits) could be interesting, but is less of a problem for me. Generally, updating patch versions is a no-brainer, and updating major/minor versions isn't something that happens often.

I'm already following #92, so I'll probably give the tool another try once that's ready :)

dmitshur added a commit that referenced this issue Oct 28, 2018
This change implements a minor presentation redesign, where the
"Recently Installed Updates" section is moved at the top, above
the "Updates Available" section. Previously it was at the bottom.

The motivation to do this is to improve the user experience when
installing updates from top to bottom. This way, the recently
updated package moves up to the section above, which is a much
smaller jump than moving it all the way to the bottom of the page.

Clean up some of the code in the process.

Regenerate assets.

Fixes #63.
@mvdan mvdan closed this as completed Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants