npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@preply/ds-docs

v0.86.0

Published

> Documentation entry point.

Downloads

889

Readme

DS Docs (entry point)

Documentation entry point.

Using the Design System in your application or library?

Follow the instructions in @preply/ds-workspace.

Contributing

Reach out to #design-system-public if you think you can help and keep an eye on DS Confluence for more docs, guides, work in progress, decisions, the works.

CI/CD

WIP

Related scripts:

  • yarn build:storybook - static build, outputs to dist/.
  • yarn build:meta - copies assets, instrumentation data, and metadata collected by fe-tools

Development

You probably want to execute yarn dev and/or yarn docs in the root, as per instructions in @preply/ds-workspace.

You can also execute yarn dev in this folder, but make sure you have first executed yarn build in root, or that you have the root yarn dev script running in the background.

To execute the static build run yarn build && yarn serve.

Which documentation is included in this package?

None. Homepage and DS wide capabilities are documented in @preply/ds-docs-pages.

Remaining docs are co-located with the source code in @preply/ds-web-lib (components) and @preply/ds-web-core (capabilities).

  • *.stories.tsx - typically one single "canvas" story
  • *.stories.mdx - examples, guidelines, accessibility, notes, ...

WIP Note: If you want to see live metadata on your local instance you have to follow the steps outlined in fe-tools.

Tooling

Uses storybook@latest + wepback.

Scans for pages in the monorepo, namely in:

Details about global tools and configurations in @preply/ds-workspace.

Dependencies

This package should depend only on:

  • @storybook/*** and Webpack loaders

Do NOT add dependencies on Preply component libraries, especially DS packages like ds-core, ds-web-lib, ...

webpack@4 and loaders

Storybook still ships with webpack4 but it's possible to use webpack 5.

We tried this but a series of new issues, such as this recent gh issue (Jul 2011) popped up because the plugin ecosystem is still catching up with the breaking changes.

Instead, we downgraded the css loaders gh issue to the latest versions that are compatible with Webpack4:

[email protected]

Pinned to 4.1.3 to stay inline with yarn-workspace/packages/shared. Tried to update to latest: v5.3.1 (releases) but it created a fuss with hoisted deps. Not critical for this project at the moment.

Known Issues

WIP: Consolidate these notes with follow ups from previous epics

  • We are using a container (addons/docs) added on each MDX page because of this issue.

  • Rendering <Story> (instead of <Canvas>) in an MDX file causes Storybook to display each "story" in the Menu, which breaks the usability of the docs page (even more :-D). Some people have suggested to Add an option to hide a story from the sidebar for this same reason (as well as hiding stories that exist for snapshot purposes only). Right now I can accomplish this same thing with the block but I don't want the added link on the Sidebar.

  • Even actively developing a component, the Controls widget sometimes displays props that no longer exist. It's a cache issue with typescript doc gen under the hood. You will need to restart

  • First line in code samples in MDX docs are always poorly indent. Just an annoying detail.

  • Code samples in Canvas page shows <StoryContextDSWeb/> because it's being injected in each stories.tsx via decorators: [story => <StoryContextDSWeb>{story()}</StoryContextDSWeb>]. It's preferrable to have this flexibility (as opposed to registering global decorators) even if the code sample is a tad polluted (another annoying detail).

  • Serialization of props to url causes issue with an ugly warning react_devtools_backend.js: Omitted potentially unsafe URL args.

  • FIX ME! Super annoying: Scroll to top after navigating between docs pages. Apparently this issue was fixed.