The Wayback Machine - https://web.archive.org/web/20210207053458/https://github.com/pmndrs/jotai/issues/85
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve docs/*.md #85

Open
dai-shi opened this issue Oct 4, 2020 · 11 comments
Open

Improve docs/*.md #85

dai-shi opened this issue Oct 4, 2020 · 11 comments
Labels

Comments

@dai-shi
Copy link
Member

@dai-shi dai-shi commented Oct 4, 2020

#83 added some drafts. we need to improve them.

There would be several levels of contributions.

  • Fix typo, grammar, and/or expressions (please file a PR)
  • Ask questions in a new issue to clarify, add, and improve descriptions (a followup PR would be nice)
  • Or, you can start a PR directly with a draft doc and discuss there

Feel free to ask general questions in this issue. Also we have a channel in the pmndrs Discord server.

@dai-shi dai-shi pinned this issue Oct 4, 2020
@swagatikapanda123
Copy link

@swagatikapanda123 swagatikapanda123 commented Oct 5, 2020

I am excited to work on this , Could you please assign it to me?

@dai-shi
Copy link
Member Author

@dai-shi dai-shi commented Oct 5, 2020

This is like an umbrella issue. So, please create a sub task and assign yourself.

@eyuu24
Copy link
Contributor

@eyuu24 eyuu24 commented Oct 6, 2020

Hi, can I take the first sub task? Fix typo, grammar, and/or expressions (please file a PR)

Does this involve reviewing the readme.md and other md files?

@dai-shi
Copy link
Member Author

@dai-shi dai-shi commented Oct 6, 2020

Does this involve reviewing the readme.md and other md files?

Basically, all docs/*.md files.

can I take the first sub task?

Sorry for confusion. I meant sub tasks are more granular ones. Unless many contributors work conflict each other, it's not so important. See #90 for example.

In other words, please go ahead.

@dai-shi dai-shi changed the title [Help wanted] Improve docs [Umbrella] Improve docs/*.md Oct 6, 2020
@JLarky
Copy link
Contributor

@JLarky JLarky commented Dec 4, 2020

I guess this is the best place to discuss this for now :) for context #221 (comment) #228 (review)

So first answer to the question for documentation of RESET symbol:

Now the overall idea behind the new-docs branch:

  • I have split docs into three categories: API, guides, introduction
  • introduction will explain basic concepts, talk about async, and comparison with zustand/recoil
  • guides will contain help on how to use jotai in some particular scenarios: nextjs, typescript, devtools; and how to implement some of the patterns: persistence, resettable atoms
  • and API describes APIs each bundle provides which consists of type (or some other way to display function signature), what arguments it takes, etc. and some small examples, examples here I think should be as small as possible so it will serve as a reference instead of the whole working application, but I think it's OK for API references to duplicate some of the text or examples that could be already there in guides or introduction

So now back to resettable atoms :)

It's probably not a core concept, so it doesn't need an article in the introduction, but that's a pattern that could be described in the guide. Then guide has links to API reference and API reference has links back to guide if someone needs more information.

And back to the overall idea :) I like how resettable atoms are documented in this branch and I think it makes sense to rewrite docs so they fall in line with that style

  • introduction/async.md looks OK to me
  • introduction/comparison.md looks OK to me
  • introduction/showcase.md looks OK to me
  • introduction/core.md needs to read more like introduction into concepts and less like API reference
  • api/devtools.md probably OK?
  • api/optics.md probably OK for now, but add function types
  • api/immer.md probably OK for now, but add function types
  • api/utils.md I only done with atomWithReset/useResetAtom/RESET there, other apis need to be described in similar style
  • api/core.md needs to read more like like API reference and less like introduction into concepts
  • guides/typescript.md looks OK to me
  • guides/nextjs.md looks OK to me
  • guides/persistence.md looks OK to me
  • guides/debugging.md needs to read more like guide on debugging and less like API reference
  • guides/resettable.md this and persistence is how I think guides should look

p.s. I tried to setup Docusaurus for the docs so that it will be faster to preview changes without having to upload it to GitHub first. It turned out to be not as easy as I was thinking :) format of the links changes, you need to add some random metadata to the markdown for it to work properly :) I was kind of expecting for it to just magically work :) this part might be relevant since the more links that we add to docs (as I did for reset stuff because before that there was just one link to ./async.md) the more you would have to redo once you are using some document generator :)

image

@dai-shi
Copy link
Member Author

@dai-shi dai-shi commented Dec 5, 2020

@JLarky I like your idea of three categories. You can take the lead for the initial draft. That would be really helpful.

(p.s. you want to join the pmndrs discord and discuss with others?)

@dai-shi dai-shi added the help wanted label Jan 22, 2021
@dai-shi
Copy link
Member Author

@dai-shi dai-shi commented Jan 22, 2021

Hoping @JLarky 's work is still in progress.

@JLarky
Copy link
Contributor

@JLarky JLarky commented Jan 22, 2021

@dai-shi
Copy link
Member Author

@dai-shi dai-shi commented Jan 22, 2021

Yeah, please create it as is. It would be nice if you could include the check list to show what's done and what's incomplete.
No situation is changed for the site. We should move forward without it for now.

@JLarky
Copy link
Contributor

@JLarky JLarky commented Jan 26, 2021

I have pushed my drafts to https://github.com/JLarky/jotai/commits/new-docs-wip so that if everyone wants to continue the work they could maybe salvage some of it :) TODO has a list of things that I was going to fix.

The main idea behind WIP was to separate core.md into just API reference and introduction into jotai (and overall atomic datastores) concepts, and creating a separate guide on how to use jotai scope. As for core.md I wrote some of it :) but I wasn't happy with what I got and just overall I think you can feel that it wasn't written by one person :) and scope.md I just created a file and didn't write anything there yet, but I was sure that it would be good to write it in a style similar to docs/guides/persistence.md as in "here are few patters how to use jotai scope with examples" :)

dai-shi added a commit that referenced this issue Jan 28, 2021
* move docs into subdirectories

* cp docs/introduction/core.md docs/api/core.md

* something like that as api reference

* cp docs/guides/debugging.md docs/api/devtools.md

* add api reference for devtool bundle

* fix grammar

* add docs for resettable atoms

* move bigger examples to guides/resettable
* provide smaller examples in API docs

* rewrite guides/debugging.md in more succinct manner

* fix typo

* yarn prettier --write ./docs/**

* did prettier version change after rebase?

* fix links to docs considering new paths

* chore: organize docs in readme and some tweaks

Co-authored-by: daishi <daishi@axlight.com>
@dai-shi
Copy link
Member Author

@dai-shi dai-shi commented Jan 28, 2021

The work #280 by @JLarky is merged.
We still need to improve them.
Anyone volunteer please?

@dai-shi dai-shi added the help wanted label Jan 28, 2021
@dai-shi dai-shi changed the title [Umbrella] Improve docs/*.md Improve docs/*.md Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants