tweag / nixpkgs-graph-explorer

Explore the nixpkgs dependency graph
MIT License
15 stars 0 forks source link

Duplicate names shown in search results #105

Closed dorranh closed 1 year ago

dorranh commented 1 year ago

When searching for a package by name, duplicate names appear in the search results. This makes the UI harder to use since fewer unique items are visible on a given page and makes for a confusing UX. Ideally the UI would only show unique package names.

image

GuillaumeDesforges commented 1 year ago

A way to mitigate that would be to display the output path in smaller, and maybe some other information, so the distinction is clear

GuillaumeDesforges commented 1 year ago

Thinking about it, the "search" par might be better to search not pname but attributePath

https://github.com/tweag/nixpkgs-graph-explorer/blob/2d6aacd0199e57bb5e871ffbf873f9fa4b319e2d/core/explorer/extract/nixpkgs-graph.nix#L32

This would also yield results like search.nixos.org, which people seem to expect.

dorranh commented 1 year ago

The attributePath approach makes the most sense to me. However, since we do not currently ingest that field I would suggest pressing forward with the solution in #106 as an initial solution since adding attributePath will involve some broader changes to the data model, ingestion, etc.

GuillaumeDesforges commented 1 year ago

IMO, getting an incomplete list (with possibly the wrong, unexpected derivations) of results does not fix the UX. It would most probably break even more the tool.

dorranh commented 1 year ago

@GuillaumeDesforges, Just to clarify: I believe the current behavior in these cases would be that the graph would include the subgraphs for all derivations with the same pname rather than to only show one or the other (though we should double-check that this is indeed the case). If so, would you still say that this approach is not an improvement over the current behavior?

GuillaumeDesforges commented 1 year ago

Discussed it in a call, I'll dump what I remember from our conversation:

GuillaumeDesforges commented 1 year ago

Closed by #116