-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP create pub via form * Fix default values * Fix default submit button css * Undefined defaults * Get form creating pubs * Workaround for saving not always going through * Make sure upload id is right * Fix vector3 default * Clean up * Add copy button * Fix url for copying a form * Fix pub id passing around * Add basic test * Update creating pub behavior to check against all pub fields in community as opposed to pub type Otherwise creating a pub from a form can error out since the form might have pubfields not in the pubtype * Remove unused import * Add new schema types to `getDefaultValueByCoreSchemaType` * Try to update playwright --------- Co-authored-by: Kalil Smith-Nuevelle <[email protected]>
- Loading branch information
1 parent
f2e73c1
commit 33dbddc
Showing
14 changed files
with
410 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
core/app/c/[communitySlug]/forms/[formSlug]/edit/FormCopyButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"use client"; | ||
|
||
import { CopyButton } from "ui/copy-button"; | ||
|
||
import { useCommunity } from "~/app/components/providers/CommunityProvider"; | ||
|
||
export const FormCopyButton = ({ formSlug }: { formSlug: string }) => { | ||
const community = useCommunity(); | ||
const link = `${window.location.origin}/c/${community.slug}/public/forms/${formSlug}/fill`; | ||
return ( | ||
<CopyButton className="flex h-8 w-auto gap-1 p-3" value={link}> | ||
Copy link to live form | ||
</CopyButton> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.