-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature automated artwork updates (#162)
* add residency artwrok template * added new review artwork step to submission form * fix type error * add alt layout for guest show and fix form submission types * adjust artwork emailer to link to contentful asset and always run on shows that are two days away. * move artwork-emails to cron and add to cron schedule * update filename when saving to contentful * update socialImage to showArtwork * remove inaccessible colours from show artwork colour palette * create extension for revalidation artwork in contentful, refactor contentful image upload functions to lib folder * improve wording when regenreating artwork * get field values from contentful as time of regeneration request * add verification to artwork regeneration endpoint * send artwork in jpg format in email * move create client inside functions * convert image from cloudinary to https * dont allow form submission whilst images are uploading/processing * move to new show artwork field in contentful * add auth to artwork email endpoint * reorder colours for artwork to be better distributed * update working on artwork step and remove checkbox * use preview client in show artwork url to get unpublished artists * add preview watermark and text to artwork step * Feature film screenings (#145) * add film screening to events page filter * fix film screening breaking event type pill, move event type to end of row * add film screening to event type * adjust event row date width so it fits onto one line * Bugfix draft artists (#146) * fix bug with draft artist being return from cms on published show * remove unused code * fix but with comma in second last artist name * remove focus state from play buttons * remove white outline from play button focus-within state * Feature daily schedule artwork generator (#147) * implmenent mvp for automated schedule artwork * fix base url for stickers * add don't cache response header * add specific page for schedule artwork generation to solve transparent bg issue * add border to img * add download image button, fix sticker array length bug * indicate to user when image is reloading * adjust schedule so its only today and add to admin calendar additional menu * remove some stickers * fix bug with daily artwork generator times (#148) * add loading state to daily artwork generator (#149) * Bugfix long schedule (#150) * adjust spacing for longer schedules * adjust font size for longer schedules * Feature/calendar updates (#151) * add copy handles button to insta text popup * add back button to daily schedule generator * Feature/email updates (#152) * refactor submission email and adjust wording * update confirmation email text * Bugfix/guests page (#153) * add pagination to guests page * animate load more button * remove unused code from guest page * bugfix same key for fetch with guests and news page (#154) * make calendar additional menu available for mobile (#155) * Bugfix show preview search (#156) * make include play button in show preview on search page * remove genres that don't have a name when parsing shows to correct format * Feature/daily schedule updates (#157) * add border and opaque background * add responsive text size to schedule generator when schedule is long * fix typo in show submission email (#158) * Feature/show at time api endpoint (#159) * create api endpoint for getting the show that took place at a specific time. * move api endpoint to shows folder * update website api secret * add show artwork to show by timestamp api endpoint and make it preview temporarily for testing puroposes (#160) * download todays artwork as zip * take artists from title when regenerating artwork * add missing dependencies * better naming of show artwork field
- Loading branch information
1 parent
ae5a9e6
commit 351c5c6
Showing
23 changed files
with
885 additions
and
331 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
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,67 @@ | ||
import { useFormikContext, Field, ErrorMessage } from "formik"; | ||
import { useState, useEffect } from "react"; | ||
import { showArtworkURL } from "../../util"; | ||
import { SubmissionFormValues } from "../../types/shared"; | ||
|
||
export default function ShowSubmissionStepArtwork() { | ||
const { values } = useFormikContext<SubmissionFormValues>(); | ||
|
||
const [imageUrl, setImageUrl] = useState<string | null>(null); | ||
const [loading, setLoading] = useState<boolean>(false); | ||
|
||
const fetchImage = async () => { | ||
setLoading(true); | ||
const surl = showArtworkURL(values, true); | ||
console.log(surl); | ||
const response = await fetch(surl); | ||
const blob = await response.blob(); | ||
const url = URL.createObjectURL(blob); | ||
setImageUrl(url); | ||
setLoading(false); | ||
}; | ||
|
||
useEffect(() => { | ||
fetchImage(); | ||
}, []); | ||
|
||
return ( | ||
// We pass the event to the handleSubmit() function on submit. | ||
<div className="mt-16"> | ||
<legend className="font-sans mb-12 text-large font-medium text-center"> | ||
Preview artwork | ||
</legend> | ||
<div className="aspect-square max-w-3xl bg-black text-white flex items-center justify-center h-full w-full mx-auto"> | ||
{imageUrl ? ( | ||
<> | ||
<div | ||
className="border border-white bg-cover bg-center" | ||
style={{ | ||
backgroundImage: `url(${imageUrl})`, | ||
width: "100%", | ||
height: "100%", | ||
maxHeight: "80vh", | ||
}} | ||
></div> | ||
<span className="absolute text-white opacity-50 text-[6rem] pointer-events-none"> | ||
PREVIEW | ||
</span> | ||
</> | ||
) : ( | ||
<span className="animate-pulse">Generating preview artwork...</span> | ||
)} | ||
</div> | ||
{imageUrl && ( | ||
<> | ||
<p> | ||
This is a preview only and your final artwork will be sent to you | ||
via email. | ||
</p> | ||
<p> | ||
Please press ‘submit’ if you’re happy with the artwork. If you need | ||
to make changes please go back. | ||
</p> | ||
</> | ||
)} | ||
</div> | ||
); | ||
} |
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
File renamed without changes.
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.