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

Merged
merged 8 commits into from
Nov 19, 2024

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
Contributor

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

@iuioiua
Copy link
Contributor Author

iuioiua commented Jun 3, 2024

It seems clear to me that this is the latest version. npm also does this. Perhaps we can merge this and then re-evaluate if we get complaints.

@iuioiua
Copy link
Contributor Author

iuioiua commented Jun 28, 2024

How would you like to proceed, @lucacasonato?

@iuioiua
Copy link
Contributor Author

iuioiua commented Sep 24, 2024

Gentle ping on this one once more. Having this would be nice, specifically for std, as we would then be able to remove the packages table in the README.

@jollytoad
Copy link
Contributor

jollytoad commented Nov 18, 2024

Any progress on this? I'd really like to see this feature in jsr, really useful for std and other libraries that consist of multiple packages.

Copy link
Contributor

@josh-collinsworth josh-collinsworth left a comment

Choose a reason for hiding this comment

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

Love this. Went ahead and included some styling and layout updates (some relevant, some just unrelated things I noticed poking around).

Sorry for letting it lag for so long.

@josh-collinsworth josh-collinsworth added this pull request to the merge queue Nov 19, 2024
Merged via the queue into jsr-io:main with commit 27272da Nov 19, 2024
6 checks passed
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