Open
Conversation
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 :)
This prevents flaky tests due to dev server startup
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://wonderful-water-0b2eba80f-257.eastus2.5.azurestaticapps.net |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(PR includes #254 because only PRs to main get automatically deployed to a staging environment.)
This is a sizeable chunk of work, in large commits, pulled in from the prototyping work we did over in https://github.com/DevResults/xdev-dxos. The end result is a version of xdev that uses DXOS for auth, storage, and sync instead of the localfirst libraries and automerge (directly, anyway)
We found that DXOS had some pretty major shortcomings when it came to support for schema, so the definitions of our objects and the collections are all very different than before. More expectedly, the way that users and devices are defined and managed is also different (to account for the shape of the DXOS interfaces). Ultimately, we've got something that is similar in functionality as before.
You can run this locally with
pnpm i; pnpm devorpnpm i; pnpm build; pnpm start?spaceInvitationCode=<code>and you can either manually change those into the form/join/<code>or paste just the code into the join box when joining a team. You'll need to do similar changes with the device linking.