Skip to content

feat(event): implement preview with drafts - #1739

Open
huzaifaedhi22 wants to merge 103 commits into
mainfrom
feat/invitation/eventpreview
Open

huzaifaedhi22 wants to merge 103 commits into
mainfrom
feat/invitation/eventpreview

Conversation

@huzaifaedhi22

@huzaifaedhi22 huzaifaedhi22 commented Feb 2, 2025

Copy link
Copy Markdown
Contributor

📚 Description

This PR

  • adds preview event functionality
  • fixes event photos upload and fetch
  • adds save as draft feature (in browser) for events

TODO

  • update website validator
  • use gql query for category and format

📝 Checklist

  • The PR's title follows the Conventional Commit format

@dargmuesli
dargmuesli force-pushed the master branch 2 times, most recently from db8592b to 95ec293 Compare February 20, 2025 05:59

@dargmuesli dargmuesli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments apply to all similar occurrences in other files as well of course

Comment thread package.json Outdated
Comment thread package.json Outdated
Comment thread src/app/components/event/EventTimePicker.vue Outdated
Comment thread src/app/components/event/EventTimePicker.vue Outdated
Comment thread src/app/components/event/EventTimePicker.vue Outdated
Comment thread src/app/pages/event/create.vue Outdated
Comment thread src/app/pages/event/edit/[username]/[event_name].vue Outdated
Comment thread src/app/utils/validation.ts Outdated
Comment thread src/gql/generated/graphcache.ts
Comment thread src/package.json Outdated
@dargmuesli dargmuesli changed the title feat(event-preview): implement event preview with drafts feat(event): implement preview with drafts Mar 4, 2025
@dargmuesli
dargmuesli changed the base branch from master to main March 7, 2025 10:28
Comment thread src/package.json Outdated
@@ -1,4 +1,4 @@
import { type FragmentType, graphql, useFragment } from '~~/gql/generated'
import { type FragmentType, graphql, useFragment } from '~~/gql/generated/gql'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the additions of /gql in this PR?

// export const useEventCategoriesQuery = () =>
// useQuery<EventCategoriesQuery>({
// query: eventCategoriesQuery,
// })

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this isn't used, it may not need to be part of this PR.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Colored icons should go the the colored subdirectory.

Comment thread src/app/assets/icons/social-copy.svg Outdated
@@ -0,0 +1,3 @@
<svg width="20" height="22" viewBox="0 0 20 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.5 0H2.5C1.4 0 0.5 0.9 0.5 2V16H2.5V2H14.5V0ZM17.5 4H6.5C5.4 4 4.5 4.9 4.5 6V20C4.5 21.1 5.4 22 6.5 22H17.5C18.6 22 19.5 21.1 19.5 20V6C19.5 4.9 18.6 4 17.5 4ZM17.5 20H6.5V6H17.5V20Z" fill="#868679"/>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<path d="M14.5 0H2.5C1.4 0 0.5 0.9 0.5 2V16H2.5V2H14.5V0ZM17.5 4H6.5C5.4 4 4.5 4.9 4.5 6V20C4.5 21.1 5.4 22 6.5 22H17.5C18.6 22 19.5 21.1 19.5 20V6C19.5 4.9 18.6 4 17.5 4ZM17.5 20H6.5V6H17.5V20Z" fill="#868679"/>
<path d="M14.5 0H2.5C1.4 0 0.5 0.9 0.5 2V16H2.5V2H14.5V0ZM17.5 4H6.5C5.4 4 4.5 4.9 4.5 6V20C4.5 21.1 5.4 22 6.5 22H17.5C18.6 22 19.5 21.1 19.5 20V6C19.5 4.9 18.6 4 17.5 4ZM17.5 20H6.5V6H17.5V20Z" fill="currentColor"/>

Comment thread package.json
"test:e2e:docker:server:static": "pnpm --dir tests run test:e2e:docker:server:static",
"test:e2e:docker:server:static:update": "pnpm --dir tests run test:e2e:docker:server:static:update"
},
"type": "module"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this removed?

Comment thread CHANGELOG.md
@@ -85,7957 +85,7207 @@

### Features

* **content:** add privacy consent ([#1874](https://github.com/maevsi/vibetype/issues/1874)) ([c50d90a](https://github.com/maevsi/vibetype/commit/c50d90a8477eaa1137df7c2e2fd592d2b3e2f2cf))
- **content:** add privacy consent ([#1874](https://github.com/maevsi/vibetype/issues/1874)) ([c50d90a](https://github.com/maevsi/vibetype/commit/c50d90a8477eaa1137df7c2e2fd592d2b3e2f2cf))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this file edited in this PR?

Comment on lines +71 to +72
placeholder?: string
timePlaceholder?: string

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is timePlaceholder ever set where EventTimePicker is used?

Comment on lines +58 to +63
import { Calendar } from '~/components/scn/calendar'
import {
Popover,
PopoverTrigger,
PopoverContent,
} from '~/components/scn/popover'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { Calendar } from '~/components/scn/calendar'
import {
Popover,
PopoverTrigger,
PopoverContent,
} from '~/components/scn/popover'

Autoimported

const props = defineProps<Props>()

const emit = defineEmits<{
(e: 'update:modelValue', date: CalendarDate): void

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use defineModel<CalendarDate>() for modelValue?

<input
v-model="selectedTime"
type="time"
class="w-full border-0 px-0 py-2 text-xl text-gray-600 placeholder:text-gray-400 focus:border-transparent focus:ring-0 focus:outline-none dark:bg-[--semantic-base-background] dark:text-[--semantic-base-text-primary] dark:placeholder:text-[--semantic-base-text-secondary]"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The [] syntax looks like it should be using () instead, right?

Comment on lines +170 to +174
import { ref } from 'vue'
import { ChevronDown } from 'lucide-vue-next'
import slugify from 'slugify'
import type { EventItemFragment } from '~~/gql/generated/graphql'
import { useEventForm } from '~/composables/useEventForm'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { ref } from 'vue'
import { ChevronDown } from 'lucide-vue-next'
import slugify from 'slugify'
import type { EventItemFragment } from '~~/gql/generated/graphql'
import { useEventForm } from '~/composables/useEventForm'
import { ChevronDown } from 'lucide-vue-next'
import slugify from 'slugify'
import type { EventItemFragment } from '~~/gql/generated/graphql'

Comment on lines +166 to +179
import { ref } from 'vue'
import { Calendar } from '~/components/scn/calendar'
import {
Popover,
PopoverTrigger,
PopoverContent,
} from '~/components/scn/popover'
import { CalendarIcon, ChevronDown } from 'lucide-vue-next'
import type { CalendarDate } from '@internationalized/date'
import { DateFormatter } from '@internationalized/date'
import { toDate } from 'reka-ui/date'
import type { BaseValidation } from '@vuelidate/core'

import { useEventForm } from '~/composables/useEventForm'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { ref } from 'vue'
import { Calendar } from '~/components/scn/calendar'
import {
Popover,
PopoverTrigger,
PopoverContent,
} from '~/components/scn/popover'
import { CalendarIcon, ChevronDown } from 'lucide-vue-next'
import type { CalendarDate } from '@internationalized/date'
import { DateFormatter } from '@internationalized/date'
import { toDate } from 'reka-ui/date'
import type { BaseValidation } from '@vuelidate/core'
import { useEventForm } from '~/composables/useEventForm'
import type { CalendarDate } from '@internationalized/date'
import { DateFormatter } from '@internationalized/date'
import type { BaseValidation } from '@vuelidate/core'
import { CalendarIcon, ChevronDown } from 'lucide-vue-next'
import { toDate } from 'reka-ui/date'

Comment on lines +50 to +52
import { ref } from 'vue'
import type { BaseValidation } from '@vuelidate/core'
const { t } = useI18n()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { ref } from 'vue'
import type { BaseValidation } from '@vuelidate/core'
const { t } = useI18n()
import type { BaseValidation } from '@vuelidate/core'
const { t } = useI18n()

Comment thread src/app/pages/event/preview/index.vue Outdated
Comment on lines +206 to +219
import { ref } from 'vue'
import { Share, Heart, MoreHorizontal, Grid, Image } from 'lucide-vue-next'
import {
Carousel,
CarouselContent,
CarouselItem,
} from '@/components/scn/carousel'
import type { EventStorageStrategy } from '~/types/events/EventStorageStrategy'
import { LocalStorageStrategy } from '~/utils/storage/LocalStorageStrategy'
import { useCreateEventMutation } from '~~/gql/documents/mutations/event/eventCreate'
import { useUploadCreateMutation } from '~~/gql/documents/mutations/upload/uploadCreate'
import { EventVisibility } from '~~/gql/generated/graphql'
import Tus from '@uppy/tus'
import Uppy from '@uppy/core'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { ref } from 'vue'
import { Share, Heart, MoreHorizontal, Grid, Image } from 'lucide-vue-next'
import {
Carousel,
CarouselContent,
CarouselItem,
} from '@/components/scn/carousel'
import type { EventStorageStrategy } from '~/types/events/EventStorageStrategy'
import { LocalStorageStrategy } from '~/utils/storage/LocalStorageStrategy'
import { useCreateEventMutation } from '~~/gql/documents/mutations/event/eventCreate'
import { useUploadCreateMutation } from '~~/gql/documents/mutations/upload/uploadCreate'
import { EventVisibility } from '~~/gql/generated/graphql'
import Tus from '@uppy/tus'
import Uppy from '@uppy/core'
import Tus from '@uppy/tus'
import Uppy from '@uppy/core'
import { Share, Heart, MoreHorizontal, Grid, Image } from 'lucide-vue-next'
import type { EventStorageStrategy } from '~/types/events/EventStorageStrategy'
import { useCreateEventMutation } from '~~/gql/documents/mutations/event/eventCreate'
import { useUploadCreateMutation } from '~~/gql/documents/mutations/upload/uploadCreate'
import { EventVisibility } from '~~/gql/generated/graphql'

The storage directory can be exported in src/app/utils/index.ts for the auto-import to become available for LocalStorageStrategy.

Comment thread src/app/composables/useHeaderTitle.ts Outdated
Comment on lines +1 to +2
import { ref, readonly } from 'vue'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { ref, readonly } from 'vue'

@dargmuesli dargmuesli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please replace other usages of space-y-4, space-x-3, ... with flex flex-col gap-4, flex gap-3, ...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be named EventStepsCover.vue to follow the naming convention of all existing components. (This applies to other components added in this PR too.)

<EventFilePreviewGrid
:files="selectedFiles"
:preview-urls="previewUrls"
v-model="selectedCover"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v-model="selectedCover" shows a warning because this property should come first after <EventFilePreviewGrid

@CLAassistant

CLAassistant commented Jun 28, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@dargmuesli dargmuesli linked an issue Jul 30, 2025 that may be closed by this pull request
@dargmuesli dargmuesli removed a link to an issue Aug 7, 2026
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.

feat(event): add "unlisted" visibility

3 participants