Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Drop broken/incomplete logic for prompting for event schema values #258

Merged
merged 1 commit into from
Sep 13, 2021

Conversation

Andarist
Copy link
Member

@Andarist Andarist commented Sep 9, 2021

When reviewing #256 I've noticed that this piece of code has some serious issues so I think that it's best to drop this entirely for the time being.

  1. it's prompting for all properties - even if they are already defined. It's clashing with the events coming from the <NewEvent/> as those could already define the required props. Could this be fixed by conditionally prompting against missing values? Yeah, sure... but...
  2. this doesn't actually use the schema at all - it just prompts for the given keys. This would fail for any non-string values. Given that fact, I believe that it's better to remove this code for now and revisit it with a more complete solution in the future.
  3. this logic first clones the received event and then mutates the deep property (which has not been cloned with spread). So this might work... but it probably could be done in a more explicit way that would be easier to follow.

@changeset-bot
Copy link

changeset-bot bot commented Sep 9, 2021

⚠️ No Changeset found

Latest commit: 937d841

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Sep 9, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/statelyai/xstate-viz/4ie9rwLSAxVmZySoBBDJ5bC2x7PF
✅ Preview: https://xstate-viz-git-andarist-drop-event-schema-prompting-statelyai.vercel.app

Copy link
Member

@davidkpiano davidkpiano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Farewell, prototype code

@Andarist Andarist merged commit c36ce23 into dev Sep 13, 2021
@Andarist Andarist deleted the andarist/drop-event-schema-prompting branch September 13, 2021 08:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants