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

docs: configure transformer in tRPC and add instructions for drizzle-kit #565

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Rockerturner
Copy link

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Which package are you modifying?

  • accordion
  • alert
  • alert-dialog
  • aspect-ratio
  • avatar
  • badge
  • button
  • calendar
  • card
  • checkbox
  • collapsible
  • combobox
  • command
  • context-menu
  • data-table
  • date-picker
  • dialog
  • dropdown-menu
  • hover-card
  • icon
  • input
  • label
  • menubar
  • navigation-menu
  • pagination
  • popover
  • progress
  • radio-group
  • scroll-area
  • select
  • separator
  • sheet
  • skeleton
  • slider
  • sonner
  • spinner
  • switch
  • table
  • tabs
  • textarea
  • toast
  • toggle
  • tooltip
  • typography

What is the current behavior?

The documentation at spartan/installation is missing transformer configuration for tRPC, which breaks end-to-end type safety in the Notes example. There is also no documentation present for drizzle-kit.

Closes #

What is the new behavior?

Instructions on how to configure the transformer for tRPC and how to use the drizzle kit to generate, migrate, and push your schemas have been added along with the repository with configured spartan/installation.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@Rockerturner
Copy link
Author

Oddly, my code should not affect any test cases, especially for Select, so I'm not entirely sure why the tests failed. Let me know if it's something from my code, and I'll fix it. Also, if you were looking to integrate angular-query to the spartan stack, I could add instructions in the spartan/installation.

@goetzrobin
Copy link
Collaborator

This is great! Thanks for adding such thorough documentation!
How do you feel about creating an example repo in the spartan-ng org and pointing to that in the final paragraph?
This can be a future PR and we can keep as it is for now.
But I think it would be good to have an "official" example?
Curious to hear your thoughts!

@elite-benni
Copy link
Collaborator

elite-benni commented Jan 23, 2025

Oddly, my code should not affect any test cases, especially for Select, so I'm not entirely sure why the tests failed. Let me know if it's something from my code, and I'll fix it. Also, if you were looking to integrate angular-query to the spartan stack, I could add instructions in the spartan/installation.

The select tests are flaky, so as you expected, this is not your fault. ;)

Thanks for the PR, this is a nice addition to the documentation.

angular-query
There is already a PR Open for TanstackQuery, where the notes example is using the query, but I guess the community wanted to have both examples.

LGTM!

@Rockerturner
Copy link
Author

Rockerturner commented Jan 24, 2025

@goetzrobin I fully agree with moving the example repo to spartan-ng org. I am very new to contributing to open-source and slowly finding my footing. I noticed a few mistakes with this pull request where the commands for drizzle-kit migrate and push use 'npm i -D drizzle-kit' instead of 'npx drizzle-kit'. I'll go ahead and fix that. I can also get the example repo spartan-ng, but if you could point me in the right direction on how to get started on that, I'd appreciate it. That being said. I'll convert this pull request to a draft.

@elite-benni I am up for adding the documentation with the basic implementation of tanstack-angular-query if we think it would be something the community would be interested in for this example. I am a big fan of react-query and used @ng-neat/query before Tanstack started supporting Angular. However, we could leave it be if it's unpopular amongst the Analogjs/Angular community. We could poll it in Discord.

@elite-benni
Copy link
Collaborator

I thought that Robin meant creating a own example repository in the organization instead of an app inside this monorepo.
Basically moving your repository to spartan-ng organization.
something like spartan-ng/example-app.
Maybe we can add a page for both implementations (trpc and query) and keep that up to date, then we also have an example repo to test updates.
Or another idea was, that we create one repo where we use nx and one where we use plain ng cli.
Let me know what you think.

@Rockerturner
Copy link
Author

I apologize for the misunderstanding regarding the transition to the "example to organization" aspect. As I’m still gaining experience with contributing to open-source projects, I may have misinterpreted the process. To prevent further confusion or unnecessary discussion, I’ll reach out to Robin on Discord to seek guidance on the appropriate next steps. I genuinely appreciate the feedback provided. Once I have clarity on how to proceed, I will revert the last two commits accordingly.

@elite-benni
Copy link
Collaborator

no need to apologize, we are happy for all contributions!
Thanks for your efforts and welcome to the project!

I am also not sure if I got it right ;).
good idea to clarify on discord!

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