Skip to content
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

fix: border type enums as strings #400

Merged
merged 3 commits into from
Apr 4, 2023
Merged

fix: border type enums as strings #400

merged 3 commits into from
Apr 4, 2023

Conversation

jimniels
Copy link
Collaborator

@jimniels jimniels commented Apr 4, 2023

The old file schema used integers as enums for border types whereas the new schema introduced here uses human readable strings.

This results in old files with special borders having integers as values (instead of strings) and therefore not passing zod parsing

For example, the new file formats look like this:

"borders": [
  {
    "x": 5,
    "y": 6,
    "vertical": {
      "type": "dashed"
    }
  }
]

Whereas the previous file format was:

"borders": [
  {
    "x": 5,
    "y": 6,
    "vertical": {
      "type": 4
    }
  }
]
  • Update the v1 schema to reflect the old enums and add v1_1 to use the new strings method, with the updater function updating old values - WILL DO THIS IN ANOTHER PR
  • Add tests to denote this change

@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-400 April 4, 2023 04:38 Inactive
@aws-amplify-us-west-2
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-400.de5w5iglj13on.amplifyapp.com

@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-400 April 4, 2023 16:12 Inactive
@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-400 April 4, 2023 16:30 Inactive
@jimniels jimniels merged commit 896bf69 into main Apr 4, 2023
@jimniels jimniels deleted the fix-local-files-enums branch April 4, 2023 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants