-
-
Notifications
You must be signed in to change notification settings - Fork 328
Description
Describe the feature
When I'm not contributor to the French localization on npmx, I'm also the creator of Svelte Changelog, a site that displays in a pretty way all the releases of all the packages of the Svelte ecosystem maintained by the core team.
What's the feature
After seeing your recent integration of Storybook as a playground link as well as other integrations like the Svelte REPL on the Svelte package, I thought it might be a good idea to add a similar item for my site for Svelte packages. This could also lay the ground for integrating other "changelog sites", like Nuxt Changelog, or even other kinds of related resources in the future.
Why
I think it could be beneficial to the users to know about those sites. They could get to know better the ecosystem they work with, simply by visiting their package on npmx and stumbling upon those links.
It's also in the same objective that what npmx is bringing to the table: helping users learn more details about the package they use or want to use, so they're more informed about how things work and what's changing.
How, visually
Similarly to what's existing for playgrounds; either in the same category (which doesn't really fit, might need a rename), or in a very similar category we could name "Learn More" or similar:

Rate my drawing skills with the trackpad on Paint
How, technically
I didn't look at the current implementation details for Storybook or the Svelte REPL, but here what I can think of to conditionally display such banners:
type Resource = {
/**
* The provider's name
**/
name: string;
/**
* The packages the provider is displayed for.
* Either a list of packages (preferred) polled something like every day,
* with an optionally advertised next polling delay (with a minimum bound) to override that,
* or a predicate called on render (cacheable).
**/
applyOn: () => Promise<{ packageNames: string[]; nextPollDelay?: number; }> | (pkg: PackageData) => Promise<boolean>;
/**
* The data to display in the banner, with a title, optional subtitle,
* an href for the icon and of course the link to the resource.
* We could eventually move the origin URL for the href to a dedicated
* property and pass only the pathname to that href, whatever's best.
**/
displayData: (pkg: PackageData) => { title: string; subtitle?: string; href: string; iconHref: string; }
};
type PackageData = {
// name, version, channel...
};Additional information
- Would you be willing to help implement this feature?
Final checks
- Read the contribution guide.
- Check existing issues.