simolus3 / drift

Drift is an easy to use, reactive, typesafe persistence library for Dart & Flutter.
https://drift.simonbinder.eu/
MIT License
2.66k stars 372 forks source link

Restructure documentation #3246

Closed dickermoshe closed 1 month ago

dickermoshe commented 1 month ago

@simolus3 Check these as we go along with this I'll be adding checkboxes once more docs are completed.

Schema

@simolus3 -> for you to check when satisfied:

dickermoshe commented 1 month ago

@simolus3 Seems docker is failing. Don't know if this is a github, docker or Drift issue.

simolus3 commented 1 month ago

Maybe Docker Hub is rate-limiting unauthenticated GitHub actions? If the problem persists we might have to use another registry for the dependencies.

dickermoshe commented 1 month ago

We could try this

github-actions[bot] commented 1 month ago

๐Ÿš€ Deployed on https://deploy-preview-3246--moor.netlify.app

dickermoshe commented 1 month ago

Seems docker is working again

dickermoshe commented 1 month ago

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.

The more I think about this, the more I'm convinced you're right. I'm going to put this on hold until I have a better plan of action.

dickermoshe commented 1 month ago

The focus of this restructuring is mainly for the 5 or 6 pages that users will go to when they discover drift. There is some legacy stuff which will confuse new users (sqlflite) which should be explained better.

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๐Ÿ˜‰

simolus3 commented 1 month ago

The focus of this restructuring is mainly for the 5 or 6 pages that users will go to when they discover drift.

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).

dickermoshe commented 1 month ago

Instead of reinventing the wheel, I'm going to copy drizzle structure

dickermoshe commented 1 month ago

@simolus3 Can we add this

mixin IdColumnMixin on Table {
  late final id = integer().autoIncrement()();
}

to drift?

Or maybe as a base class

class TableWithId extends Table {
  late final id = integer().autoIncrement()();
}

Maybe we could call it something better though.

dickermoshe commented 1 month ago

Closing. We're going to do this a single page at a time until everything is nice.

dickermoshe commented 1 month ago

If Celest starts to take off, we're going to be overrun with new users. Let's try to get this done quicker

simolus3 commented 1 month ago

Let's try to get this done quicker

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.