Giter Club home page Giter Club logo

Comments (5)

aarthificial avatar aarthificial commented on June 9, 2024

We should also check if the @category tag would be suitable here.
I like the idea of marking things as advanced. I feel like marking entire modules should be enough since they're usually either "basic" (flow, animations, transitions, etc.) or "advanced" (scenes, decorators, etc.).

I've been working on a custom plugin for docusaurus and typedoc because what we use currently is a bit limiting.
So adding a grouping like this shouldn't be a problem.

from motion-canvas.

Ross-Esmond avatar Ross-Esmond commented on June 9, 2024

I've been working on a custom plugin for docusaurus and typedoc

Sick. They really needed that. In particular, it would be nice if the docs were closer to how lodash does it. You might consider trying to open source that as soon as it's stable enough to accept outside pulls.

from motion-canvas.

Ross-Esmond avatar Ross-Esmond commented on June 9, 2024

I'm starting to think we should find a way to get everything basic to be exported from the top level.

import {
  waitUntil,
  waitFor,
  makeKonvaScene,
} from '@motion-canvas/core'

Exporting from the folders forces people to remember not just the names of the functions but also which module they happened to be in, which can feel kinda arbitrary at times. While writing some guides, I started to notice how much more effort it is to explain where things are rather than just saying "add an import for waitUntil" and trusting that they know how.

Not to mention most popular libraries tend to have top-level exports, as far as I remember.

This could also be achieved by simply reexporting things from another module. So it could be @motion-canvas/core/tools or something.

from motion-canvas.

aarthificial avatar aarthificial commented on June 9, 2024

I rarely see top-level imports in libraries nowadays. When a package is distributed using ES modules it usually doesn't have them (See Preact or Konva for instance).
I checked the imports you used as an example and both VS Code and WebStorm had no issues auto-importing them.
So I don't think you need to explicitly state where to import stuff from. You could include imports in the snippets but other than that I don't think it's necessary.

The number of modules we have will also shrink when we extract Konva to a separate package.
We'll essentially be left with: flow, transitions, tweening, types, utils as far as basic modules go.

from motion-canvas.

aarthificial avatar aarthificial commented on June 9, 2024

The separation between basic and advanced documentation is now done manually.
The <ApiSnippet/> component allows nesting individual method/property documentation on any markdown page.
This way, guides can list all the basic, relevant docs directly inside them, see Layouts, Positioning, and Animation flow as examples of this.

from motion-canvas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.