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

feat: package version in scope and search result lists #528

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

iuioiua
Copy link
Contributor

@iuioiua iuioiua commented May 17, 2024

Closes #421

localhost_8000_packages_search=x (1)

@lucacasonato
Copy link
Member

I think this needs some different styling. Right now it is not clear that this is the latest version.

@josh-collinsworth any ideas?

@josh-collinsworth
Copy link
Contributor

I think this needs some different styling. Right now it is not clear that this is the latest version.

@josh-collinsworth any ideas?

Is there any situation where this might not display the most recent version? Wouldn't search always automatically default to the latest and show that version?

If not, I'd suggest maybe adding a "latest" pill, similar to what's shown on the package page next to the version number.

If so, though, I'm wondering whether it's needed at all.

@jollytoad
Copy link

jollytoad commented May 23, 2024

For what it's worth, I had a little hack at this myself before I realised this PR was open. I think it's pretty obvious that it refers to the latest version, what else would it be? adding a latest pill would just be noise. I think that the version could be a little bit more subtle though, here was my hack at it, based on the styling of on the main package page...

        <div class="grow-1">
          <div class="flex items-baseline gap-x-3">
            <span class="text-cyan-700 font-semibold">
              {`@${pkg.scope}/${pkg.name}`}
            </span>
            {'latestVersion' in pkg && pkg.latestVersion && (
              <span class="text-[0.75em] font-bold text-gray-500 truncate">
                <span class="relative text-[0.80em] -top-[0.175em] font-[800]">
                  @
                </span>
                {pkg.latestVersion}
              </span>
            )}
          </div>
Screenshot 2024-05-23 at 11 07 03 am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

suggestion: show package versions in scope package list
4 participants