Skip to content

Comments

Dxos#256

Closed
bigdogwillfeed wants to merge 19 commits intomainfrom
dxos
Closed

Dxos#256
bigdogwillfeed wants to merge 19 commits intomainfrom
dxos

Conversation

@bigdogwillfeed
Copy link
Member

@bigdogwillfeed bigdogwillfeed commented Mar 13, 2025

depends on / includes #254

Following https://reactrouter.com/upgrading/remix, I did `npx codemod remix/2/react-router/upgrade`, `pnpm install`, and `pnpm lint --fix` (to get rid of semi colons)
It's possible we'll want to customize the entry points in the future, but this change is what it took to get the app to function at all
navigate is now async so needs to be handled as such
# Conflicts:
#	pnpm-lock.yaml
replaced this extra bit of remix still lurking with the proper react-router syntax
react-router says it needs this
Replace localfirst and automerge packages with dxos. Update effect to match what dxos needs -- note this exposed a buggy test which I also fixed
Note we've made build a bit more complicated because the dxos shell is a separate react app. So we build the shell separately and then include both apps in the build directory
There are some big differences in how a dxos TypedObject behaves compared to an EffectSchema.Class:
1. there is no support (yet) for transforms, so we're treating dates and timestamps as strings and only referencing the foreign key instead of a fully hydrated object
2. there is no support (and perhaps no need) for the entire Collections and Root concepts
3. TypedObjects are `create`d instead of `new`ed
4. there is no support for getters (so we're storing computed values and have changed a lot about how ExtendedContact works)

This commit is still non-functional (the app doesn't run) but `pnpm test` passes
This is nearly all covered in dxos
Main categories of changes here:
- collections no longer exist, so we need to use callbacks
- objects have different creation syntax and required fields
- objects are no longer hydrated, so we need to prop drill the lookup collections and deal with dates as strings
- devices come from dxos and have a different shape (I use platform to build these for tests)
- extended members have no invitation status (invites are anonymous)

I think all of the stories are working correctly with `pnpm storybook`
This is faster and nicer than the dev server if you're just poking around
update the hooks and routes so that they work with the new DXOS shape of things
Basically, this is removing tests that are hard automate in dxos (team management through the shell) and giving persistence a little bit longer before refreshing the page
This gets the build working on my local machine :)
@bigdogwillfeed bigdogwillfeed changed the base branch from react-router to main March 13, 2025 21:46
@bigdogwillfeed bigdogwillfeed marked this pull request as ready for review March 13, 2025 21:47
@bigdogwillfeed
Copy link
Member Author

trying a second time....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant