From d89ecc45e4efc9a76084d5fde6f18b91dcc51361 Mon Sep 17 00:00:00 2001 From: Julian Weng Date: Tue, 11 Jun 2024 19:28:07 -0400 Subject: [PATCH 01/85] Disable queue for summer (#704) Disable queue for summer break --- .../commands/daily_notifications.py | 2 +- backend/clubs/serializers.py | 5 ++ backend/pennclubs/settings/base.py | 1 + backend/tests/clubs/test_commands.py | 7 +- backend/tests/clubs/test_views.py | 67 ++++++++++++------- .../components/ClubEditPage/ClubEditCard.tsx | 14 ++++ .../components/ClubPage/LiveEventsDialog.tsx | 6 +- frontend/components/FormComponents.tsx | 17 +++-- frontend/utils/branding.tsx | 1 + 9 files changed, 87 insertions(+), 33 deletions(-) diff --git a/backend/clubs/management/commands/daily_notifications.py b/backend/clubs/management/commands/daily_notifications.py index cf60a5e79..40c624571 100644 --- a/backend/clubs/management/commands/daily_notifications.py +++ b/backend/clubs/management/commands/daily_notifications.py @@ -96,7 +96,7 @@ def send_approval_queue_reminder(self): group_name = "Approvers" # only send notifications if it is currently a weekday - if now.isoweekday() not in range(1, 6): + if now.isoweekday() not in range(1, 6) or not settings.QUEUE_OPEN: return False # get users in group to send notification to diff --git a/backend/clubs/serializers.py b/backend/clubs/serializers.py index 8f7a23426..72cea8e1f 100644 --- a/backend/clubs/serializers.py +++ b/backend/clubs/serializers.py @@ -1512,6 +1512,11 @@ def save(self): if request and request.user.has_perm("clubs.approve_club"): needs_reapproval = False + if needs_reapproval and not settings.QUEUE_OPEN: + raise serializers.ValidationError( + "The approval queue is not currently open." + ) + has_approved_version = ( self.instance and self.instance.history.filter(approved=True).exists() ) diff --git a/backend/pennclubs/settings/base.py b/backend/pennclubs/settings/base.py index 26bc09ede..79dc989be 100644 --- a/backend/pennclubs/settings/base.py +++ b/backend/pennclubs/settings/base.py @@ -203,6 +203,7 @@ APPLY_URL = "https://{domain}/club/{club}/apply" OSA_EMAILS = ["vpul-orgs@pobox.upenn.edu"] +QUEUE_OPEN = False # File upload settings diff --git a/backend/tests/clubs/test_commands.py b/backend/tests/clubs/test_commands.py index bdc6df470..8b499b9e7 100644 --- a/backend/tests/clubs/test_commands.py +++ b/backend/tests/clubs/test_commands.py @@ -373,8 +373,11 @@ def test_daily_notifications(self): "django.utils.timezone.now", return_value=now, ): - call_command("daily_notifications", stderr=errors) - + with mock.patch("django.conf.settings.QUEUE_OPEN", False): + call_command("daily_notifications", stderr=errors) + self.assertFalse(any(m.to == [self.user1.email] for m in mail.outbox)) + with mock.patch("django.conf.settings.QUEUE_OPEN", True): + call_command("daily_notifications", stderr=errors) # ensure approval email was sent out self.assertTrue(any(m.to == [self.user1.email] for m in mail.outbox)) diff --git a/backend/tests/clubs/test_views.py b/backend/tests/clubs/test_views.py index 0750c611b..be2b001ab 100644 --- a/backend/tests/clubs/test_views.py +++ b/backend/tests/clubs/test_views.py @@ -1358,16 +1358,22 @@ def test_club_modify(self): """ tag3 = Tag.objects.create(name="College") - self.client.login(username=self.user5.username, password="test") - resp = self.client.patch( - reverse("clubs-detail", args=(self.club1.code,)), - { - "description": "We do stuff.", - "tags": [{"name": tag3.name}, {"name": "Graduate"}], - }, - content_type="application/json", + Membership.objects.create( + person=self.user1, club=self.club1, role=Membership.ROLE_OWNER ) - self.assertIn(resp.status_code, [200, 201], resp.content) + + self.client.login(username=self.user1.username, password="test") + + with patch("django.conf.settings.QUEUE_OPEN", True): + resp = self.client.patch( + reverse("clubs-detail", args=(self.club1.code,)), + { + "description": "We do stuff.", + "tags": [{"name": tag3.name}, {"name": "Graduate"}], + }, + content_type="application/json", + ) + self.assertIn(resp.status_code, [200, 201], resp.content) # ensure that changes were made resp = self.client.get(reverse("clubs-detail", args=(self.club1.code,))) @@ -1979,22 +1985,37 @@ def test_club_sensitive_field_renew(self): # login to officer user self.client.login(username=self.user4.username, password="test") - for field in {"name", "description"}: - # edit sensitive field - resp = self.client.patch( - reverse("clubs-detail", args=(club.code,)), - {field: "New Club Name/Description"}, - content_type="application/json", - ) - self.assertIn(resp.status_code, [200, 201], resp.content) + with patch("django.conf.settings.QUEUE_OPEN", False): + for field in {"name", "description"}: + # edit sensitive field + resp = self.client.patch( + reverse("clubs-detail", args=(club.code,)), + {field: "New Club Name/Description"}, + content_type="application/json", + ) + self.assertIn(resp.status_code, [400], resp.content) + + # ensure club is marked as approved (request didn't go through) + club.refresh_from_db() + self.assertTrue(club.approved) + + with patch("django.conf.settings.QUEUE_OPEN", True): + for field in {"name", "description"}: + # edit sensitive field + resp = self.client.patch( + reverse("clubs-detail", args=(club.code,)), + {field: "New Club Name/Description"}, + content_type="application/json", + ) + self.assertIn(resp.status_code, [200, 201], resp.content) - # ensure club is marked as not approved - club.refresh_from_db() - self.assertFalse(club.approved) + # ensure club is marked as not approved + club.refresh_from_db() + self.assertFalse(club.approved) - # reset to approved - club.approved = True - club.save(update_fields=["approved"]) + # reset to approved + club.approved = True + club.save(update_fields=["approved"]) # login to superuser account self.client.login(username=self.user5.username, password="test") diff --git a/frontend/components/ClubEditPage/ClubEditCard.tsx b/frontend/components/ClubEditPage/ClubEditCard.tsx index 3b1061226..846671c0a 100644 --- a/frontend/components/ClubEditPage/ClubEditCard.tsx +++ b/frontend/components/ClubEditPage/ClubEditCard.tsx @@ -34,10 +34,12 @@ import { OBJECT_NAME_SINGULAR, OBJECT_NAME_TITLE_SINGULAR, OBJECT_TAB_ADMISSION_LABEL, + QUEUE_ENABLED, SHOW_RANK_ALGORITHM, SITE_ID, SITE_NAME, } from '../../utils/branding' +import { LiveBanner, LiveSub, LiveTitle } from '../ClubPage/LiveEventsDialog' import { Checkbox, CheckboxLabel, Contact, Text } from '../common' import { CheckboxField, @@ -400,6 +402,7 @@ export default function ClubEditCard({ type: 'text', required: true, label: `${OBJECT_NAME_TITLE_SINGULAR} Name`, + disabled: !QUEUE_ENABLED, help: isEdit ? ( <> If you would like to change your {OBJECT_NAME_SINGULAR} URL in @@ -446,6 +449,7 @@ export default function ClubEditCard({ help: `Changing this field will require reapproval from the ${APPROVAL_AUTHORITY}.`, placeholder: `Type your ${OBJECT_NAME_SINGULAR} description here!`, type: 'html', + hidden: !QUEUE_ENABLED, }, { name: 'tags', @@ -461,6 +465,7 @@ export default function ClubEditCard({ accept: 'image/*', type: 'image', label: `${OBJECT_NAME_TITLE_SINGULAR} Logo`, + disabled: !QUEUE_ENABLED, }, { name: 'size', @@ -814,6 +819,15 @@ export default function ClubEditCard({ {({ dirty, isSubmitting }) => (
+ {!QUEUE_ENABLED && ( + + Queue Closed for Summer Break + + No new edits to club name, image, or description will be + submitted for review to OSA. + + + )} {fields.map(({ name, description, fields, hidden }, i) => { if (hidden) { diff --git a/frontend/components/ClubPage/LiveEventsDialog.tsx b/frontend/components/ClubPage/LiveEventsDialog.tsx index f43eab824..431a70f98 100644 --- a/frontend/components/ClubPage/LiveEventsDialog.tsx +++ b/frontend/components/ClubPage/LiveEventsDialog.tsx @@ -13,7 +13,7 @@ import { ClubEventType, MembershipRank } from '../../types' import { doApiRequest, useSetting } from '../../utils' import { FAIR_NAME, MEMBERSHIP_ROLE_NAMES } from '../../utils/branding' -const LiveBanner = styled.div` +export const LiveBanner = styled.div` padding: 20px; border-radius: 5px; background-image: radial-gradient( @@ -37,13 +37,13 @@ const LiveBanner = styled.div` margin-bottom: 10px; ` -const LiveTitle = styled.div` +export const LiveTitle = styled.div` font-size: ${M4}; font-weight: bold; color: white; ` -const LiveSub = styled.div` +export const LiveSub = styled.div` margin-top: -3px; margin-bottom: 3px; font-size: ${M2}; diff --git a/frontend/components/FormComponents.tsx b/frontend/components/FormComponents.tsx index c606c7e65..73a1c6178 100644 --- a/frontend/components/FormComponents.tsx +++ b/frontend/components/FormComponents.tsx @@ -643,6 +643,7 @@ export const FileField = useFieldWrapper( value, isImage = false, canDelete = false, + disabled = false, }: BasicFormField & AnyHack): ReactElement => { const { setFieldValue } = useFormikContext() @@ -681,7 +682,12 @@ export const FileField = useFieldWrapper( ))}
-
))} Already a member? From 6c0dc7d40b860500f927723cb1614bb41cb3a790 Mon Sep 17 00:00:00 2001 From: Julian Weng Date: Thu, 5 Sep 2024 13:27:03 -0400 Subject: [PATCH 23/85] Bmup artifact actions --- .github/workflows/build-and-deploy.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-deploy.yaml b/.github/workflows/build-and-deploy.yaml index 278214958..4e03f9add 100644 --- a/.github/workflows/build-and-deploy.yaml +++ b/.github/workflows/build-and-deploy.yaml @@ -47,7 +47,7 @@ jobs: cache-to: type=local,dest=/tmp/.buildx-cache tags: pennlabs/penn-clubs-backend:latest,pennlabs/penn-clubs-backend:${{ github.sha }} outputs: type=docker,dest=/tmp/image.tar - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: build-backend path: /tmp/image.tar @@ -75,7 +75,7 @@ jobs: cache-to: type=local,dest=/tmp/.buildx-cache tags: pennlabs/penn-clubs-frontend:latest,pennlabs/penn-clubs-frontend:${{ github.sha }} outputs: type=docker,dest=/tmp/image.tar - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: build-frontend path: /tmp/image.tar @@ -87,8 +87,8 @@ jobs: if: github.ref == 'refs/heads/master' steps: - uses: actions/checkout@v2 - - uses: actions/download-artifact@v2 - - uses: geekyeggo/delete-artifact@v1 + - uses: actions/download-artifact@v4 + - uses: geekyeggo/delete-artifact@v5 with: name: |- build-backend From 8cd7b84ce1ad93ad409348f970167f48f58c92a4 Mon Sep 17 00:00:00 2001 From: Julian Weng Date: Thu, 5 Sep 2024 18:36:54 -0400 Subject: [PATCH 24/85] Patch officers not being able to see club application preview --- .../pages/club/[club]/application/[application]/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/pages/club/[club]/application/[application]/index.tsx b/frontend/pages/club/[club]/application/[application]/index.tsx index 5d9c797a8..40f520f3e 100644 --- a/frontend/pages/club/[club]/application/[application]/index.tsx +++ b/frontend/pages/club/[club]/application/[application]/index.tsx @@ -112,7 +112,9 @@ const ApplicationPage = ({ questions, initialValues, }: ApplicationPageProps): ReactElement => { - if (new Date() < new Date(application.application_start_time)) { + // Second condition will be replaced with perms check or question nullity check once backend is updated + // eslint-disable-next-line no-constant-condition + if (new Date() < new Date(application.application_start_time) && false) { return ( Application Not Open From b32d3d7708398bb40241a405a4a48b6ae04ced5e Mon Sep 17 00:00:00 2001 From: Julian Weng Date: Fri, 6 Sep 2024 12:41:27 -0400 Subject: [PATCH 25/85] Temporarily fix apply button logic --- frontend/components/ClubPage/Actions.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/components/ClubPage/Actions.tsx b/frontend/components/ClubPage/Actions.tsx index a0ee5afeb..c9a4d0d36 100644 --- a/frontend/components/ClubPage/Actions.tsx +++ b/frontend/components/ClubPage/Actions.tsx @@ -294,7 +294,7 @@ const Actions = ({ updateRequests={updateRequests} /> )} - {SHOW_APPLICATIONS && !isMembershipOpen && club.accepting_members && ( + {SHOW_APPLICATIONS && !isMembershipOpen && !inClub && ( Date: Sun, 8 Sep 2024 12:35:43 -0400 Subject: [PATCH 26/85] make apply button visible to unauthed users and enforce auth for applications (#719) --- frontend/components/ClubPage/Actions.tsx | 9 ++----- .../application/[application]/index.tsx | 8 +++++- frontend/pages/club/[club]/index.tsx | 25 ++++++++----------- 3 files changed, 19 insertions(+), 23 deletions(-) diff --git a/frontend/components/ClubPage/Actions.tsx b/frontend/components/ClubPage/Actions.tsx index c9a4d0d36..8d0073f48 100644 --- a/frontend/components/ClubPage/Actions.tsx +++ b/frontend/components/ClubPage/Actions.tsx @@ -12,12 +12,7 @@ import { mediaMaxWidth, mediaMinWidth, SM } from '~/constants' import { BORDER, MEDIUM_GRAY, WHITE } from '../../constants/colors' import { CLUB_APPLY_ROUTE, CLUB_EDIT_ROUTE } from '../../constants/routes' -import { - Club, - ClubApplicationRequired, - QuestionAnswer, - UserInfo, -} from '../../types' +import { Club, ClubApplicationRequired, QuestionAnswer } from '../../types' import { apiCheckPermission, apiSetLikeStatus, doApiRequest } from '../../utils' import { FIELD_PARTICIPATION_LABEL, @@ -85,7 +80,7 @@ const ActionButton = styled.a` type ActionsProps = { club: Club - userInfo: UserInfo + authenticated: boolean style?: CSSProperties className?: string updateRequests: (code: string) => Promise diff --git a/frontend/pages/club/[club]/application/[application]/index.tsx b/frontend/pages/club/[club]/application/[application]/index.tsx index 40f520f3e..69e8bd1ee 100644 --- a/frontend/pages/club/[club]/application/[application]/index.tsx +++ b/frontend/pages/club/[club]/application/[application]/index.tsx @@ -17,6 +17,7 @@ import { } from 'types' import { doApiRequest } from 'utils' +import AuthPrompt from '~/components/common/AuthPrompt' import { SelectField, TextField } from '~/components/FormComponents' type ApplicationPageProps = { @@ -107,11 +108,16 @@ export function formatQuestionType( } const ApplicationPage = ({ + userInfo, club, application, questions, initialValues, -}: ApplicationPageProps): ReactElement => { +}): ReactElement => { + if (!userInfo) { + return + } + // Second condition will be replaced with perms check or question nullity check once backend is updated // eslint-disable-next-line no-constant-condition if (new Date() < new Date(application.application_start_time) && false) { diff --git a/frontend/pages/club/[club]/index.tsx b/frontend/pages/club/[club]/index.tsx index a12a0ff31..6b8aa7e33 100644 --- a/frontend/pages/club/[club]/index.tsx +++ b/frontend/pages/club/[club]/index.tsx @@ -225,14 +225,11 @@ const ClubPage = ({ pending approval from the {APPROVAL_AUTHORITY}. )} - - {userInfo != null && ( - - )} + @@ -278,13 +275,11 @@ const ClubPage = ({ )}
- {userInfo && ( - - )} + {questions.length > 0 ? `Click here to see the ${questions.length} question${ From 3d31cdaead538bcea45a672f66785d6bf077e1f4 Mon Sep 17 00:00:00 2001 From: Rohan Moniz <60864468+rm03@users.noreply.github.com> Date: Sun, 8 Sep 2024 13:41:24 -0400 Subject: [PATCH 27/85] fix N+1 in club serializer --- backend/clubs/serializers.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/backend/clubs/serializers.py b/backend/clubs/serializers.py index 8888c2cd5..492ca171d 100644 --- a/backend/clubs/serializers.py +++ b/backend/clubs/serializers.py @@ -1263,19 +1263,21 @@ def get_is_request(self, obj): return obj.membershiprequest_set.filter(person=user, withdrew=False).exists() def get_target_years(self, obj): - qset = TargetYear.objects.filter(club=obj) + qset = TargetYear.objects.filter(club=obj).select_related("target_years") return [TargetYearSerializer(m).data for m in qset] def get_target_majors(self, obj): - qset = TargetMajor.objects.filter(club=obj) + qset = TargetMajor.objects.filter(club=obj).select_related("target_majors") return [TargetMajorSerializer(m).data for m in qset] def get_target_schools(self, obj): - qset = TargetSchool.objects.filter(club=obj) + qset = TargetSchool.objects.filter(club=obj).select_related("target_schools") return [TargetSchoolSerializer(m).data for m in qset] def get_target_student_types(self, obj): - qset = TargetStudentType.objects.filter(club=obj) + qset = TargetStudentType.objects.filter(club=obj).select_related( + "target_student_types" + ) return [TargetStudentTypeSerializer(m).data for m in qset] def create(self, validated_data): From cfe0eb8768920a765b7f22fdb8bfb15bd7fa4a66 Mon Sep 17 00:00:00 2001 From: owlester12 <64493239+owlester12@users.noreply.github.com> Date: Sun, 8 Sep 2024 13:47:55 -0400 Subject: [PATCH 28/85] Owen/add events carousel (#717) * add carousel * Old react-multi-carousel * fixed npm yarn * remvoed packagelock.json * fixing issues * change height * minor changes * deleted a comment * merging? * delete one onClick * change breakpoint * changes * use swiper * remove react-multi-carousel * Delete Pipfile * centering * CenteredSlideBounds: * quick fixes * Delete yarn.lock --- .../components/ClubPage/EventCarousel.tsx | 102 ++++++++++++++++++ frontend/components/ClubPage/Events.tsx | 10 +- frontend/package.json | 3 +- frontend/pages/club/[club]/index.tsx | 6 +- frontend/yarn.lock | 5 + 5 files changed, 114 insertions(+), 12 deletions(-) create mode 100644 frontend/components/ClubPage/EventCarousel.tsx diff --git a/frontend/components/ClubPage/EventCarousel.tsx b/frontend/components/ClubPage/EventCarousel.tsx new file mode 100644 index 000000000..fec2b6e59 --- /dev/null +++ b/frontend/components/ClubPage/EventCarousel.tsx @@ -0,0 +1,102 @@ +import 'swiper/css' +import 'swiper/css/navigation' +import 'swiper/css/pagination' + +import React, { useState } from 'react' +import styled from 'styled-components' +import { Navigation, Pagination } from 'swiper/modules' +import { Swiper, SwiperSlide } from 'swiper/react' + +import { ClubEvent } from '../../types' +import { Icon, StrongText } from '../common' +import Modal from '../common/Modal' +import EventCard from '../EventPage/EventCard' +import EventModal from '../EventPage/EventModal' + +const Arrow = styled.div` + z-index: 100; + opacity: 0.6; + transition-duration: 300ms; + cursor: pointer; + padding: 12px; + position: absolute; + top: 50%; + + &:hover { + opacity: 1; + } +` + +const CarouselWrapper = styled.div` + padding: 10px 35px; +` + +type EventsProps = { + data: ClubEvent[] +} + +const EventCarousel = ({ data }: EventsProps) => { + const [show, setShow] = useState(false) + const [modalData, setModalData] = useState() + + const showModal = (entry: ClubEvent) => { + setModalData(entry) + setShow(true) + } + const hideModal = () => setShow(false) + + return ( +
+
+ Events + Click on an event to get more details. +
+ + + + {data.map((entry, index) => ( + showModal(entry)} + > + + + ))} + + + + + + + + + {show && ( + + {modalData && ( + + )} + + )} +
+ ) +} + +export default EventCarousel diff --git a/frontend/components/ClubPage/Events.tsx b/frontend/components/ClubPage/Events.tsx index 1c5422c18..daff4c790 100644 --- a/frontend/components/ClubPage/Events.tsx +++ b/frontend/components/ClubPage/Events.tsx @@ -6,8 +6,6 @@ import { DARK_BLUE, HOVER_GRAY, PURPLE, WHITE } from '../../constants/colors' import { M2, M3 } from '../../constants/measurements' import { ClubEvent, ClubEventType } from '../../types' import { Card, Icon, StrongText } from '../common' -import Modal from '../common/Modal' -import EventModal from '../EventPage/EventModal' type EventsProps = { data: ClubEvent[] @@ -31,7 +29,8 @@ const Wrapper = styled.div` margin-bottom: 0.5rem; display: flex; cursor: pointer; - border-radius: 3px; + border-radius: 8px; + padding: 2px; &:hover { background-color: ${HOVER_GRAY}; @@ -70,11 +69,6 @@ const Event = ({ entry }: { entry: ClubEvent }): ReactElement => {
- {show && ( - - - - )} ) } diff --git a/frontend/package.json b/frontend/package.json index 19a0e20f1..ba3c2b2f6 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -58,6 +58,7 @@ "react-vis": "^1.12.1", "showdown": "^2.1.0", "styled-components": "^6.1.8", + "swiper": "^11.1.12", "use-places-autocomplete": "^4.0.1", "yarn": "^1.22.21" }, @@ -117,4 +118,4 @@ "engines": { "node": "^20.0.0" } -} \ No newline at end of file +} diff --git a/frontend/pages/club/[club]/index.tsx b/frontend/pages/club/[club]/index.tsx index 6b8aa7e33..6a16421f6 100644 --- a/frontend/pages/club/[club]/index.tsx +++ b/frontend/pages/club/[club]/index.tsx @@ -3,7 +3,6 @@ import { DesktopActions, MobileActions } from 'components/ClubPage/Actions' import AdvisorList from 'components/ClubPage/AdvisorList' import ClubApprovalDialog from 'components/ClubPage/ClubApprovalDialog' import Description from 'components/ClubPage/Description' -import Events from 'components/ClubPage/Events' import FilesList from 'components/ClubPage/FilesList' import Header from 'components/ClubPage/Header' import InfoBox from 'components/ClubPage/InfoBox' @@ -43,6 +42,7 @@ import { SITE_NAME, } from 'utils/branding' +import EventCarousel from '~/components/ClubPage/EventCarousel' import { CLUB_ALUMNI_ROUTE, CLUB_ORG_ROUTE } from '~/constants' import { CLUBS_RED, SNOW, WHITE } from '~/constants/colors' import { M0, M2, M3 } from '~/constants/measurements' @@ -194,7 +194,7 @@ const ClubPage = ({ ))}
-
+
{isActive || ( )} + {events.length > 0 && }
)} - {isClubFieldShown('signature_events') && signatureEvents && !!signatureEvents.length && ( diff --git a/frontend/yarn.lock b/frontend/yarn.lock index cad33ed5d..746ff2093 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -10090,6 +10090,11 @@ svgo@^3.0.2: csso "^5.0.5" picocolors "^1.0.0" +swiper@^11.1.12: + version "11.1.12" + resolved "https://registry.yarnpkg.com/swiper/-/swiper-11.1.12.tgz#563b90dd0162925025878c2ec4e136cc46bcb4f4" + integrity sha512-PUkCToYAZMB4kP7z+YfPnkMHOMwMO71g8vUhz2o5INGIgIMb6Sb0XiP6cEJFsiFTd7FRDn5XCbg+KVKPDZqXLw== + synchronous-promise@^2.0.15: version "2.0.17" resolved "https://registry.yarnpkg.com/synchronous-promise/-/synchronous-promise-2.0.17.tgz#38901319632f946c982152586f2caf8ddc25c032" From 1a5454f608042b331b52fd1b58c0bd157b99fbcf Mon Sep 17 00:00:00 2001 From: Rohan Moniz <60864468+rm03@users.noreply.github.com> Date: Sun, 8 Sep 2024 15:08:05 -0400 Subject: [PATCH 29/85] sample 5% of transactions --- backend/pennclubs/settings/production.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/pennclubs/settings/production.py b/backend/pennclubs/settings/production.py index f8d20a44b..dff70db2e 100644 --- a/backend/pennclubs/settings/production.py +++ b/backend/pennclubs/settings/production.py @@ -26,7 +26,7 @@ integrations=[DjangoIntegration(cache_spans=True)], send_default_pii=False, enable_tracing=True, - traces_sample_rate=0.1, + traces_sample_rate=0.05, profiles_sample_rate=1.0, ) From c62603f35c85018bdd89bb2863c23245c47d2406 Mon Sep 17 00:00:00 2001 From: Christopher Liu <44535292+Clue88@users.noreply.github.com> Date: Mon, 9 Sep 2024 23:57:41 -0400 Subject: [PATCH 30/85] Show newest application cycle first in edit club view (#721) --- frontend/components/ClubEditPage/ApplicationsPage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/components/ClubEditPage/ApplicationsPage.tsx b/frontend/components/ClubEditPage/ApplicationsPage.tsx index fae8f65bf..99d353ebc 100644 --- a/frontend/components/ClubEditPage/ApplicationsPage.tsx +++ b/frontend/components/ClubEditPage/ApplicationsPage.tsx @@ -418,8 +418,8 @@ export default function ApplicationsPage({ if (applications.length !== 0) { setApplications(applications) setCurrentApplication({ - ...applications[0], - name: format_app_name(applications[0]), + ...applications[applications.length - 1], + name: format_app_name(applications[applications.length - 1]), }) } }) @@ -532,7 +532,7 @@ export default function ApplicationsPage({ CSV.