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

Figure out how to make info an object #54

Open
dskunkler opened this issue Aug 13, 2023 · 2 comments
Open

Figure out how to make info an object #54

dskunkler opened this issue Aug 13, 2023 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@dskunkler
Copy link
Owner

dskunkler commented Aug 13, 2023

Maybe just redefine how we're doing events? Right now I'm kind of just saying info can be ANY object. Maybe we can just think of it as notes for now. Events seem to have one commonality which is they all have a name, a date it occurred. Some have similarities like duration. You may arc or hangboard both for a duration, but I don't think they're really the same duration, hangboarding is seconds and ARCing is minutes... Should we just have multiple different Types of events with specific data for each? Even if this is true, it still needs to fulfill the schema for events...

@dskunkler
Copy link
Owner Author

I really want this object to just have anything in it so I can put whatever Data I want for specific events. Would be interested in thinking more deeply about this typing since its actually really bad. Anyways, heres some resources I was looking at but could never really get it to work. Something about the Json adding a null and passthrough not being valid against that
https://github.com/colinhacks/zod#json-type.
colinhacks/zod#2178

@dskunkler dskunkler added the help wanted Extra attention is needed label Aug 13, 2023
@dskunkler dskunkler added this to the Make it trackable milestone Aug 14, 2023
@dskunkler
Copy link
Owner Author

Might not be a huge issue right now. OutdoorMileage component just parses the JSON string. Still not ideal but not super necessary. If you are able to get JSON objects, then update the places we parse and stringify as part of the story

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
Status: Todo
Development

No branches or pull requests

1 participant