Skip to content

[RFC][UI] Add more package details to package list - #1826

Open
IonBazan wants to merge 1 commit into
composer:mainfrom
IonBazan:package-list-details
Open

[RFC][UI] Add more package details to package list#1826
IonBazan wants to merge 1 commit into
composer:mainfrom
IonBazan:package-list-details

Conversation

@IonBazan

@IonBazan IonBazan commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Package listings (a user's packages, explore/popular, vendor pages, dependents) and Algolia search results now show npmjs-inspired details:

  • latest version, release date, license
  • keyword tags

Adds filters for release date and licence:

image

Download/star counters are vertically centered:

image

Caveats

  • Search records only expose the new meta.release/released/license after their next indexing run; the hit template guards on it, so stale records render as before. A full packagist:index --force backfills everything.

  • bin/console algolia:configure required for the new meta.license facet. The released numeric filter needs no settings change (Algolia allows numeric filtering on any numeric attribute).

  • Algolia client upgraded: PHP algolia/algoliasearch-client-php 3 -> 4 (API rewrite - index name now passed per call) and JS algoliasearch v4 -> v5 / instantsearch.js-> v4.112.
    The search hit template moves to Preact JSX (search.js becomes search.jsx), with preact declared explicitly and the esbuild target raised for v5's async generators.

  • V4's client rejects an empty appId, so .env Algolia keys are now changeme placeholders and .env.test carries dummy values (real values still come from .env.local / deploy env).

Replaces #1410
Somewhat fixes #1290 and fixes #1368

@private-packagist

Copy link
Copy Markdown
Contributor

composer.lock

Package changes

Package Operation From To About
algolia/algoliasearch-client-php upgrade 3.4.2 4.47.0 diff

Settings · Docs · Powered by Private Packagist

@Seldaek

Seldaek commented Sep 3, 2026

Copy link
Copy Markdown
Member

I'm not sure this really adds so much value or just wastes screen real estate and search index space:

  • The license seems not super relevant given the prevalence of MIT in the PHP world, it is almost never a concern.

  • Last version number gives you exactly zero information.

  • Last release date is.. dubious IMO as a quality meter. Some things are very stable and released rarely, others might have had a release a week ago, but it was the first and then the maintainer abandons the project.. So just a single date is not a great datapoint to make a decision on which to click.

  • Tags might add value tho, need to think some more about that one

This is mainly why these issues are still open, because I don't know what to do about them :)

@IonBazan

IonBazan commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

The screen space wastage is real concern here but... IMHO versions and release dates are quite helpful, while I would get rid of tags 😂
Perhaps we could remove all of them from the display to save space but include them in Search filter facets like we do with tags now? I'm open for feedback and also feel free to experiment with this. Just a pattern I noticed in some of the issues past few years and a gap vs npmjs:

image

Show latest version, release date and license under the description on the
package listings (user packages, explore/popular, vendor pages, dependents,
etc.) and, npm-style, the keyword tags. The listing macro pulls the data from
a new PackageRepository::getPackagesLatestReleaseMetadata() plus the existing
tag lookup, wired through Controller::getPackagesMetadata(). The download/star
counters are vertically centered against the taller left column.

The Algolia search results get the same treatment: the index build now stores
meta.release / meta.released / meta.license, and the hit template renders them
alongside the tags.

Upgrade the Algolia clients while here:

algolia/algoliasearch-client-php 3.4 -> 4.x drops the initIndex()/SearchIndex
layer, so every call now passes the index name (searchSingleIndex, saveObjects,
deleteObject, clearObjects, setSettings). Adapted Algolia, ResultTransformer,
IndexPackagesCommand, CleanIndexCommand, ConfigureAlgoliaCommand, PackageManager,
the DI factory and AlgoliaMock. v4's SearchClient::create() rejects an empty
appId at construction, so the test service now gets dummy credentials.

algoliasearch 4 -> 5 and instantsearch.js 4.75 -> 4.112: switch to the v5
liteClient import. The search hit template is now a Preact JSX component
(PackageHit) instead of an HTML string; added preact as an explicit dep and
bumped the esbuild target to a baseline that keeps the v5 bundle's async
generators (esbuild 0.15 cannot downlevel them further).
@IonBazan
IonBazan force-pushed the package-list-details branch from 89df1b2 to 8d06575 Compare September 3, 2026 13:41
@IonBazan IonBazan changed the title [UI] Add more package details to package list [RFC][UI] Add more package details to package list Sep 3, 2026
@EdouardCourty

EdouardCourty commented Sep 3, 2026

Copy link
Copy Markdown

Hi, I think this redesign makes sense. However, tags seem to use space for no added value.
Latest version and latest update date is very useful IMO.

@Seldaek

Seldaek commented Sep 3, 2026

Copy link
Copy Markdown
Member

Why is it useful to you? What does this tell you?

@EdouardCourty

EdouardCourty commented Sep 4, 2026

Copy link
Copy Markdown

It is a triage signal. When you're comparing several packages in a list, opening each one just to check "is this still maintained?" doesn't scale.

Last release date lets you filter out abandoned packages in seconds. Same reason npm, PyPI and every other major registry surface it right on the listing.

@Seldaek

Seldaek commented Sep 4, 2026

Copy link
Copy Markdown
Member

Ok but as per my comment above:

  • Some things are very stable and released rarely, others might have had a release a week ago, but it was the first and then the maintainer abandons the project.. So just a single date is not a great datapoint to make a decision on which to click.

So I'd say maybe showing released in the last year vs released over a year ago, released over 2/n years ago is a good signal without being too specific?

And also easier to scan than distinguishing which is the newer of many exact dates. I see npm has relative dates which is also more readable than plain dates, but still I'd argue this might nudge you the wrong way just because by chance something was released shortly and another not for 6months because it's very stable.

@IonBazan

IonBazan commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

I agree that the release date is not the only parameter we should look at as there are plenty of solid packages which do not require constant updates (psr/log was last updated in 2024). Similarly, the version is just a number, but seeing a new tag on the package we previously known might inspire users to upgrade if they are stuck on old versions.

Considering all above, and conserving the screen space, what do you think about revering the package list changes but keeping only the search filter/facets to allow users filtering by license and approximate latest release date? Once this change is deployed and packages are re-indexed, we can always revisit this in the future and modify the UI as needed.

Edit: We could also expose Aikido maintainability score, if that's possible - this parameter takes into account multiple variables and produces an easy to understand number. We won't need to re-invent the wheel.

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.

Add a package maintainability score Search Enhancements

3 participants