iway1 / trpc-panel

MIT License
627 stars 43 forks source link

Long Zod Input description text breaks Flex Layout #59

Closed khill-fbmc closed 1 year ago

khill-fbmc commented 1 year ago

I didn't notice until I tried copy-pasting some long text into the ~meta~ zod input descriptions...

image

I see that the layout is two separate flex divs... I feel that a grid layout would work better than div + ul

khill-fbmc commented 1 year ago

I have narrowed it down to this section, but I cannot seem to figure out how to work your repo...

I clunkly figured out how to build and run the demo-server and then add a procedure, build and view the panel....

  procedureWithVeryLongInputDescriptions: t.procedure
    .meta({
      description: "This is a description",
    })
    .input(
      z.object({
        id: z.string().describe("The id of the thing.".repeat(10)),
        searchTerm: z
        .string()
        .optional()
        .describe("The name of the thing to search for.".repeat(10)),
        limit: z.number().describe("The limit of the thing.".repeat(10)),
      })
    )
    .query(() => {
      return "Was that described well enough?";
    }),

But without being able to view my edits live I can't work with write, build, wait, restart, view

Do you have some guidance on how you develop on this yourself? With some notes on how you do it, I could help contribute more easily.

iway1 commented 1 year ago

Thanks for the reproduction.

Adding a contribution guide is a really good idea!

Having the dev-app as part of the repo makes it pretty easy to work on the project locally but it's not obvious at all how to get it up and running. I'll put something together

iway1 commented 1 year ago

@khill-fbmc I did an overhaul of the dev-app now it should be as easy as possible to run trpc-panel locally to work on the library. See the new contribution guide at https://github.com/iway1/trpc-panel/blob/main/CONTRIBUTING.md

Let me know if you have any issues getting it up an running, should just be able to install dependencies and run the dev-app. Feel free to add any additional recommendation about making contributions easier, if you have any 🙏

I'm going to look at a fix for the layout issue as well

khill-fbmc commented 1 year ago

Thank you for taking the time to write that up, I and all future contributors appreciate it 🥇

khill-fbmc commented 1 year ago

Updated to 1.2.13 and it looks great!

image

iway1 commented 1 year ago

very cool! :)