Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
⚡️ Drop dayjs and the smooth scroll polyfill from the invite page (#3465)
Luke Vellaca9bc0b44d5a
diff --git a/apps/web/package.json b/apps/web/package.jsonindex 6ba27aaf5..b1e225609 100644--- a/apps/web/package.json+++ b/apps/web/package.json@@ -95,7 +95,6 @@"react-i18next": "^17.0.8","react-image-crop": "^11.0.10","react-use": "^17.6.0",- "smoothscroll-polyfill": "^0.4.4","superjson": "^2.0.0","tailwindcss": "^4.1.18","tldts": "^6.1.86",@@ -119,7 +118,6 @@"@types/node": "^24.1.0","@types/react": "19.2.13","@types/react-dom": "19.2.3",- "@types/smoothscroll-polyfill": "^0.3.1","@types/zxcvbn": "^4.4.5","@vitejs/plugin-react": "^5.0.0","cheerio": "^1.0.0-rc.12",diff --git a/apps/web/src/features/poll/components/forms/poll-options-form/month-calendar/month-calendar.tsx b/apps/web/src/features/poll/components/forms/poll-options-form/month-calendar/month-calendar.tsxindex 05d1aea72..c2bf474a1 100644--- a/apps/web/src/features/poll/components/forms/poll-options-form/month-calendar/month-calendar.tsx+++ b/apps/web/src/features/poll/components/forms/poll-options-form/month-calendar/month-calendar.tsx@@ -37,10 +37,13 @@ import { dayjs } from "@/lib/dayjs";import {expectTimeOption,getBrowserTimeZone,- removeAllOptionsForDay,} from "@/lib/utils/date-time-utils";import type { DateTimeOption, DateTimePickerProps } from "../types";-import { formatDateWithoutTime, formatDateWithoutTz } from "../utils";+import {+ formatDateWithoutTime,+ formatDateWithoutTz,+ removeAllOptionsForDay,+} from "../utils";import TimePicker from "./time-picker";const MonthCalendar: React.FunctionComponent<DateTimePickerProps> = ({diff --git a/apps/web/src/features/poll/components/forms/poll-options-form/utils.ts b/apps/web/src/features/poll/components/forms/poll-options-form/utils.tsindex 0c08c5f55..ec8789cba 100644--- a/apps/web/src/features/poll/components/forms/poll-options-form/utils.ts+++ b/apps/web/src/features/poll/components/forms/poll-options-form/utils.ts@@ -1,4 +1,5 @@import { dayjs } from "@/lib/dayjs";+import type { DateTimeOption } from "./types";export const formatDateWithoutTz = (date: Date): string => {return dayjs(date).format("YYYY-MM-DDTHH:mm:ss");@@ -7,3 +8,15 @@ export const formatDateWithoutTz = (date: Date): string => {export const formatDateWithoutTime = (date: Date): string => {return dayjs(date).format("YYYY-MM-DD");};++export const removeAllOptionsForDay = (+ options: DateTimeOption[],+ date: Date,+) => {+ return options.filter((option) => {+ return !dayjs(date).isSame(+ option.type === "date" ? option.date : option.start,+ "day",+ );+ });+};diff --git a/apps/web/src/features/poll/components/mobile-poll.tsx b/apps/web/src/features/poll/components/mobile-poll.tsxindex f61285551..84d459ad6 100644--- a/apps/web/src/features/poll/components/mobile-poll.tsx+++ b/apps/web/src/features/poll/components/mobile-poll.tsx@@ -13,7 +13,6 @@ import { MoreHorizontalIcon, PlusIcon, UsersIcon } from "lucide-react";import { AnimatePresence } from "motion/react";import * as m from "motion/react-m";import * as React from "react";-import smoothscroll from "smoothscroll-polyfill";import { TimesShownIn } from "@/components/clock";import { OptimizedAvatarImage } from "@/components/optimized-avatar-image";@@ -33,10 +32,6 @@ import { useUser } from "@/features/user/client";import { Trans, useTranslation } from "@/i18n/client";import GroupedOptions from "./mobile-poll/grouped-options";-if (typeof window !== "undefined") {- smoothscroll.polyfill();-}-const MobilePoll: React.FunctionComponent = () => {const pollContext = usePoll();diff --git a/apps/web/src/lib/utils/date-time-utils.ts b/apps/web/src/lib/utils/date-time-utils.tsindex fba4307ef..18d090228 100644--- a/apps/web/src/lib/utils/date-time-utils.ts+++ b/apps/web/src/lib/utils/date-time-utils.ts@@ -2,7 +2,6 @@ import type {DateTimeOption,TimeOption,} from "@/features/poll/components/forms/poll-options-form/types";-import { dayjs } from "@/lib/dayjs";export function getBrowserTimeZone() {return Intl.DateTimeFormat().resolvedOptions().timeZone;@@ -44,18 +43,6 @@ export const getOptionDateTimeLabel = (option: ParsedDateTimeOpton) => {: date;};-export const removeAllOptionsForDay = (- options: DateTimeOption[],- date: Date,-) => {- return options.filter((option) => {- return !dayjs(date).isSame(- option.type === "date" ? option.date : option.start,- "day",- );- });-};-export const expectTimeOption = (d: DateTimeOption): TimeOption => {if (d.type === "date") {throw new Error("Expected timeSlot but got date instead");diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 19a8b6b0a..012ba877c 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -420,9 +420,6 @@ importers:react-use:specifier: ^17.6.0- smoothscroll-polyfill:- specifier: ^0.4.4- version: 0.4.4superjson:specifier: ^2.0.0version: 2.2.6@@ -487,9 +484,6 @@ importers:'@types/react-dom':specifier: 19.2.3version: 19.2.3(@types/[email protected])- '@types/smoothscroll-polyfill':- specifier: ^0.3.1- version: 0.3.4'@types/zxcvbn':specifier: ^4.4.5version: 4.4.5@@ -6819,9 +6813,6 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-tRs1dB+g8Itk72rlSI2ZrW6vZg0YrLI81iQSTkMmOqnqCaNr/8Ek4VwWcN5vZgCYWbg/JJSGBlUaYGAOP73qBw==}- '@types/[email protected]':- resolution: {integrity: sha512-w1krF+TJh7Azz/2/bEN1tmyKoNt3B6bLCn6SfJErzhKAr1w1b06ePx79NXA+3lTw+DbqXN12nk/Ce1UQDVY8yA==}-'@types/[email protected]':resolution: {integrity: sha512-KHPsfX/FoVbUGbyYvk1q9MMQHLPeRZhRJZdO45Q4YjvFkv4hMNghCWTvy7rdKessBsmtz4euWCWAB6/tVpI1Iw==}@@ -7155,9 +7146,6 @@ packages:resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==}- resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==}-resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==}@@ -8538,9 +8526,6 @@ packages:resolution: {integrity: sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==}- resolution: {integrity: sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==}-resolution: {integrity: sha512-7Ical1vFEMr0onbVzEDIreM22I4khW+fzyQPwvAFWBp1iwdshSZRsL4jjRvPG9JP1uiqMHRto+YU6R2/CzDz5Q==}@@ -11669,9 +11654,6 @@ packages:resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==}engines: {node: '>= 6.0.0', npm: '>= 3.0.0'}- resolution: {integrity: sha512-TK5ZA9U5RqCwMpfoMq/l1mrH0JAR7y7KRvOBx0n2869aLxch+gT9GhN3yUfjiw+d/DiF1mKo14+hd62JyMmoBg==}-resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==}@@ -16767,7 +16749,7 @@ snapshots:'@prisma/[email protected]':dependencies:- ajv: 8.17.1+ ajv: 8.20.0better-result: 2.9.2env-paths: 3.0.0proper-lockfile: 4.1.2@@ -19939,8 +19921,6 @@ snapshots:'@types/node': 24.10.11'@types/send': 0.17.6- '@types/[email protected]': {}-'@types/[email protected]':dependencies:'@types/node': 24.10.11@@ -20322,13 +20302,6 @@ snapshots:json-schema-traverse: 0.4.1uri-js: 4.4.1- dependencies:- fast-deep-equal: 3.1.3- fast-uri: 3.1.0- json-schema-traverse: 1.0.0- require-from-string: 2.0.2-dependencies:fast-deep-equal: 3.1.3@@ -21815,19 +21788,19 @@ snapshots:etag: 1.8.1finalhandler: 2.1.1fresh: 2.0.0- http-errors: 2.0.0+ http-errors: 2.0.1merge-descriptors: 2.0.0mime-types: 3.0.2on-finished: 2.4.1once: 1.4.0parseurl: 1.3.3proxy-addr: 2.0.7- qs: 6.14.1+ qs: 6.16.0range-parser: 1.2.1router: 2.2.0send: 1.2.1serve-static: 2.2.1- statuses: 2.0.1+ statuses: 2.0.2type-is: 2.1.0vary: 1.1.2transitivePeerDependencies:@@ -21891,8 +21864,6 @@ snapshots:dependencies:fast-string-truncated-width: 3.0.3- [email protected]: {}-@@ -21979,7 +21950,7 @@ snapshots:escape-html: 1.0.3on-finished: 2.4.1parseurl: 1.3.3- statuses: 2.0.1+ statuses: 2.0.2transitivePeerDependencies:- supports-coloroptional: true@@ -26193,8 +26164,6 @@ snapshots:- [email protected]: {}-dependencies:dot-case: 3.0.4