data icon indicating copy to clipboard operation
data copied to clipboard

ReactiveResource Documentation Quest

Open runspired opened this issue 1 year ago • 7 comments

SchemaRecord Overview

  • [x] @warp-drive/schema-record has a meaningful README with an overview and setup instructions
  • [x] @warp-drive/schema-record has a meaningful overview for the APIDocs

New Guides Content

  • [ ] How to author a resource/object schema
  • [ ] kinds of FieldSchema and what they do
  • [ ] which FieldSchema kinds / features are not yet supported in standard mode
  • [ ] configuring SchemaRecord
  • [ ] configuring SchemaRecord AND Model
  • [ ] immutability/remoteState expectations of SchemaRecord
  • [ ] editing and saving an immutable SchemaRecord
  • [ ] editing and saving deep-object changes
  • [x] using legacy mode for SchemaRecord (and its expectations)
  • [x] linksMode with Model relationships
  • [x] linksMode with SchemaRecord relationships
  • [ ] using Types with SchemaRecord
  • [ ] registering and using transformations
  • [ ] registering and using derivations
  • [ ] registering and using hash functions
  • [ ] registering and using default derivations for legacy mode
  • [ ] registering and using default derivations for standard mode
  • [ ] "rules" for registering schema information
  • [x] withDefaults for legacy mode
  • [ ] withDefaults for standard mode
  • [ ] migrating between Model and SchemaRecord
  • [ ] advanced migration via Proxy + legacy mode
  • [ ] ??

New API Docs Content

  • [ ] @warp-drive/schema-record instantiateRecord
  • [ ] @warp-drive/schema-record teardownRecord
  • [ ] @warp-drive/schema-record withDefaults
  • [ ] @warp-drive/schema-record SchemaService
  • [x] @warp-drive/schema-record registerDerivations
  • [x] @warp-drive/schema-record fromIdentity
  • [ ] @warp-drive/schema-record instantiateRecord
  • [ ] @warp-drive/schema-record Checkout

Existing Guides Content Changes

  • [ ] use schemas, types and schema-record instead of Models in super-rentals tutorial
  • EmberData Section
    • [ ] Defining Models should become Defining Schemas
    • [ ] Creating, Updating and Deleting should no longer show legacy model method
      • remove save hasDirtyAttributes changedAttributes rollbackAttributes
      • remove deleteRecord isDeleted and destroyRecord
      • validation errors should be handled from the request, no more record.errors
    • [ ] Relationships
      • this whole section needs a major rework, not just to remove Models. Likely we should use the in-repo relationship guides as a starting point instead.

APIDocs Content Changes

  • [ ] use schemas, types and schema-record instead of Models in main examples
  • [ ] update main, store and request overviews to show SchemaRecord usage
  • [ ] mark Model as legacy (link to schema-record)

runspired avatar Feb 23 '25 16:02 runspired

Highest priority items for 5.4 from above in priority order

  • [x] New API Docs overview for SchemaRecord
  • [x] New API Docs content
  • [x] field schema guide w/current "standard mode" limitations
  • [x] linksMode guide
  • [x] legacy mode guide

runspired avatar Feb 23 '25 20:02 runspired

I've improved the types for field schemas, resource schemas, and object schemas to only allow (respectively) what is currently implemented for both legacy mode and polaris mode.

runspired avatar Mar 20 '25 19:03 runspired

Dropping a note here that most of the links in the current docs of Package @warp-drive/schema-record are leading to Site not found: See e.g. the links to associated cache, Requests and the Store.

johanrd avatar Apr 02 '25 21:04 johanrd

@johanrd this is expected because of them being the canary docs deploy, relative links don't get corrected for the hash-routing required.

runspired avatar Apr 03 '25 03:04 runspired

added a legacy mode guide:

  • https://github.com/emberjs/data/blob/main/guides/reactive-data/legacy/overview.md
  • added a WithLegacy type util and API docs for withDefaults from migration support: https://discord.com/channels/@me/1147329211527335936/1367403874800893962
  • added api docs in general around what @ember-data/model/migration-support offers https://discord.com/channels/@me/1147329211527335936/1367403839484854302

runspired avatar May 01 '25 07:05 runspired

@runspired tried following the Discord links here to keep tabs on these changes and found they didn't load on this end. Do you happen to have other links we can try?

acorncom avatar May 25 '25 13:05 acorncom

@acorncom oh that's annoying, seems discord did the thing where it copies the post link instead of the link in the post. I could link them but easier to just brows the docs, I redeploy them manually but mostly daily (until we can move the repo out of emberjs which will let us publish directly from commit) https://docs.warp-drive.io

runspired avatar May 26 '25 08:05 runspired

we've mostly covered the basics and are getting into the nitty gritty now

runspired avatar Oct 01 '25 06:10 runspired