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

Revamp Copy Pull Command #21155

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

Revamp Copy Pull Command #21155

wants to merge 19 commits into from

Conversation

bupd
Copy link
Contributor

@bupd bupd commented Nov 8, 2024

Overview

1 click > 3 clicks

UX should prioritize simplicity and clarity. By adding a copy button above and in the datagrid, similar to DockerHub and other registries, users can quickly copy exactly what they need with clear feedback, eliminating unnecessary clicks and improving overall UX.

After reviewing the discussion (#21284), the consensus is clear:

  • 90% support for having the copy button near the digest, and copy field above the table.

This design reduces friction and enhances usability.

Live DEMO

copy-pull-cmd.mp4

To-do:

  • Add custom keyword for pull command selection to allow users to enter their own prefix for pull command.
  • Align copy icon in artifact tag list page

Note

This design is based on thorough user feedback. As users mentioned,

"We often need to copy the digest, remove it from the command, and use the version tag to pull the image. A copy button above the table and in the table, would be helpful for us."

Before

ss pr fix

After (Updated copy pull command Flow)

artifact list page

basic look home

tag list page

basic look tag page

copy digest

2024-11-25_14-44-18

copy tag

2024-11-25_14-44-18 (1)

Added Preference Settings

updated Navbar

preference settings look

Added preferences section

updated prefeeences

Added multiple Pull Command Prefixes

added more pull command prefix

closeup tooltip

tootlip

Add Option to add Custom Pull Command Prefix

updateed custom prefix

Summary of Changes Made

  • Added a new User Preferences section under User Settings.
  • Moved Language Selection and Datetime Rendering (ISO 8601) to the new User Preferences section.
  • Simplified "Copy Pull Command" button.
  • Added an copyable field with a copy button above the table, similar to Docker's pull command format (docker pull project/repo).
  • Included additional container runtimes (nerdctl, ctr, crictl) alongside docker and podman.
  • Made Config options clear and easy to use.
  • Placed a Copy Button near the tag and digest in the table.

These changes revamp the user experience, reducing clicks and improving the flow for copying pull commands.

Issue being fixed

Fixes #21146

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.08%. Comparing base (c8c11b4) to head (45a4d25).
Report is 378 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #21155      +/-   ##
==========================================
+ Coverage   45.36%   46.08%   +0.71%     
==========================================
  Files         244      248       +4     
  Lines       13333    13969     +636     
  Branches     2719     2886     +167     
==========================================
+ Hits         6049     6438     +389     
- Misses       6983     7191     +208     
- Partials      301      340      +39     
Flag Coverage Δ
unittests 46.08% <ø> (+0.71%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 492 files with indirect coverage changes

@bupd

This comment was marked as resolved.

@Vad1mo Vad1mo added the release-note/enhancement Label to mark PR to be added under release notes as enhancement label Nov 19, 2024
@bupd bupd force-pushed the pull-cmd branch 2 times, most recently from 61337ab to 5f4a463 Compare November 23, 2024 16:16
@bupd bupd marked this pull request as ready for review November 25, 2024 08:51
@bupd bupd requested a review from a team as a code owner November 25, 2024 08:51
@bupd bupd changed the title [WIP]: Update "Copy Pull Command" Button Location Revamp Copy Pull Command Nov 25, 2024
@bupd

This comment was marked as resolved.

@bupd

This comment was marked as resolved.

bupd

This comment was marked as resolved.

@bupd bupd force-pushed the pull-cmd branch 2 times, most recently from 92e89c8 to b0bab10 Compare November 27, 2024 11:05
@bupd

This comment was marked as resolved.

@bupd

This comment was marked as resolved.

@Vad1mo
Copy link
Member

Vad1mo commented Dec 3, 2024

Did you also implement and took into consideration the copy & paste for pull of the helm chart?

image

@bupd
Copy link
Contributor Author

bupd commented Dec 3, 2024

Yes I do.

@Vad1mo
Copy link
Member

Vad1mo commented Dec 6, 2024

There is a poll going regarding some UX aspects:

Please vote if you didn't do so:
#21284

@brandonbiggs
Copy link

This is something we really want. I did just want to make a suggestion and I hope it isn't too much work. In the preferences section, can you add "apptainer" and "singularity"? Or let those be defined by something in the config so the admins can set?

As a harbor admin, I'd like to set a default container runtime based on the container tools we use for all users as well.

@bupd bupd added the area/ui label Dec 16, 2024
@Vad1mo Vad1mo enabled auto-merge (squash) December 17, 2024 21:54
@Vad1mo
Copy link
Member

Vad1mo commented Dec 20, 2024

This is something we really want. I did just want to make a suggestion and I hope it isn't too much work. In the preferences section, can you add "apptainer" and "singularity"? Or let those be defined by something in the config so the admins can set?

As a harbor admin, I'd like to set a default container runtime based on the container tools we use for all users as well.

This is a good idea. We will add a option in the dropdown where the user can define their prefered container runtime

@AllForNothing
Copy link
Contributor

@bupd I have some comments for the UI design
image
image
Actually,this is what it looks like in early Harbor versions(that only supports Docker pull command)

@bupd
Copy link
Contributor Author

bupd commented Jan 17, 2025

@AllForNothing

  • Adding Pull Command as a column would be too much.

  • Aligned the copy button to the table in artifact tags list

@bupd
Copy link
Contributor Author

bupd commented Jan 22, 2025

image

Also @AllForNothing, I have updated the PR description.

We will not be removing the top copy field. Since its requested enhancement from the community.
Please have a look at the Poll.

Poll: #21284

Thanks

bupd added 14 commits January 22, 2025 16:52
* This commit moves "Copy Pull Command" button inside the table
* and add a separate column for better usability

Signed-off-by: bupd <[email protected]>
* This Commit adds Preferences in navbar
* Updates the navbar

Signed-off-by: bupd <[email protected]>
Signed-off-by: bupd <[email protected]>
Signed-off-by: bupd <[email protected]>
* Updates title of preference settings
* Updates container runtime to pull cmd prefix

Signed-off-by: bupd <[email protected]>
* This commit adds custom as dropdown option
* add custom_runtime localstorage variable for the pull prefix
* fix artifact list tab styles
* align copy icon in artifact tag list tab

Signed-off-by: bupd <[email protected]>
auto-merge was automatically disabled January 22, 2025 11:22

Head branch was pushed to by a user without write access

@bupd
Copy link
Contributor Author

bupd commented Jan 22, 2025

ready for review and merge.

bupd added 2 commits January 22, 2025 18:18
* allow only lowercase alphabets

Signed-off-by: bupd <[email protected]>
@bupd
Copy link
Contributor Author

bupd commented Jan 23, 2025

Added Live Demo to the Description.

* removes unused in copy_pull_command in i18n in all languages

Signed-off-by: bupd <[email protected]>
Copy link
Contributor Author

@bupd bupd left a comment

Choose a reason for hiding this comment

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

lgtm

Signed-off-by: Prasanth Baskar <[email protected]>
@JonTheNiceGuy
Copy link

One final comment from me, I'd like to see a "just the container name" option in the drop down in preferences, so, for example, I work with Helm charts a lot, and I'd like to just be able to copy the name of the image harbor.example.org/project/repo:tag and not docker pull harbor.example.org/project/repo:tag. From the video, it looks like putting in a custom name just replaces the first word (docker pull with my_custom_command pull)

@Vad1mo
Copy link
Member

Vad1mo commented Jan 30, 2025

One final comment from me, I'd like to see a "just the container name" option in the drop down in preferences, so, for example, I work with Helm charts a lot, and I'd like to just be able to copy the name of the image harbor.example.org/project/repo:tag and not docker pull harbor.example.org/project/repo:tag. From the video, it looks like putting in a custom name just replaces the first word (docker pull with my_custom_command pull)

I think if you add helm registry as your custom command you would get helm registry pull ... as a string in your clipboard

@JonTheNiceGuy
Copy link

JonTheNiceGuy commented Jan 31, 2025

I'm frequently editing raw helm templates, or adding a specific repository as a value. I'm not looking for a "helm registry pull", as again, this then means I'm copying helm registry pull harbor.example.org/project/repo:tag and then deleting helm registry pull from the start.

I do want to say, though, that I do much prefer this style that has been proposed. I'm just asking that while you're changing it, can you add my option to your list? :)

Signed-off-by: Prasanth Baskar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui release-note/enhancement Label to mark PR to be added under release notes as enhancement target/2.13.0 issues that are targeting v2.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request Proposal: Improve "Copy Pull Command" Functionality for Enhanced User Experience
7 participants