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

Main Screen & Review w/ Dummy Cards #2

Merged
merged 8 commits into from
Feb 15, 2022
Merged

Main Screen & Review w/ Dummy Cards #2

merged 8 commits into from
Feb 15, 2022

Conversation

SlyPuffin
Copy link
Owner

First set of changes to match the UI with the Figma design.

  • Prisma Seed can be used to easily test the set-up
  • Deck can be cycled through repeatedly.
  • Timer and next button are both implemented.
  • Simple Deck/Card schema is used.
  • Main screen dynamically generates buttons for each deck.

@SlyPuffin
Copy link
Owner Author

@nleech16 @tliebert
Would appreciate a look-over and any comments on the PR before making going through with the merge.
I'll add some comments, too.

@@ -12,12 +12,24 @@ generator client {
previewFeatures = ["referentialIntegrity"]
}

model Card {
id Int @default(autoincrement()) @id
model DxDeck {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The Dx prefix on Card and Deck was just for your experimentation, right?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yes! I'll change these to simply "Card" and "Deck" and re-push.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Fixed in: 589075a

Comment on lines 9 to 14
input: z
.object({
text: z.string().nullish(),
})
.nullish(),
async resolve({ input }) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we just get rid of this input for now?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Tested locally. Works fine without any input! Down to delete for now.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Fixed in 589075a

import NextError from "next/error";
import Link from "next/link";

export default function Review() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

do you think we'll have a page at deck/[id] with a different purpose? Wondering if we just use that versus review

Copy link
Owner Author

Choose a reason for hiding this comment

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

Good question! The idea was that "review" would be an execution of the deck.
Possibilities in the future

  • /deck/[id] -> An overview of your deck where you can look at all the cards in a list view and edit/add
  • /card/[id] -> An editing page for a card?

I noticed that you had a "new" page in your branch. That seems perfectly clear! /edit/[id] could certainly be embedded to make things work perfectly fine. I'm not particularly hung up on any particular naming convention, but switched to "review" to make the use a little more clear than "deck" which I figured could have multiple interpretations.

That being said, I'm down to change to anything that makes sense and can be expanded upon!
@nleech16 @tliebert Thoughts?

@@ -8,7 +8,7 @@
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"module": "commonjs",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Curious as to what prompted the change to commonjs from esnext.

Copy link
Owner Author

@SlyPuffin SlyPuffin Feb 15, 2022

Choose a reason for hiding this comment

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

Good question! I was running into the following error trying to run npx prisma db seed.
It looks like the seed command utilizes ts-node, which requires commonjs from my understanding.

…refactored DxDeck and DxCard to Deck and Card across the app
@SlyPuffin SlyPuffin merged commit 4cf12ab into main Feb 15, 2022
@SlyPuffin SlyPuffin deleted the dan-poc branch February 15, 2022 23:04
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.

3 participants