-
Notifications
You must be signed in to change notification settings - Fork 369
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
Restructure documentation #3246
Conversation
@simolus3 Seems docker is failing. Don't know if this is a github, docker or Drift issue. |
Maybe Docker Hub is rate-limiting unauthenticated GitHub actions? If the problem persists we might have to use another registry for the dependencies. |
We could try this |
9a143d5
to
a689049
Compare
🚀 Deployed on https://deploy-preview-3246--moor.netlify.app |
Seems docker is working again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments on the schema page. It reads really nicely, I think my biggest question is what role this page should have (at the moment, part of it read like an in-depth reference, parts read like a getting started guide for people who have never used drift or build runner). The docs need to be good for both, but I think it will be hard to reconcile this on a single page.
docs/docs/schema.md
Outdated
|
||
## Overview | ||
|
||
In Drift, your schema is represented as a table. Each column in the table represents a field in your data class. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pedantically speaking, the schema is actually represented by multiple tables (and views, indices, ...) 🤓
Perhaps we can phrase this introduction as a "Drift is a library for relational databases, meaning that your data is structured into data with predefined columns" or something?
The rest of the introduction is nice 👍
docs/docs/schema.md
Outdated
After defining the schema, add the table to the database. | ||
|
||
{{ load_snippet('superhero_database','lib/snippets/schema.dart.excerpt.json') }} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess databases will also have their own page introducing them? We should also think about a setup page that explains everything step by step (which could link to the dedicated pages for support).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, there will be a getting started guide and another page devoted to the database itself.
Giving each page it's own overview gives users a broader sense of what's going on
docs/docs/schema.md
Outdated
dart run build_runner build | ||
``` | ||
|
||
<h4>Congratulations! 🎉🎉</h4> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reads like part of a guided setup tour, but I'm not sure if this page is supposed to take that role or if it should explain tables in more detail as a reference page?
I guess it will be easier to move content around once we have the basics in place, but I'd prefer to keep the distinction between guides showing everything step by step and these in-depth reference pages that (I suppose) will mostly be used to quickly look something up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll rewrite the later parts of the page to be more "reference-like", but an friendly overview gives users a sense of security
docs/docs/schema.md
Outdated
You've successfully defined the schema for your database. | ||
You can now use the generated code to interact with your database. | ||
|
||
{{ load_snippet('superhero_query','lib/snippets/schema.dart.excerpt.json') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should have tabs here to show how to do this with manager and with the regular query builder (happy to write half of the snippets in that case :D)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I plan on breaking up the query docs into 3 parts
Manager API
Core API
SQL APi
The Manager API is the simplest, so I want that to be the 1st thing users see.
In the query docs that I'm in middle of writing I reference the Core API docs for more complex operations.
The more I think about this, the more I'm convinced you're right. |
The focus of this restructuring is mainly for the 5 or 6 pages that users will go to when they discover drift. Overall the docs are pretty ok. I'm focusing mostly on PR, while you're focusing on maintaining a high quality package. Geez, get better priorities man😉 |
Maybe we could duplicate some of the information and restructure contents into a "reference" section (basically what we have at the moment) and a guide section that has the setup and these friendlier/high-level introductions to common things like tables, references and row classes. Then at the top of each page we'd put a box saying "This page gives an introduction to tables for users exploring drift. For a complete reference see, link1, link2, link3." (and similarly the reference pages could link to the guides). |
Instead of reinventing the wheel, I'm going to copy drizzle structure |
This comment was marked as off-topic.
This comment was marked as off-topic.
Closing. |
If Celest starts to take off, we're going to be overrun with new users. |
Agreed :+1 I've responded to your message, let me know if there's anything else I can do to help here :) I can also help with examples or writing sections once we have a good understanding on how to structure things. |
@simolus3
Check these as we go along with this
I'll be adding checkboxes once more docs are completed.
Schema
clientDefault
the recommended way to to defaults@simolus3 -> for you to check when satisfied: