Skip to content

Conversation

@huzaifaedhi22
Copy link
Contributor

@huzaifaedhi22 huzaifaedhi22 commented Feb 2, 2025

📚 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
Copy link
Member

@dargmuesli dargmuesli left a comment

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

@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
@@ -1,4 +1,4 @@
import { type FragmentType, graphql, useFragment } from '~~/gql/generated'
import { type FragmentType, graphql, useFragment } from '~~/gql/generated/gql'
Copy link
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
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
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.

@@ -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
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"/>

"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
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?

@@ -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
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
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
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
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
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
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
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
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 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
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 on lines 1 to 2
import { ref, readonly } from 'vue'

Copy link
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'

Copy link
Member

@dargmuesli dargmuesli left a comment

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
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
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
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@dargmuesli dargmuesli linked an issue Jul 30, 2025 that may be closed by this pull request
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 type feat(event): add "unlisted" visibility

3 participants