What is Nostr?
DanConwayDev
npub15qy…yejr
2024-04-24 16:06:07
in reply to nevent1q…mmde

DanConwayDev on Nostr: I love your use of the term stargazers. Here is my code review: ## Stores and ...

I love your use of the term stargazers. Here is my code review:

## Stores and Structure
The data can be more flexibly used if stored in a `stargazers` hex-pubkey string array parameter of `RepoEvent`, `RepoCollection` and `RepoSummary` in `components/repo/type.ts` rather than in a dedicated store.
For example it creates the opportunity to inlude them on repo cards in the Latest Repositories of the homepage.
The code to fetch the data could be moved into a `fetchStargazers` function and called in `ensureRepoCollection` in `stores/repos.ts` on line 96.
I just abstracted out `fetchReferencesBy` to make `repos.ts` easier to read and so that it could be used as a model for `fetchStargazers` in commit 24427e1682d56eed07913df8383b248f95cf92af.

## Stargazers Event Kind and Format
instead of a nip51 'standard list' with a custom kind, what about a nip51 'set' with the kind `30618` which is repo_event_kind + 1?
`30618` could be the kind for all curated lists of `30617` repositories and a `d` identifier of `stared` could be used for this instance.

## UI integration
It looks great to have stars shown, doesnt it?
Gitworkshop uses daisyui which provides consistant theming for buttons. checkout daisyui, or some of the other buttons to see the classes
Maybe the star button could show many current stars? tweaking this and how it is diplayed can come later.

Thanks so much for contributing.
Author Public Key
npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr