Skip to content

Adding for printers text field section while shipping.#203

Open
Shreerang912 wants to merge 8 commits intohackclub:mainfrom
Shreerang912:main
Open

Adding for printers text field section while shipping.#203
Shreerang912 wants to merge 8 commits intohackclub:mainfrom
Shreerang912:main

Conversation

@Shreerang912
Copy link
Copy Markdown
Contributor

Add "For Printers" field to project shipping

What's changed

Adds an optional "For Printers" text field to the ship page, allowing project authors to leave notes specifically for whoever ends up printing their model.

Why

Printers often need specific technical details that don't belong in the public project description — things like recommended supports, tolerance notes, material suggestions, or tricky parts to watch out for. This gives authors a dedicated place to put that info.

Behaviour

  • The field appears on the ship page (/dashboard/projects/[id]/ship) with a 3000 character limit
  • Once shipped, the text is only visible on the project detail page (/dashboard/projects/[id]) — it does not appear on project cards
  • It's hidden behind a collapsible arrow below the project description, so it doesn't clutter the page for everyone
  • The field is optional — existing projects and the ship flow are unaffected if left blank

Files changed

  • src/lib/server/db/schema.ts — adds forPrinters column to the project table
  • drizzle/0036_for_printers_field.sql — migration to add the column to the database
  • src/routes/dashboard/projects/[id]/ship/+page.svelte — adds the textarea to the ship form
  • src/routes/dashboard/projects/[id]/ship/+page.server.ts — reads and saves the field on submission
  • src/routes/dashboard/projects/[id]/+page.server.ts — exposes forPrinters to the project detail page
  • src/routes/dashboard/projects/[id]/+page.svelte — renders the collapsible "For Printers" section

After merging

This PR includes a database migration. Before deploying, the for_printers column needs to be added to the database by running the migration in drizzle/0036_for_printers_field.sql. Without this step the site will crash for anyone trying to ship a project.

Refactor project listing page to improve filtering and search functionality. Updated project rendering and added filter chips for better user experience.
Add a new for_printers text column (NOT NULL, default '') to the project table via a Drizzle migration and expose it throughout the app. Updated schema (forPrinters) with a comment, included the field in server load handlers for project pages and the ship flow, and wired the ship form to accept and persist up to 3000 characters. UI: show a collapsible "For Printers" block on the project page and add a textarea on the ship page (with placeholder and visibility note). Files changed: migration, DB schema, project page load + UI, ship page load + UI + actions.
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.

1 participant