From ba4d3443123886e380d78ecfa91ba85ec6fd4294 Mon Sep 17 00:00:00 2001
From: Peter Harrison <16875803+palisadoes@users.noreply.github.com>
Date: Fri, 10 Jan 2025 08:32:24 -0800
Subject: [PATCH] Merge from develop (#3243)
* 20250110082558 Deleted all files in the main branch in anticipation of merging develop into main cleanly
* 20250110082559 Merge develop into main
---
.dockerignore | 25 +
.eslintignore | 8 +-
.eslintrc.json | 26 +-
.github/pull_request_template.md | 21 +-
.github/workflows/check-tsdoc.js | 1 +
.github/workflows/codeql-codescan.yml | 6 +-
.github/workflows/eslint_disable_check.py | 122 -
.github/workflows/issue.yml | 2 +-
.github/workflows/merge-conflict-check.yml | 65 +
.github/workflows/pull-request-target.yml | 7 +-
.github/workflows/pull-request.yml | 258 +-
.github/workflows/push-deploy-website.yml | 57 +
.github/workflows/push.yml | 6 +-
.github/workflows/scripts/app_health_check.sh | 75 +
.../scripts/code_coverage_disable_check.py | 167 +
.../{ => scripts}/compare_translations.py | 0
.github/workflows/{ => scripts}/countline.py | 0
.../workflows/scripts/eslint_disable_check.py | 155 +
.../talawa_admin_md_mdx_format_adjuster.py | 0
.../workflows/scripts/validate-coderabbit.sh | 38 +
.github/workflows/stale.yml | 9 +-
.husky/pre-commit | 2 -
.nojekyll | 0
3141 | 0
CODEOWNERS | 2 +-
Dockerfile | 15 +
INSTALLATION.md | 89 +-
README.md | 2 +-
config/vite.config.ts | 5 +-
docs/.gitignore | 22 +
docs/CNAME | 1 +
docs/README.md | 176 +
docs/docs/intro.md | 47 +
docs/docs/tutorial-basics/_category_.json | 8 +
docs/docs/tutorial-basics/congratulations.md | 23 +
.../tutorial-basics/create-a-blog-post.md | 34 +
.../docs/tutorial-basics/create-a-document.md | 57 +
docs/docs/tutorial-basics/create-a-page.md | 43 +
docs/docs/tutorial-basics/deploy-your-site.md | 31 +
.../tutorial-basics/markdown-features.mdx | 152 +
docs/docs/tutorial-extras/_category_.json | 7 +
.../img/docsVersionDropdown.png | Bin 0 -> 25427 bytes
.../tutorial-extras/img/localeDropdown.png | Bin 0 -> 27841 bytes
.../tutorial-extras/manage-docs-versions.md | 55 +
.../tutorial-extras/translate-your-site.md | 88 +
docs/docusaurus.config.ts | 176 +
docs/package.json | 48 +
docs/sidebars.ts | 33 +
.../src/components/HomepageFeatures/index.tsx | 70 +
.../HomepageFeatures/styles.module.css | 11 +
docs/src/css/custom.css | 425 +
docs/src/pages/index.module.css | 23 +
docs/src/pages/index.tsx | 37 +
docs/src/pages/markdown-page.md | 7 +
docs/static/.nojekyll | 0
docs/static/CNAME | 1 +
docs/static/img/docusaurus-social-card.jpg | Bin 0 -> 55746 bytes
docs/static/img/docusaurus.png | Bin 0 -> 5142 bytes
docs/static/img/favicon.ico | Bin 0 -> 3626 bytes
docs/static/img/icons/facebook.svg | 3 +
docs/static/img/icons/favicon_palisadoes.ico | Bin 0 -> 870 bytes
docs/static/img/icons/github-dark.svg | 1 +
docs/static/img/icons/github.svg | 1 +
docs/static/img/icons/instagram.svg | 3 +
docs/static/img/icons/opportunities.svg | 6 +
docs/static/img/icons/slack.svg | 3 +
docs/static/img/icons/source.svg | 4 +
docs/static/img/icons/team.svg | 3 +
docs/static/img/icons/twitter.svg | 1 +
docs/static/img/icons/youtube-white.svg | 3 +
docs/static/img/icons/youtube.svg | 1 +
docs/static/img/logo.svg | 1 +
docs/static/img/markdown/misc/logo.png | Bin 0 -> 14141 bytes
.../static/img/undraw_docusaurus_mountain.svg | 171 +
docs/static/img/undraw_docusaurus_react.svg | 170 +
docs/static/img/undraw_docusaurus_tree.svg | 40 +
jest.config.js | 27 +-
package-lock.json | 7674 ++++++++++++-----
package.json | 50 +-
public/images/svg/options-outline.svg | 11 +
public/images/svg/organization.svg | 16 +
public/locales/en/errors.json | 7 +-
public/locales/en/translation.json | 34 +-
public/locales/fr/errors.json | 7 +-
public/locales/fr/translation.json | 36 +-
public/locales/hi/errors.json | 7 +-
public/locales/hi/translation.json | 36 +-
public/locales/sp/errors.json | 7 +-
public/locales/sp/translation.json | 37 +-
public/locales/zh/errors.json | 7 +-
public/locales/zh/translation.json | 36 +-
setup.ts | 203 +-
src/{App.test.tsx => App.spec.tsx} | 37 +-
src/App.tsx | 28 +-
.../Mutations/ActionItemCategoryMutations.ts | 2 +-
.../Mutations/OrganizationMutations.ts | 51 +-
src/GraphQl/Mutations/mutations.ts | 2 +
src/GraphQl/Queries/AgendaCategoryQueries.ts | 10 +-
src/GraphQl/Queries/PlugInQueries.ts | 126 +-
src/GraphQl/Queries/Queries.ts | 10 +
src/assets/css/app.css | 44 +
.../AddOn/{AddOn.test.tsx => AddOn.spec.tsx} | 30 +-
.../core/AddOnEntry/AddOnEntry.module.css | 20 -
...ddOnEntry.test.tsx => AddOnEntry.spec.tsx} | 53 +-
.../AddOn/core/AddOnEntry/AddOnEntry.tsx | 27 +-
...gister.test.tsx => AddOnRegister.spec.tsx} | 29 +-
.../core/AddOnStore/AddOnStore.module.css | 31 -
...ddOnStore.test.tsx => AddOnStore.spec.tsx} | 274 +-
.../AddOn/core/AddOnStore/AddOnStore.tsx | 385 +-
.../{Action.test.tsx => Action.spec.tsx} | 9 +-
...nContent.test.tsx => MainContent.spec.tsx} | 7 +-
...{SidePanel.test.tsx => SidePanel.spec.tsx} | 7 +-
...n.helper.test.ts => Plugin.helper.spec.ts} | 40 +-
...ToTag.test.tsx => AddPeopleToTag.spec.tsx} | 43 +-
.../Advertisements/Advertisements.module.css | 31 -
...ments.test.tsx => Advertisements.spec.tsx} | 43 +-
.../Advertisements/Advertisements.tsx | 79 +-
.../AdvertisementEntry.module.css | 6 +-
...y.test.tsx => AdvertisementEntry.spec.tsx} | 90 +-
.../AdvertisementEntry/AdvertisementEntry.tsx | 9 +-
.../AdvertisementRegister.module.css | 56 -
...est.tsx => AdvertisementRegister.spec.tsx} | 127 +-
.../AdvertisementRegister.tsx | 13 +-
...t.tsx => AgendaCategoryContainer.spec.tsx} | 9 +-
.../AgendaCategoryContainer.tsx | 6 +-
.../AgendaCategoryContainerProps.ts | 5 +-
.../AgendaItemsContainer.module.css | 230 -
...test.tsx => AgendaItemsContainer.spec.tsx} | 12 +-
.../AgendaItems/AgendaItemsContainer.tsx | 4 +-
.../AgendaItems/AgendaItemsContainerProps.ts | 5 +-
...st.tsx => AgendaItemsCreateModal.spec.tsx} | 18 +-
.../AgendaItems/AgendaItemsCreateModal.tsx | 8 +-
.../AgendaItems/AgendaItemsDeleteModal.tsx | 2 +-
...t.tsx => AgendaItemsPreviewModal.spec.tsx} | 7 +-
.../AgendaItems/AgendaItemsPreviewModal.tsx | 4 +-
...st.tsx => AgendaItemsUpdateModal.spec.tsx} | 19 +-
.../AgendaItems/AgendaItemsUpdateModal.tsx | 8 +-
src/components/Avatar/Avatar.spec.tsx | 92 +
src/components/Avatar/Avatar.test.tsx | 50 -
...st.tsx => ChangeLanguageDropdown.spec.tsx} | 9 +-
...InModal.test.tsx => CheckInModal.spec.tsx} | 8 +-
.../CheckIn/CheckInWrapper.module.css | 13 -
...apper.test.tsx => CheckInWrapper.spec.tsx} | 15 +-
src/components/CheckIn/CheckInWrapper.tsx | 19 +-
.../{TableRow.test.tsx => TableRow.spec.tsx} | 25 +-
src/components/CheckIn/tagTemplate.ts | 24 +-
....test.tsx => CollapsibleDropdown.spec.tsx} | 34 +-
.../ContriStats/ContriStats.module.css | 7 -
...triStats.test.tsx => ContriStats.spec.tsx} | 1 +
src/components/ContriStats/ContriStats.tsx | 19 +-
...test.tsx => CurrentHourIndicator.spec.tsx} | 1 +
...Down.test.tsx => DynamicDropDown.spec.tsx} | 15 +-
...t.tsx => EditCustomFieldDropDown.spec.tsx} | 10 +-
.../EventCalendar/EventCalendar.module.css | 342 -
...lendar.test.tsx => EventCalendar.spec.tsx} | 3 +-
.../EventCalendar/EventCalendar.tsx | 286 +-
...ntHeader.test.tsx => EventHeader.spec.tsx} | 15 +-
src/components/EventCalendar/EventHeader.tsx | 82 +-
.../YearlyEventCalender.module.css | 354 -
.../EventCalendar/YearlyEventCalender.tsx | 45 +-
...test.tsx => EventDashboardScreen.spec.tsx} | 35 +-
.../EventListCard/EventListCard.module.css | 223 -
...stCard.test.tsx => EventListCard.spec.tsx} | 60 +-
.../EventListCard/EventListCard.tsx | 11 +-
.../EventListCard/EventListCardModals.tsx | 35 +-
.../Dashboard/EventDashboard.module.css | 101 -
...board.test.tsx => EventDashboard.spec.tsx} | 12 +-
.../Dashboard/EventDashboard.tsx | 2 +-
.../EventAgendaItems.module.css | 22 -
...ems.test.tsx => EventAgendaItems.spec.tsx} | 51 +-
.../EventAgendaItems/EventAgendaItems.tsx | 2 +-
...st.test.tsx => AttendedEventList.spec.tsx} | 7 +-
...ance.test.tsx => EventAttendance.spec.tsx} | 37 +-
.../EventAttendance/EventAttendance.tsx | 112 +-
...tics.test.tsx => EventStatistics.spec.tsx} | 39 +-
.../EventAttendance/EventStatistics.tsx | 51 +-
.../EventsAttendance.module.css | 35 -
.../EventRegistrant/EventRegistrants.spec.tsx | 264 +
.../EventRegistrant/EventRegistrants.tsx | 227 +
.../EventRegistrant/Registrations.mocks.ts | 67 +
...ee.test.tsx => AddOnSpotAttendee.spec.tsx} | 112 +-
...est.tsx => EventRegistrantsModal.spec.tsx} | 3 +-
.../EventRegistrantsWrapper.module.css | 13 -
...t.tsx => EventRegistrantsWrapper.spec.tsx} | 3 +-
.../EventRegistrantsWrapper.tsx | 28 +-
...ventStats.test.tsx => EventStats.spec.tsx} | 16 +-
...er.test.tsx => EventStatsWrapper.spec.tsx} | 23 +-
...Rating.test.tsx => AverageRating.spec.tsx} | 3 +-
.../EventStats/Statistics/AverageRating.tsx | 14 +-
.../{Feedback.test.tsx => Feedback.spec.tsx} | 16 +-
.../{Review.test.tsx => Review.spec.tsx} | 5 +-
.../GroupChatDetails.module.css | 94 +
.../GroupChatDetails.test.tsx | 603 ++
.../GroupChatDetails/GroupChatDetails.tsx | 442 +
...ponent.test.tsx => IconComponent.spec.tsx} | 5 +
.../IconComponent/IconComponent.tsx | 8 +
...test.tsx => InfiniteScrollLoader.spec.tsx} | 1 +
.../LeftDrawer/LeftDrawer.module.css | 239 -
...eftDrawer.test.tsx => LeftDrawer.spec.tsx} | 33 +-
src/components/LeftDrawer/LeftDrawer.tsx | 21 +-
.../LeftDrawerOrg/LeftDrawerOrg.module.css | 362 -
...werOrg.test.tsx => LeftDrawerOrg.spec.tsx} | 15 +-
.../LeftDrawerOrg/LeftDrawerOrg.tsx | 35 +-
.../{Loader.test.tsx => Loader.spec.tsx} | 7 +-
.../LoginPortalToggle.module.css | 6 +-
...le.test.tsx => LoginPortalToggle.spec.tsx} | 3 +-
...st.tsx => EventsAttendedByMember.spec.tsx} | 0
...st.tsx => EventsAttendedCardItem.spec.tsx} | 3 +-
...tsx => EventsAttendedMemberModal.spec.tsx} | 19 +-
.../MemberDetail/customTableCell.spec.tsx | 160 +
.../MemberDetail/customTableCell.test.tsx | 171 -
...rd.test.tsx => MemberRequestCard.spec.tsx} | 3 +-
.../{NotFound.test.tsx => NotFound.spec.tsx} | 2 +-
...ard.test.tsx => OrgAdminListCard.spec.tsx} | 20 +-
.../OrgContriCards/OrgContriCards.module.css | 22 -
...Cards.test.tsx => OrgContriCards.spec.tsx} | 2 +-
.../OrgContriCards/OrgContriCards.tsx | 2 +-
...{OrgDelete.test.tsx => OrgDelete.spec.tsx} | 4 +-
.../OrgListCard/OrgListCard.module.css | 3 +
...ListCard.test.tsx => OrgListCard.spec.tsx} | 55 +-
src/components/OrgListCard/OrgListCard.tsx | 21 +-
src/components/OrgListCard/TruncatedText.tsx | 80 +
src/components/OrgListCard/useDebounce.tsx | 42 +
.../OrgPeopleListCard.spec.tsx | 234 +
.../OrgPeopleListCard.test.tsx | 81 -
.../OrgPeopleListCard/OrgPeopleListCard.tsx | 7 +-
.../OrgPostCard/DeletePostModal.spec.tsx | 77 +
.../OrgPostCard/DeletePostModal.tsx | 65 +
.../OrgPostCard/OrgPostCard.module.css | 278 -
...PostCard.test.tsx => OrgPostCard.spec.tsx} | 139 +-
src/components/OrgPostCard/OrgPostCard.tsx | 191 +-
...yModal.test.tsx => CategoryModal.spec.tsx} | 28 +-
.../ActionItemCategories/CategoryModal.tsx | 2 +-
.../OrgActionItemCategories.module.css | 138 -
...t.tsx => OrgActionItemCategories.spec.tsx} | 57 +-
.../OrgActionItemCategories.tsx | 121 +-
...tsx => AgendaCategoryCreateModal.spec.tsx} | 28 +-
.../AgendaCategoryCreateModal.tsx | 9 +-
.../AgendaCategoryDeleteModal.tsx | 4 +-
.../AgendaCategoryPreviewModal.tsx | 8 +-
...tsx => AgendaCategoryUpdateModal.spec.tsx} | 30 +-
.../AgendaCategoryUpdateModal.tsx | 8 +-
.../OrganizationAgendaCategory.module.css | 171 -
.../OrganizationAgendaCategory.spec.tsx | 344 +
.../OrganizationAgendaCategory.test.tsx | 237 -
.../OrganizationAgendaCategory.tsx | 63 +-
.../OrganizationAgendaCategoryErrorMocks.ts | 14 +-
.../OrganizationAgendaCategoryMocks.ts | 34 +-
...{DeleteOrg.test.tsx => DeleteOrg.spec.tsx} | 51 +-
.../OrgSettings/General/GeneralSettings.tsx | 2 +-
...t.tsx => OrgProfileFieldSettings.spec.tsx} | 28 +-
...{OrgUpdate.test.tsx => OrgUpdate.spec.tsx} | 22 +-
...ard.test.tsx => OrganizationCard.spec.tsx} | 14 +-
...est.tsx => OrganizationCardStart.spec.tsx} | 5 +-
.../OrganizationDashCards/CardItem.module.css | 81 -
.../{CardItem.test.tsx => CardItem.spec.tsx} | 3 +-
.../OrganizationDashCards/CardItem.tsx | 13 +-
.../CardItemLoading.spec.tsx | 23 +
.../OrganizationDashCards/CardItemLoading.tsx | 6 +-
.../DashBoardCardLoading.spec.tsx | 28 +
...rdCard.test.tsx => DashboardCard.spec.tsx} | 3 +-
.../OrganizationDashCards/DashboardCard.tsx | 2 +-
.../DashboardCardLoading.tsx | 8 +-
.../Dashboardcard.module.css | 60 -
...n.test.tsx => OrganizationScreen.spec.tsx} | 16 +-
...agination.test.tsx => Pagination.spec.tsx} | 5 +-
.../ProfileDropdown/ProfileDropdown.spec.tsx | 296 +
.../ProfileDropdown/ProfileDropdown.test.tsx | 148 -
.../ProfileDropdown/ProfileDropdown.tsx | 6 +-
...nce.test.tsx => CustomRecurrence.spec.tsx} | 19 +-
.../CustomRecurrenceModal.module.css | 59 -
.../CustomRecurrenceModal.tsx | 6 +-
...ns.test.tsx => RecurrenceOptions.spec.tsx} | 19 +-
...em.test.tsx => RequestsTableItem.spec.tsx} | 87 +-
.../RequestsTableItem/RequestsTableItem.tsx | 4 -
.../RequestsTableItemMocks.ts | 8 +-
...een.test.tsx => SuperAdminScreen.spec.tsx} | 2 +-
...leLoader.test.tsx => TableLoader.spec.tsx} | 3 +-
src/components/TagActions/TagNode.spec.tsx | 266 +
src/components/TagActions/TagNode.tsx | 1 +
src/components/TagActions/TagNodeMocks.ts | 75 +
.../UpdateSession/UpdateSession.css | 96 -
.../UpdateSession/UpdateSession.spec.tsx | 633 ++
.../UpdateSession/UpdateSession.test.tsx | 346 -
.../UpdateSession/UpdateSession.tsx | 28 +-
.../UserListCard/UserListCard.module.css | 74 -
...istCard.test.tsx => UserListCard.spec.tsx} | 20 +-
src/components/UserListCard/UserListCard.tsx | 7 +-
.../UserPasswordUpdate.module.css | 97 -
...e.test.tsx => UserPasswordUpdate.spec.tsx} | 104 +-
.../UserPasswordUpdate/UserPasswordUpdate.tsx | 8 +-
.../UserPasswordUpdateMocks.ts | 40 +
.../UserPortal/ChatRoom/ChatRoom.module.css | 38 +-
.../UserPortal/ChatRoom/ChatRoom.spec.tsx | 5985 +++++++++++++
.../UserPortal/ChatRoom/ChatRoom.test.tsx | 1586 ----
.../UserPortal/ChatRoom/ChatRoom.tsx | 184 +-
.../CommentCard/CommentCard.spec.tsx | 597 ++
.../CommentCard/CommentCard.test.tsx | 241 -
.../UserPortal/CommentCard/CommentCard.tsx | 9 +-
.../ContactCard/ContactCard.module.css | 19 +-
...tactCard.test.tsx => ContactCard.spec.tsx} | 28 +-
.../UserPortal/ContactCard/ContactCard.tsx | 13 +-
.../CreateDirectChat.module.css | 9 -
.../CreateDirectChat.spec.tsx | 4036 +++++++++
.../CreateDirectChat.test.tsx | 1496 ----
.../CreateDirectChat/CreateDirectChat.tsx | 19 +-
.../CreateGroupChat.module.css | 29 +
.../CreateGroupChat/CreateGroupChat.spec.tsx | 6327 ++++++++++++++
.../CreateGroupChat/CreateGroupChat.test.tsx | 2455 ------
.../CreateGroupChat/CreateGroupChat.tsx | 154 +-
...ionCard.test.tsx => DonationCard.spec.tsx} | 15 +-
...{EventCard.test.tsx => EventCard.spec.tsx} | 10 +-
...ard.test.tsx => OrganizationCard.spec.tsx} | 61 +-
...r.test.tsx => OrganizationNavbar.spec.tsx} | 163 +-
.../OrganizationNavbar/OrganizationNavbar.tsx | 8 +-
....test.tsx => OrganizationSidebar.spec.tsx} | 91 +-
.../OrganizationSidebar.tsx | 2 -
...eopleCard.test.tsx => PeopleCard.spec.tsx} | 16 +-
.../UserPortal/PostCard/PostCard.module.css | 183 -
.../{PostCard.test.tsx => PostCard.spec.tsx} | 71 +-
.../UserPortal/PostCard/PostCard.tsx | 18 +-
...tedPost.test.tsx => PromotedPost.spec.tsx} | 22 +-
.../{Register.test.tsx => Register.spec.tsx} | 40 +-
....test.tsx => SecuredRouteForUser.spec.tsx} | 16 +-
...Modal.test.tsx => StartPostModal.spec.tsx} | 147 +-
.../StartPostModal/StartPostModal.tsx | 3 +-
...serNavbar.test.tsx => UserNavbar.spec.tsx} | 59 +-
...test.tsx => EventsAttendedByUser.spec.tsx} | 16 +-
...ds.test.tsx => UserAddressFields.spec.tsx} | 31 +-
...rSidebar.test.tsx => UserSidebar.spec.tsx} | 53 +-
.../UserPortal/UserSidebar/UserSidebar.tsx | 23 -
...arOrg.test.tsx => UserSidebarOrg.spec.tsx} | 47 +-
...eleteUser.test.tsx => DeleteUser.spec.tsx} | 3 +-
...ttings.test.tsx => OtherSettings.spec.tsx} | 3 +-
...rProfile.test.tsx => UserProfile.spec.tsx} | 3 +-
...leItem.test.tsx => UserTableItem.spec.tsx} | 56 +-
.../UsersTableItem/UsersTableItem.tsx | 1 +
src/components/Venues/VenueCard.tsx | 2 +-
src/components/Venues/VenueModal.module.css | 53 -
...enueModal.test.tsx => VenueModal.spec.tsx} | 120 +-
src/components/Venues/VenueModal.tsx | 13 +-
...{BlockUser.test.tsx => BlockUser.spec.tsx} | 377 +-
src/screens/BlockUser/BlockUser.tsx | 107 +-
.../CommunityProfile.module.css | 41 -
...ile.test.tsx => CommunityProfile.spec.tsx} | 14 +-
.../CommunityProfile/CommunityProfile.tsx | 5 +-
.../EventManagement/EventManagement.spec.tsx | 253 +
.../EventManagement/EventManagement.test.tsx | 143 -
.../EventManagement/EventManagement.tsx | 21 +-
.../EventVolunteers.module.css | 266 -
.../{Requests.test.tsx => Requests.spec.tsx} | 25 +-
.../EventVolunteers/Requests/Requests.tsx | 61 +-
...r.test.tsx => VolunteerContainer.spec.tsx} | 64 +-
.../EventVolunteers/VolunteerContainer.tsx | 4 +-
...tsx => VolunteerGroupDeleteModal.spec.tsx} | 17 +-
.../VolunteerGroupDeleteModal.tsx | 2 +-
....test.tsx => VolunteerGroupModal.spec.tsx} | 25 +-
.../VolunteerGroups/VolunteerGroupModal.tsx | 2 +-
...t.tsx => VolunteerGroupViewModal.spec.tsx} | 5 +-
.../VolunteerGroupViewModal.tsx | 12 +-
...oups.test.tsx => VolunteerGroups.spec.tsx} | 34 +-
.../VolunteerGroups/VolunteerGroups.tsx | 100 +-
...test.tsx => VolunteerCreateModal.spec.tsx} | 17 +-
.../Volunteers/VolunteerCreateModal.tsx | 2 +-
...test.tsx => VolunteerDeleteModal.spec.tsx} | 17 +-
.../Volunteers/VolunteerDeleteModal.tsx | 2 +-
...l.test.tsx => VolunteerViewModal.spec.tsx} | 5 +-
.../Volunteers/VolunteerViewModal.tsx | 64 +-
...olunteers.test.tsx => Volunteers.spec.tsx} | 76 +-
.../EventVolunteers/Volunteers/Volunteers.tsx | 122 +-
.../ForgotPassword/ForgotPassword.module.css | 71 -
...sword.test.tsx => ForgotPassword.spec.tsx} | 63 +-
src/screens/ForgotPassword/ForgotPassword.tsx | 7 +-
.../FundCampaignPledge.module.css | 273 -
...e.test.tsx => FundCampaignPledge.spec.tsx} | 52 +-
.../FundCampaignPledge/FundCampaignPledge.tsx | 92 +-
...al.test.tsx => PledgeDeleteModal.spec.tsx} | 11 +-
.../FundCampaignPledge/PledgeDeleteModal.tsx | 2 +-
.../FundCampaignPledge/PledgeModal.tsx | 12 +-
...derboard.test.tsx => Leaderboard.spec.tsx} | 55 +-
src/screens/Leaderboard/Leaderboard.tsx | 101 +-
src/screens/LoginPage/LoginPage.module.css | 235 -
...{LoginPage.test.tsx => LoginPage.spec.tsx} | 208 +-
src/screens/LoginPage/LoginPage.tsx | 37 +-
src/screens/ManageTag/ManageTag.module.css | 127 -
...{ManageTag.test.tsx => ManageTag.spec.tsx} | 71 +-
src/screens/ManageTag/ManageTag.tsx | 89 +-
...rDetail.test.tsx => MemberDetail.spec.tsx} | 32 +-
src/screens/MemberDetail/MemberDetail.tsx | 4 +-
.../OrgContribution.module.css | 261 -
...tion.test.tsx => OrgContribution.spec.tsx} | 20 +-
.../OrgContribution/OrgContribution.tsx | 7 +-
src/screens/OrgList/OrgList.module.css | 323 -
.../{OrgList.test.tsx => OrgList.spec.tsx} | 73 +-
src/screens/OrgList/OrgList.tsx | 104 +-
src/screens/OrgList/OrgListMocks.ts | 1 -
src/screens/OrgList/OrganizationModal.tsx | 4 +-
src/screens/OrgPost/OrgPost.module.css | 325 -
src/screens/OrgPost/OrgPost.test.tsx | 2 +-
src/screens/OrgPost/OrgPost.tsx | 128 +-
.../OrgSettings/OrgSettings.module.css | 55 -
src/screens/OrgSettings/OrgSettings.spec.tsx | 179 +
src/screens/OrgSettings/OrgSettings.test.tsx | 107 -
src/screens/OrgSettings/OrgSettings.tsx | 38 +-
...odal.test.tsx => ItemDeleteModal.spec.tsx} | 23 +-
.../ItemDeleteModal.tsx | 2 +-
...{ItemModal.test.tsx => ItemModal.spec.tsx} | 57 +-
.../OrganizationActionItems/ItemModal.tsx | 7 +-
...est.tsx => ItemUpdateStatusModal.spec.tsx} | 19 +-
...wModal.test.tsx => ItemViewModal.spec.tsx} | 17 +-
.../OrganizationActionItems/ItemViewModal.tsx | 4 +-
.../OrganizationActionItem.mocks.ts | 10 +
.../OrganizationActionItems.module.css | 291 -
.../OrganizationActionItems.spec.tsx | 663 ++
.../OrganizationActionItems.test.tsx | 359 -
.../OrganizationActionItems.tsx | 162 +-
.../testObject.mocks.ts | 51 +
.../OrganizationDashboard.module.css | 35 -
...est.tsx => OrganizationDashboard.spec.tsx} | 66 +-
.../OrganizationDashboard.tsx | 17 +-
.../OrganizationEvents.module.css | 330 -
...s.test.tsx => OrganizationEvents.spec.tsx} | 42 +-
.../OrganizationEvents/OrganizationEvents.tsx | 54 +-
...nModal.test.tsx => CampaignModal.spec.tsx} | 26 +-
.../CampaignModal.tsx | 4 +-
.../OrganizationFundCampagins.tsx | 75 +-
.../OrganizationFundCampaign.module.css | 202 -
....tsx => OrganizationFundCampaign.spec.tsx} | 59 +-
...{FundModal.test.tsx => FundModal.spec.tsx} | 47 +-
src/screens/OrganizationFunds/FundModal.tsx | 14 +-
.../OrganizationFunds.module.css | 142 -
...ds.test.tsx => OrganizationFunds.spec.tsx} | 41 +-
.../OrganizationFunds/OrganizationFunds.tsx | 111 +-
src/screens/OrganizationPeople/AddMember.tsx | 73 +-
...e.test.tsx => OrganizationPeople.spec.tsx} | 800 +-
.../OrganizationPeople/OrganizationPeople.tsx | 163 +-
...ags.test.tsx => OrganizationTags.spec.tsx} | 22 +-
.../OrganizationTags/OrganizationTags.tsx | 64 +-
.../OrganizationTags/OrganizationTagsMocks.ts | 12 +-
.../OrganizationVenues.module.css | 879 --
...s.test.tsx => OrganizationVenues.spec.tsx} | 147 +-
.../OrganizationVenues/OrganizationVenues.tsx | 121 +-
.../PageNotFound/PageNotFound.module.css | 109 -
...otFound.test.tsx => PageNotFound.spec.tsx} | 22 +-
src/screens/PageNotFound/PageNotFound.tsx | 4 +-
src/screens/Requests/Requests.module.css | 120 -
.../{Requests.test.tsx => Requests.spec.tsx} | 39 +-
src/screens/Requests/Requests.tsx | 14 +-
src/screens/SubTags/SubTags.module.css | 145 -
.../{SubTags.test.tsx => SubTags.spec.tsx} | 47 +-
src/screens/SubTags/SubTags.tsx | 76 +-
...{Campaigns.test.tsx => Campaigns.spec.tsx} | 61 +-
.../UserPortal/Campaigns/Campaigns.tsx | 63 +-
src/screens/UserPortal/Chat/Chat.module.css | 32 +-
src/screens/UserPortal/Chat/Chat.spec.tsx | 4548 ++++++++++
src/screens/UserPortal/Chat/Chat.test.tsx | 1695 ----
src/screens/UserPortal/Chat/Chat.tsx | 281 +-
src/screens/UserPortal/Donate/Donate.spec.tsx | 953 ++
src/screens/UserPortal/Donate/Donate.test.tsx | 390 -
src/screens/UserPortal/Donate/Donate.tsx | 20 +-
.../UserPortal/Events/Events.module.css | 156 -
.../{Events.test.tsx => Events.spec.tsx} | 330 +-
src/screens/UserPortal/Events/Events.tsx | 50 +-
.../LeaveOrganization.module.css | 27 +
.../LeaveOrganization.spec.tsx | 532 ++
.../LeaveOrganization/LeaveOrganization.tsx | 248 +
...ations.test.tsx => Organizations.spec.tsx} | 32 +
.../{People.test.tsx => People.spec.tsx} | 45 +-
src/screens/UserPortal/People/People.tsx | 72 +-
src/screens/UserPortal/Pledges/Pledges.tsx | 106 +-
.../Posts/{Posts.test.tsx => Posts.spec.tsx} | 72 +-
.../{Settings.test.tsx => Settings.spec.tsx} | 224 +-
src/screens/UserPortal/Settings/Settings.tsx | 18 +-
...serScreen.test.tsx => UserScreen.spec.tsx} | 76 +-
.../UserPortal/UserScreen/UserScreen.tsx | 2 +
.../{Actions.test.tsx => Actions.spec.tsx} | 137 +-
.../UserPortal/Volunteer/Actions/Actions.tsx | 78 +-
.../Volunteer/Groups/GroupModal.tsx | 2 +-
.../{Groups.test.tsx => Groups.spec.tsx} | 73 +-
.../UserPortal/Volunteer/Groups/Groups.tsx | 82 +-
...itations.test.tsx => Invitations.spec.tsx} | 31 +-
.../Volunteer/Invitations/Invitations.tsx | 93 +-
...vents.test.tsx => UpcomingEvents.spec.tsx} | 28 +-
.../UpcomingEvents/UpcomingEvents.tsx | 44 +-
....test.tsx => VolunteerManagement.spec.tsx} | 38 +-
.../Volunteer/VolunteerManagement.tsx | 5 +-
src/screens/Users/Users.module.css | 95 -
src/screens/Users/Users.spec.tsx | 1553 ++++
src/screens/Users/Users.test.tsx | 778 --
src/screens/Users/Users.tsx | 324 +-
src/screens/Users/UsersMocks.ts | 1 -
.../askAndSetDockerOption.spec.ts | 61 +
.../askAndSetDockerOption.ts | 35 +
.../askAndUpdatePort/askAndUpdatePort.ts | 25 +
.../askAndUpdatePort/askForUpdatePort.spec.ts | 55 +
.../askForCustomPort/askForCustomPort.spec.ts | 106 +
.../askForCustomPort/askForCustomPort.test.ts | 24 -
.../askForCustomPort/askForCustomPort.ts | 65 +-
src/setup/askForDocker/askForDocker.spec.ts | 69 +
src/setup/askForDocker/askForDocker.ts | 99 +
...Url.test.ts => askForTalawaApiUrl.spec.ts} | 35 +-
.../askForTalawaApiUrl/askForTalawaApiUrl.ts | 2 +-
...est.ts => setupTalawaWebSocketUrl.spec.ts} | 23 +-
...ection.test.ts => checkConnection.spec.ts} | 12 +-
...ckEnvFile.test.ts => checkEnvFile.spec.ts} | 25 +-
src/setup/updateEnvFile/updateEnvFile.spec.ts | 88 +
src/setup/updateEnvFile/updateEnvFile.ts | 21 +
...tcha.test.ts => validateRecaptcha.spec.ts} | 1 +
src/setupTests.ts | 3 +-
.../{index.test.ts => index.spec.ts} | 9 +-
.../{Action.test.ts => Action.spec.ts} | 7 +-
...nReducer.test.ts => pluginReducer.spec.ts} | 0
...sReducer.test.ts => routesReducer.spec.ts} | 0
...cer.test.ts => userRoutersReducer.spec.ts} | 16 +
src/state/reducers/userRoutesReducer.ts | 6 +
src/state/{store.test.tsx => store.spec.tsx} | 0
src/style/app.module.css | 5789 ++++++++++++-
src/subComponents/SortingButton.tsx | 100 +
src/utils/StaticMockLink.spec.ts | 725 ++
src/utils/chartToPdf.spec.ts | 153 +
src/utils/chartToPdf.test.ts | 168 -
...Base64.test.ts => convertToBase64.spec.ts} | 4 +-
src/utils/errorHandler.spec.tsx | 104 +
src/utils/errorHandler.test.tsx | 39 -
src/utils/errorHandler.tsx | 24 +-
src/utils/getRefreshToken.spec.ts | 87 +
src/utils/getRefreshToken.test.ts | 54 -
src/utils/getRefreshToken.ts | 2 +-
...are.test.ts => dateTimeMiddleware.spec.ts} | 31 +-
src/utils/timezoneUtils/dateTimeMiddleware.ts | 20 +-
...torage.test.ts => useLocalstorage.spec.ts} | 11 +-
src/utils/useSession.spec.tsx | 688 ++
src/utils/useSession.test.tsx | 544 --
tsconfig.json | 3 +-
vitest.config.ts | 39 +
vitest.setup.ts | 1 +
536 files changed, 55244 insertions(+), 27108 deletions(-)
create mode 100644 .dockerignore
delete mode 100644 .github/workflows/eslint_disable_check.py
create mode 100644 .github/workflows/merge-conflict-check.yml
create mode 100644 .github/workflows/push-deploy-website.yml
create mode 100644 .github/workflows/scripts/app_health_check.sh
create mode 100644 .github/workflows/scripts/code_coverage_disable_check.py
rename .github/workflows/{ => scripts}/compare_translations.py (100%)
rename .github/workflows/{ => scripts}/countline.py (100%)
create mode 100644 .github/workflows/scripts/eslint_disable_check.py
rename .github/workflows/{ => scripts}/talawa_admin_md_mdx_format_adjuster.py (100%)
create mode 100644 .github/workflows/scripts/validate-coderabbit.sh
create mode 100644 .nojekyll
create mode 100644 3141
create mode 100644 Dockerfile
create mode 100644 docs/.gitignore
create mode 100644 docs/CNAME
create mode 100644 docs/README.md
create mode 100644 docs/docs/intro.md
create mode 100644 docs/docs/tutorial-basics/_category_.json
create mode 100644 docs/docs/tutorial-basics/congratulations.md
create mode 100644 docs/docs/tutorial-basics/create-a-blog-post.md
create mode 100644 docs/docs/tutorial-basics/create-a-document.md
create mode 100644 docs/docs/tutorial-basics/create-a-page.md
create mode 100644 docs/docs/tutorial-basics/deploy-your-site.md
create mode 100644 docs/docs/tutorial-basics/markdown-features.mdx
create mode 100644 docs/docs/tutorial-extras/_category_.json
create mode 100644 docs/docs/tutorial-extras/img/docsVersionDropdown.png
create mode 100644 docs/docs/tutorial-extras/img/localeDropdown.png
create mode 100644 docs/docs/tutorial-extras/manage-docs-versions.md
create mode 100644 docs/docs/tutorial-extras/translate-your-site.md
create mode 100644 docs/docusaurus.config.ts
create mode 100644 docs/package.json
create mode 100644 docs/sidebars.ts
create mode 100644 docs/src/components/HomepageFeatures/index.tsx
create mode 100644 docs/src/components/HomepageFeatures/styles.module.css
create mode 100644 docs/src/css/custom.css
create mode 100644 docs/src/pages/index.module.css
create mode 100644 docs/src/pages/index.tsx
create mode 100644 docs/src/pages/markdown-page.md
create mode 100644 docs/static/.nojekyll
create mode 100644 docs/static/CNAME
create mode 100644 docs/static/img/docusaurus-social-card.jpg
create mode 100644 docs/static/img/docusaurus.png
create mode 100644 docs/static/img/favicon.ico
create mode 100644 docs/static/img/icons/facebook.svg
create mode 100644 docs/static/img/icons/favicon_palisadoes.ico
create mode 100644 docs/static/img/icons/github-dark.svg
create mode 100644 docs/static/img/icons/github.svg
create mode 100644 docs/static/img/icons/instagram.svg
create mode 100644 docs/static/img/icons/opportunities.svg
create mode 100644 docs/static/img/icons/slack.svg
create mode 100644 docs/static/img/icons/source.svg
create mode 100644 docs/static/img/icons/team.svg
create mode 100644 docs/static/img/icons/twitter.svg
create mode 100644 docs/static/img/icons/youtube-white.svg
create mode 100644 docs/static/img/icons/youtube.svg
create mode 100644 docs/static/img/logo.svg
create mode 100644 docs/static/img/markdown/misc/logo.png
create mode 100644 docs/static/img/undraw_docusaurus_mountain.svg
create mode 100644 docs/static/img/undraw_docusaurus_react.svg
create mode 100644 docs/static/img/undraw_docusaurus_tree.svg
create mode 100644 public/images/svg/options-outline.svg
create mode 100644 public/images/svg/organization.svg
rename src/{App.test.tsx => App.spec.tsx} (70%)
rename src/components/AddOn/{AddOn.test.tsx => AddOn.spec.tsx} (70%)
delete mode 100644 src/components/AddOn/core/AddOnEntry/AddOnEntry.module.css
rename src/components/AddOn/core/AddOnEntry/{AddOnEntry.test.tsx => AddOnEntry.spec.tsx} (83%)
rename src/components/AddOn/core/AddOnRegister/{AddOnRegister.test.tsx => AddOnRegister.spec.tsx} (89%)
delete mode 100644 src/components/AddOn/core/AddOnStore/AddOnStore.module.css
rename src/components/AddOn/core/AddOnStore/{AddOnStore.test.tsx => AddOnStore.spec.tsx} (59%)
rename src/components/AddOn/support/components/Action/{Action.test.tsx => Action.spec.tsx} (65%)
rename src/components/AddOn/support/components/MainContent/{MainContent.test.tsx => MainContent.spec.tsx} (70%)
rename src/components/AddOn/support/components/SidePanel/{SidePanel.test.tsx => SidePanel.spec.tsx} (82%)
rename src/components/AddOn/support/services/{Plugin.helper.test.ts => Plugin.helper.spec.ts} (53%)
rename src/components/AddPeopleToTag/{AddPeopleToTag.test.tsx => AddPeopleToTag.spec.tsx} (86%)
delete mode 100644 src/components/Advertisements/Advertisements.module.css
rename src/components/Advertisements/{Advertisements.test.tsx => Advertisements.spec.tsx} (96%)
rename src/components/Advertisements/core/AdvertisementEntry/{AdvertisementEntry.test.tsx => AdvertisementEntry.spec.tsx} (90%)
delete mode 100644 src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.module.css
rename src/components/Advertisements/core/AdvertisementRegister/{AdvertisementRegister.test.tsx => AdvertisementRegister.spec.tsx} (87%)
rename src/components/AgendaCategory/{AgendaCategoryContainer.test.tsx => AgendaCategoryContainer.spec.tsx} (98%)
delete mode 100644 src/components/AgendaItems/AgendaItemsContainer.module.css
rename src/components/AgendaItems/{AgendaItemsContainer.test.tsx => AgendaItemsContainer.spec.tsx} (98%)
rename src/components/AgendaItems/{AgendaItemsCreateModal.test.tsx => AgendaItemsCreateModal.spec.tsx} (96%)
rename src/components/AgendaItems/{AgendaItemsPreviewModal.test.tsx => AgendaItemsPreviewModal.spec.tsx} (94%)
rename src/components/AgendaItems/{AgendaItemsUpdateModal.test.tsx => AgendaItemsUpdateModal.spec.tsx} (96%)
create mode 100644 src/components/Avatar/Avatar.spec.tsx
delete mode 100644 src/components/Avatar/Avatar.test.tsx
rename src/components/ChangeLanguageDropdown/{ChangeLanguageDropdown.test.tsx => ChangeLanguageDropdown.spec.tsx} (93%)
rename src/components/CheckIn/{CheckInModal.test.tsx => CheckInModal.spec.tsx} (89%)
delete mode 100644 src/components/CheckIn/CheckInWrapper.module.css
rename src/components/CheckIn/{CheckInWrapper.test.tsx => CheckInWrapper.spec.tsx} (76%)
rename src/components/CheckIn/{TableRow.test.tsx => TableRow.spec.tsx} (91%)
rename src/components/CollapsibleDropdown/{CollapsibleDropdown.test.tsx => CollapsibleDropdown.spec.tsx} (87%)
delete mode 100644 src/components/ContriStats/ContriStats.module.css
rename src/components/ContriStats/{ContriStats.test.tsx => ContriStats.spec.tsx} (96%)
rename src/components/CurrentHourIndicator/{CurrentHourIndicator.test.tsx => CurrentHourIndicator.spec.tsx} (88%)
rename src/components/DynamicDropDown/{DynamicDropDown.test.tsx => DynamicDropDown.spec.tsx} (91%)
rename src/components/EditCustomFieldDropDown/{EditCustomFieldDropDown.test.tsx => EditCustomFieldDropDown.spec.tsx} (90%)
rename src/components/EventCalendar/{EventCalendar.test.tsx => EventCalendar.spec.tsx} (99%)
rename src/components/EventCalendar/{EventHeader.test.tsx => EventHeader.spec.tsx} (91%)
delete mode 100644 src/components/EventCalendar/YearlyEventCalender.module.css
rename src/components/EventDashboardScreen/{EventDashboardScreen.test.tsx => EventDashboardScreen.spec.tsx} (85%)
delete mode 100644 src/components/EventListCard/EventListCard.module.css
rename src/components/EventListCard/{EventListCard.test.tsx => EventListCard.spec.tsx} (92%)
delete mode 100644 src/components/EventManagement/Dashboard/EventDashboard.module.css
rename src/components/EventManagement/Dashboard/{EventDashboard.test.tsx => EventDashboard.spec.tsx} (88%)
delete mode 100644 src/components/EventManagement/EventAgendaItems/EventAgendaItems.module.css
rename src/components/EventManagement/EventAgendaItems/{EventAgendaItems.test.tsx => EventAgendaItems.spec.tsx} (86%)
rename src/components/EventManagement/EventAttendance/{AttendedEventList.test.tsx => AttendedEventList.spec.tsx} (92%)
rename src/components/EventManagement/EventAttendance/{EventAttendance.test.tsx => EventAttendance.spec.tsx} (72%)
rename src/components/EventManagement/EventAttendance/{EventStatistics.test.tsx => EventStatistics.spec.tsx} (88%)
delete mode 100644 src/components/EventManagement/EventAttendance/EventsAttendance.module.css
create mode 100644 src/components/EventManagement/EventRegistrant/EventRegistrants.spec.tsx
create mode 100644 src/components/EventManagement/EventRegistrant/EventRegistrants.tsx
create mode 100644 src/components/EventManagement/EventRegistrant/Registrations.mocks.ts
rename src/components/EventRegistrantsModal/{AddOnSpotAttendee.test.tsx => AddOnSpotAttendee.spec.tsx} (58%)
rename src/components/EventRegistrantsModal/{EventRegistrantsModal.test.tsx => EventRegistrantsModal.spec.tsx} (99%)
delete mode 100644 src/components/EventRegistrantsModal/EventRegistrantsWrapper.module.css
rename src/components/EventRegistrantsModal/{EventRegistrantsWrapper.test.tsx => EventRegistrantsWrapper.spec.tsx} (95%)
rename src/components/EventStats/{EventStats.test.tsx => EventStats.spec.tsx} (75%)
rename src/components/EventStats/{EventStatsWrapper.test.tsx => EventStatsWrapper.spec.tsx} (73%)
rename src/components/EventStats/Statistics/{AverageRating.test.tsx => AverageRating.spec.tsx} (91%)
rename src/components/EventStats/Statistics/{Feedback.test.tsx => Feedback.spec.tsx} (81%)
rename src/components/EventStats/Statistics/{Review.test.tsx => Review.spec.tsx} (89%)
create mode 100644 src/components/GroupChatDetails/GroupChatDetails.module.css
create mode 100644 src/components/GroupChatDetails/GroupChatDetails.test.tsx
create mode 100644 src/components/GroupChatDetails/GroupChatDetails.tsx
rename src/components/IconComponent/{IconComponent.test.tsx => IconComponent.spec.tsx} (94%)
rename src/components/InfiniteScrollLoader/{InfiniteScrollLoader.test.tsx => InfiniteScrollLoader.spec.tsx} (90%)
delete mode 100644 src/components/LeftDrawer/LeftDrawer.module.css
rename src/components/LeftDrawer/{LeftDrawer.test.tsx => LeftDrawer.spec.tsx} (87%)
delete mode 100644 src/components/LeftDrawerOrg/LeftDrawerOrg.module.css
rename src/components/LeftDrawerOrg/{LeftDrawerOrg.test.tsx => LeftDrawerOrg.spec.tsx} (98%)
rename src/components/Loader/{Loader.test.tsx => Loader.spec.tsx} (76%)
rename src/components/LoginPortalToggle/{LoginPortalToggle.test.tsx => LoginPortalToggle.spec.tsx} (92%)
rename src/components/MemberDetail/{EventsAttendedByMember.test.tsx => EventsAttendedByMember.spec.tsx} (100%)
rename src/components/MemberDetail/{EventsAttendedCardItem.test.tsx => EventsAttendedCardItem.spec.tsx} (96%)
rename src/components/MemberDetail/{EventsAttendedMemberModal.test.tsx => EventsAttendedMemberModal.spec.tsx} (91%)
create mode 100644 src/components/MemberDetail/customTableCell.spec.tsx
delete mode 100644 src/components/MemberDetail/customTableCell.test.tsx
rename src/components/MemberRequestCard/{MemberRequestCard.test.tsx => MemberRequestCard.spec.tsx} (97%)
rename src/components/NotFound/{NotFound.test.tsx => NotFound.spec.tsx} (94%)
rename src/components/OrgAdminListCard/{OrgAdminListCard.test.tsx => OrgAdminListCard.spec.tsx} (82%)
delete mode 100644 src/components/OrgContriCards/OrgContriCards.module.css
rename src/components/OrgContriCards/{OrgContriCards.test.tsx => OrgContriCards.spec.tsx} (97%)
rename src/components/OrgDelete/{OrgDelete.test.tsx => OrgDelete.spec.tsx} (86%)
rename src/components/OrgListCard/{OrgListCard.test.tsx => OrgListCard.spec.tsx} (73%)
create mode 100644 src/components/OrgListCard/TruncatedText.tsx
create mode 100644 src/components/OrgListCard/useDebounce.tsx
create mode 100644 src/components/OrgPeopleListCard/OrgPeopleListCard.spec.tsx
delete mode 100644 src/components/OrgPeopleListCard/OrgPeopleListCard.test.tsx
create mode 100644 src/components/OrgPostCard/DeletePostModal.spec.tsx
create mode 100644 src/components/OrgPostCard/DeletePostModal.tsx
delete mode 100644 src/components/OrgPostCard/OrgPostCard.module.css
rename src/components/OrgPostCard/{OrgPostCard.test.tsx => OrgPostCard.spec.tsx} (86%)
rename src/components/OrgSettings/ActionItemCategories/{CategoryModal.test.tsx => CategoryModal.spec.tsx} (85%)
delete mode 100644 src/components/OrgSettings/ActionItemCategories/OrgActionItemCategories.module.css
rename src/components/OrgSettings/ActionItemCategories/{OrgActionItemCategories.test.tsx => OrgActionItemCategories.spec.tsx} (76%)
rename src/components/OrgSettings/AgendaItemCategories/{AgendaCategoryCreateModal.test.tsx => AgendaCategoryCreateModal.spec.tsx} (76%)
rename src/components/OrgSettings/AgendaItemCategories/{AgendaCategoryUpdateModal.test.tsx => AgendaCategoryUpdateModal.spec.tsx} (82%)
delete mode 100644 src/components/OrgSettings/AgendaItemCategories/OrganizationAgendaCategory.module.css
create mode 100644 src/components/OrgSettings/AgendaItemCategories/OrganizationAgendaCategory.spec.tsx
delete mode 100644 src/components/OrgSettings/AgendaItemCategories/OrganizationAgendaCategory.test.tsx
rename src/components/OrgSettings/General/DeleteOrg/{DeleteOrg.test.tsx => DeleteOrg.spec.tsx} (80%)
rename src/components/OrgSettings/General/OrgProfileFieldSettings/{OrgProfileFieldSettings.test.tsx => OrgProfileFieldSettings.spec.tsx} (86%)
rename src/components/OrgSettings/General/OrgUpdate/{OrgUpdate.test.tsx => OrgUpdate.spec.tsx} (90%)
rename src/components/OrganizationCard/{OrganizationCard.test.tsx => OrganizationCard.spec.tsx} (66%)
rename src/components/OrganizationCardStart/{OrganizationCardStart.test.tsx => OrganizationCardStart.spec.tsx} (76%)
delete mode 100644 src/components/OrganizationDashCards/CardItem.module.css
rename src/components/OrganizationDashCards/{CardItem.test.tsx => CardItem.spec.tsx} (98%)
create mode 100644 src/components/OrganizationDashCards/CardItemLoading.spec.tsx
create mode 100644 src/components/OrganizationDashCards/DashBoardCardLoading.spec.tsx
rename src/components/OrganizationDashCards/{DashboardCard.test.tsx => DashboardCard.spec.tsx} (99%)
delete mode 100644 src/components/OrganizationDashCards/Dashboardcard.module.css
rename src/components/OrganizationScreen/{OrganizationScreen.test.tsx => OrganizationScreen.spec.tsx} (88%)
rename src/components/Pagination/{Pagination.test.tsx => Pagination.spec.tsx} (89%)
create mode 100644 src/components/ProfileDropdown/ProfileDropdown.spec.tsx
delete mode 100644 src/components/ProfileDropdown/ProfileDropdown.test.tsx
rename src/components/RecurrenceOptions/{CustomRecurrence.test.tsx => CustomRecurrence.spec.tsx} (98%)
delete mode 100644 src/components/RecurrenceOptions/CustomRecurrenceModal.module.css
rename src/components/RecurrenceOptions/{RecurrenceOptions.test.tsx => RecurrenceOptions.spec.tsx} (97%)
rename src/components/RequestsTableItem/{RequestsTableItem.test.tsx => RequestsTableItem.spec.tsx} (62%)
rename src/components/SuperAdminScreen/{SuperAdminScreen.test.tsx => SuperAdminScreen.spec.tsx} (97%)
rename src/components/TableLoader/{TableLoader.test.tsx => TableLoader.spec.tsx} (97%)
create mode 100644 src/components/TagActions/TagNode.spec.tsx
create mode 100644 src/components/TagActions/TagNodeMocks.ts
delete mode 100644 src/components/UpdateSession/UpdateSession.css
create mode 100644 src/components/UpdateSession/UpdateSession.spec.tsx
delete mode 100644 src/components/UpdateSession/UpdateSession.test.tsx
delete mode 100644 src/components/UserListCard/UserListCard.module.css
rename src/components/UserListCard/{UserListCard.test.tsx => UserListCard.spec.tsx} (77%)
delete mode 100644 src/components/UserPasswordUpdate/UserPasswordUpdate.module.css
rename src/components/UserPasswordUpdate/{UserPasswordUpdate.test.tsx => UserPasswordUpdate.spec.tsx} (58%)
create mode 100644 src/components/UserPasswordUpdate/UserPasswordUpdateMocks.ts
create mode 100644 src/components/UserPortal/ChatRoom/ChatRoom.spec.tsx
delete mode 100644 src/components/UserPortal/ChatRoom/ChatRoom.test.tsx
create mode 100644 src/components/UserPortal/CommentCard/CommentCard.spec.tsx
delete mode 100644 src/components/UserPortal/CommentCard/CommentCard.test.tsx
rename src/components/UserPortal/ContactCard/{ContactCard.test.tsx => ContactCard.spec.tsx} (72%)
delete mode 100644 src/components/UserPortal/CreateDirectChat/CreateDirectChat.module.css
create mode 100644 src/components/UserPortal/CreateDirectChat/CreateDirectChat.spec.tsx
delete mode 100644 src/components/UserPortal/CreateDirectChat/CreateDirectChat.test.tsx
create mode 100644 src/components/UserPortal/CreateGroupChat/CreateGroupChat.spec.tsx
delete mode 100644 src/components/UserPortal/CreateGroupChat/CreateGroupChat.test.tsx
rename src/components/UserPortal/DonationCard/{DonationCard.test.tsx => DonationCard.spec.tsx} (64%)
rename src/components/UserPortal/EventCard/{EventCard.test.tsx => EventCard.spec.tsx} (94%)
rename src/components/UserPortal/OrganizationCard/{OrganizationCard.test.tsx => OrganizationCard.spec.tsx} (77%)
rename src/components/UserPortal/OrganizationNavbar/{OrganizationNavbar.test.tsx => OrganizationNavbar.spec.tsx} (65%)
rename src/components/UserPortal/OrganizationSidebar/{OrganizationSidebar.test.tsx => OrganizationSidebar.spec.tsx} (52%)
rename src/components/UserPortal/PeopleCard/{PeopleCard.test.tsx => PeopleCard.spec.tsx} (65%)
delete mode 100644 src/components/UserPortal/PostCard/PostCard.module.css
rename src/components/UserPortal/PostCard/{PostCard.test.tsx => PostCard.spec.tsx} (90%)
rename src/components/UserPortal/PromotedPost/{PromotedPost.test.tsx => PromotedPost.spec.tsx} (77%)
rename src/components/UserPortal/Register/{Register.test.tsx => Register.spec.tsx} (80%)
rename src/components/UserPortal/SecuredRouteForUser/{SecuredRouteForUser.test.tsx => SecuredRouteForUser.spec.tsx} (77%)
rename src/components/UserPortal/StartPostModal/{StartPostModal.test.tsx => StartPostModal.spec.tsx} (51%)
rename src/components/UserPortal/UserNavbar/{UserNavbar.test.tsx => UserNavbar.spec.tsx} (67%)
rename src/components/UserPortal/UserProfile/{EventsAttendedByUser.test.tsx => EventsAttendedByUser.spec.tsx} (76%)
rename src/components/UserPortal/UserProfile/{UserAddressFields.test.tsx => UserAddressFields.spec.tsx} (69%)
rename src/components/UserPortal/UserSidebar/{UserSidebar.test.tsx => UserSidebar.spec.tsx} (85%)
rename src/components/UserPortal/UserSidebarOrg/{UserSidebarOrg.test.tsx => UserSidebarOrg.spec.tsx} (86%)
rename src/components/UserProfileSettings/{DeleteUser.test.tsx => DeleteUser.spec.tsx} (90%)
rename src/components/UserProfileSettings/{OtherSettings.test.tsx => OtherSettings.spec.tsx} (89%)
rename src/components/UserProfileSettings/{UserProfile.test.tsx => UserProfile.spec.tsx} (92%)
rename src/components/UsersTableItem/{UserTableItem.test.tsx => UserTableItem.spec.tsx} (98%)
delete mode 100644 src/components/Venues/VenueModal.module.css
rename src/components/Venues/{VenueModal.test.tsx => VenueModal.spec.tsx} (72%)
rename src/screens/BlockUser/{BlockUser.test.tsx => BlockUser.spec.tsx} (57%)
delete mode 100644 src/screens/CommunityProfile/CommunityProfile.module.css
rename src/screens/CommunityProfile/{CommunityProfile.test.tsx => CommunityProfile.spec.tsx} (98%)
create mode 100644 src/screens/EventManagement/EventManagement.spec.tsx
delete mode 100644 src/screens/EventManagement/EventManagement.test.tsx
delete mode 100644 src/screens/EventVolunteers/EventVolunteers.module.css
rename src/screens/EventVolunteers/Requests/{Requests.test.tsx => Requests.spec.tsx} (92%)
rename src/screens/EventVolunteers/{VolunteerContainer.test.tsx => VolunteerContainer.spec.tsx} (71%)
rename src/screens/EventVolunteers/VolunteerGroups/{VolunteerGroupDeleteModal.test.tsx => VolunteerGroupDeleteModal.spec.tsx} (92%)
rename src/screens/EventVolunteers/VolunteerGroups/{VolunteerGroupModal.test.tsx => VolunteerGroupModal.spec.tsx} (96%)
rename src/screens/EventVolunteers/VolunteerGroups/{VolunteerGroupViewModal.test.tsx => VolunteerGroupViewModal.spec.tsx} (98%)
rename src/screens/EventVolunteers/VolunteerGroups/{VolunteerGroups.test.tsx => VolunteerGroups.spec.tsx} (89%)
rename src/screens/EventVolunteers/Volunteers/{VolunteerCreateModal.test.tsx => VolunteerCreateModal.spec.tsx} (91%)
rename src/screens/EventVolunteers/Volunteers/{VolunteerDeleteModal.test.tsx => VolunteerDeleteModal.spec.tsx} (91%)
rename src/screens/EventVolunteers/Volunteers/{VolunteerViewModal.test.tsx => VolunteerViewModal.spec.tsx} (97%)
rename src/screens/EventVolunteers/Volunteers/{Volunteers.test.tsx => Volunteers.spec.tsx} (79%)
delete mode 100644 src/screens/ForgotPassword/ForgotPassword.module.css
rename src/screens/ForgotPassword/{ForgotPassword.test.tsx => ForgotPassword.spec.tsx} (85%)
delete mode 100644 src/screens/FundCampaignPledge/FundCampaignPledge.module.css
rename src/screens/FundCampaignPledge/{FundCampaignPledge.test.tsx => FundCampaignPledge.spec.tsx} (92%)
rename src/screens/FundCampaignPledge/{PledgeDeleteModal.test.tsx => PledgeDeleteModal.spec.tsx} (95%)
rename src/screens/Leaderboard/{Leaderboard.test.tsx => Leaderboard.spec.tsx} (79%)
delete mode 100644 src/screens/LoginPage/LoginPage.module.css
rename src/screens/LoginPage/{LoginPage.test.tsx => LoginPage.spec.tsx} (80%)
delete mode 100644 src/screens/ManageTag/ManageTag.module.css
rename src/screens/ManageTag/{ManageTag.test.tsx => ManageTag.spec.tsx} (84%)
rename src/screens/MemberDetail/{MemberDetail.test.tsx => MemberDetail.spec.tsx} (95%)
delete mode 100644 src/screens/OrgContribution/OrgContribution.module.css
rename src/screens/OrgContribution/{OrgContribution.test.tsx => OrgContribution.spec.tsx} (80%)
delete mode 100644 src/screens/OrgList/OrgList.module.css
rename src/screens/OrgList/{OrgList.test.tsx => OrgList.spec.tsx} (94%)
delete mode 100644 src/screens/OrgPost/OrgPost.module.css
delete mode 100644 src/screens/OrgSettings/OrgSettings.module.css
create mode 100644 src/screens/OrgSettings/OrgSettings.spec.tsx
delete mode 100644 src/screens/OrgSettings/OrgSettings.test.tsx
rename src/screens/OrganizationActionItems/{ItemDeleteModal.test.tsx => ItemDeleteModal.spec.tsx} (91%)
rename src/screens/OrganizationActionItems/{ItemModal.test.tsx => ItemModal.spec.tsx} (94%)
rename src/screens/OrganizationActionItems/{ItemUpdateStatusModal.test.tsx => ItemUpdateStatusModal.spec.tsx} (96%)
rename src/screens/OrganizationActionItems/{ItemViewModal.test.tsx => ItemViewModal.spec.tsx} (97%)
delete mode 100644 src/screens/OrganizationActionItems/OrganizationActionItems.module.css
create mode 100644 src/screens/OrganizationActionItems/OrganizationActionItems.spec.tsx
delete mode 100644 src/screens/OrganizationActionItems/OrganizationActionItems.test.tsx
delete mode 100644 src/screens/OrganizationDashboard/OrganizationDashboard.module.css
rename src/screens/OrganizationDashboard/{OrganizationDashboard.test.tsx => OrganizationDashboard.spec.tsx} (78%)
delete mode 100644 src/screens/OrganizationEvents/OrganizationEvents.module.css
rename src/screens/OrganizationEvents/{OrganizationEvents.test.tsx => OrganizationEvents.spec.tsx} (93%)
rename src/screens/OrganizationFundCampaign/{CampaignModal.test.tsx => CampaignModal.spec.tsx} (95%)
delete mode 100644 src/screens/OrganizationFundCampaign/OrganizationFundCampaign.module.css
rename src/screens/OrganizationFundCampaign/{OrganizationFundCampaign.test.tsx => OrganizationFundCampaign.spec.tsx} (88%)
rename src/screens/OrganizationFunds/{FundModal.test.tsx => FundModal.spec.tsx} (85%)
delete mode 100644 src/screens/OrganizationFunds/OrganizationFunds.module.css
rename src/screens/OrganizationFunds/{OrganizationFunds.test.tsx => OrganizationFunds.spec.tsx} (85%)
rename src/screens/OrganizationPeople/{OrganizationPeople.test.tsx => OrganizationPeople.spec.tsx} (64%)
rename src/screens/OrganizationTags/{OrganizationTags.test.tsx => OrganizationTags.spec.tsx} (96%)
delete mode 100644 src/screens/OrganizationVenues/OrganizationVenues.module.css
rename src/screens/OrganizationVenues/{OrganizationVenues.test.tsx => OrganizationVenues.spec.tsx} (77%)
delete mode 100644 src/screens/PageNotFound/PageNotFound.module.css
rename src/screens/PageNotFound/{PageNotFound.test.tsx => PageNotFound.spec.tsx} (68%)
delete mode 100644 src/screens/Requests/Requests.module.css
rename src/screens/Requests/{Requests.test.tsx => Requests.spec.tsx} (91%)
delete mode 100644 src/screens/SubTags/SubTags.module.css
rename src/screens/SubTags/{SubTags.test.tsx => SubTags.spec.tsx} (85%)
rename src/screens/UserPortal/Campaigns/{Campaigns.test.tsx => Campaigns.spec.tsx} (88%)
create mode 100644 src/screens/UserPortal/Chat/Chat.spec.tsx
delete mode 100644 src/screens/UserPortal/Chat/Chat.test.tsx
create mode 100644 src/screens/UserPortal/Donate/Donate.spec.tsx
delete mode 100644 src/screens/UserPortal/Donate/Donate.test.tsx
delete mode 100644 src/screens/UserPortal/Events/Events.module.css
rename src/screens/UserPortal/Events/{Events.test.tsx => Events.spec.tsx} (62%)
create mode 100644 src/screens/UserPortal/LeaveOrganization/LeaveOrganization.module.css
create mode 100644 src/screens/UserPortal/LeaveOrganization/LeaveOrganization.spec.tsx
create mode 100644 src/screens/UserPortal/LeaveOrganization/LeaveOrganization.tsx
rename src/screens/UserPortal/Organizations/{Organizations.test.tsx => Organizations.spec.tsx} (95%)
rename src/screens/UserPortal/People/{People.test.tsx => People.spec.tsx} (81%)
rename src/screens/UserPortal/Posts/{Posts.test.tsx => Posts.spec.tsx} (88%)
rename src/screens/UserPortal/Settings/{Settings.test.tsx => Settings.spec.tsx} (66%)
rename src/screens/UserPortal/UserScreen/{UserScreen.test.tsx => UserScreen.spec.tsx} (66%)
rename src/screens/UserPortal/Volunteer/Actions/{Actions.test.tsx => Actions.spec.tsx} (56%)
rename src/screens/UserPortal/Volunteer/Groups/{Groups.test.tsx => Groups.spec.tsx} (76%)
rename src/screens/UserPortal/Volunteer/Invitations/{Invitations.test.tsx => Invitations.spec.tsx} (94%)
rename src/screens/UserPortal/Volunteer/UpcomingEvents/{UpcomingEvents.test.tsx => UpcomingEvents.spec.tsx} (90%)
rename src/screens/UserPortal/Volunteer/{VolunteerManagement.test.tsx => VolunteerManagement.spec.tsx} (76%)
delete mode 100644 src/screens/Users/Users.module.css
create mode 100644 src/screens/Users/Users.spec.tsx
delete mode 100644 src/screens/Users/Users.test.tsx
create mode 100644 src/setup/askAndSetDockerOption/askAndSetDockerOption.spec.ts
create mode 100644 src/setup/askAndSetDockerOption/askAndSetDockerOption.ts
create mode 100644 src/setup/askAndUpdatePort/askAndUpdatePort.ts
create mode 100644 src/setup/askAndUpdatePort/askForUpdatePort.spec.ts
create mode 100644 src/setup/askForCustomPort/askForCustomPort.spec.ts
delete mode 100644 src/setup/askForCustomPort/askForCustomPort.test.ts
create mode 100644 src/setup/askForDocker/askForDocker.spec.ts
create mode 100644 src/setup/askForDocker/askForDocker.ts
rename src/setup/askForTalawaApiUrl/{askForTalawaApiUrl.test.ts => askForTalawaApiUrl.spec.ts} (55%)
rename src/setup/askForTalawaApiUrl/{setupTalawaWebSocketUrl.test.ts => setupTalawaWebSocketUrl.spec.ts} (69%)
rename src/setup/checkConnection/{checkConnection.test.ts => checkConnection.spec.ts} (84%)
rename src/setup/checkEnvFile/{checkEnvFile.test.ts => checkEnvFile.spec.ts} (62%)
create mode 100644 src/setup/updateEnvFile/updateEnvFile.spec.ts
create mode 100644 src/setup/updateEnvFile/updateEnvFile.ts
rename src/setup/validateRecaptcha/{validateRecaptcha.test.ts => validateRecaptcha.spec.ts} (95%)
rename src/state/action-creators/{index.test.ts => index.spec.ts} (90%)
rename src/state/helpers/{Action.test.ts => Action.spec.ts} (53%)
rename src/state/reducers/{pluginReducer.test.ts => pluginReducer.spec.ts} (100%)
rename src/state/reducers/{routesReducer.test.ts => routesReducer.spec.ts} (100%)
rename src/state/reducers/{userRoutersReducer.test.ts => userRoutersReducer.spec.ts} (82%)
rename src/state/{store.test.tsx => store.spec.tsx} (100%)
create mode 100644 src/subComponents/SortingButton.tsx
create mode 100644 src/utils/StaticMockLink.spec.ts
create mode 100644 src/utils/chartToPdf.spec.ts
delete mode 100644 src/utils/chartToPdf.test.ts
rename src/utils/{convertToBase64.test.ts => convertToBase64.spec.ts} (90%)
create mode 100644 src/utils/errorHandler.spec.tsx
delete mode 100644 src/utils/errorHandler.test.tsx
create mode 100644 src/utils/getRefreshToken.spec.ts
delete mode 100644 src/utils/getRefreshToken.test.ts
rename src/utils/timezoneUtils/{dateTimeMiddleware.test.ts => dateTimeMiddleware.spec.ts} (92%)
rename src/utils/{useLocalstorage.test.ts => useLocalstorage.spec.ts} (91%)
create mode 100644 src/utils/useSession.spec.tsx
delete mode 100644 src/utils/useSession.test.tsx
create mode 100644 vitest.config.ts
create mode 100644 vitest.setup.ts
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000000..0ef78f43dc
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,25 @@
+node_modules
+npm-debug.log
+Dockerfile
+.git
+.gitignore
+.env
+.env.*
+dist
+coverage
+.nyc_output
+*.md
+.github
+tests
+__tests__
+*.test.*
+*.spec.*
+# Development files
+*.log
+*.lock
+.DS_Store
+.idea
+.vscode
+# Build artifacts
+build
+out
\ No newline at end of file
diff --git a/.eslintignore b/.eslintignore
index 7e45de312a..ee98c5bdb0 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -1,2 +1,8 @@
# Contains the PDF file of the Tag as JSON string, thus does not need to be linted
-src/components/CheckIn/tagTemplate.ts
\ No newline at end of file
+src/components/CheckIn/tagTemplate.ts
+package.json
+package-lock.json
+tsconfig.json
+
+# Ignore the Docusaurus website subdirectory
+docs/**
\ No newline at end of file
diff --git a/.eslintrc.json b/.eslintrc.json
index 26470f7aab..de93fb465f 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -5,7 +5,6 @@
"es6": true
},
- // Specify the rulesets from other ESLint Plugins tobe used
"extends": [
"plugin:react/recommended",
"eslint:recommended",
@@ -28,7 +27,6 @@
"sourceType": "module"
},
- // Specify the ESLint plugins tobe used
"plugins": [
"react",
"@typescript-eslint",
@@ -55,6 +53,7 @@
"import/no-duplicates": "error",
"tsdoc/syntax": "error",
"@typescript-eslint/ban-ts-comment": "error",
+ "@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
@@ -77,13 +76,13 @@
"camelcase": "off",
"@typescript-eslint/naming-convention": [
"error",
- // Interfaces must begin with Interface or TestInterface followed by a PascalCase name
+
{
"selector": "interface",
"format": ["PascalCase"],
"prefix": ["Interface", "TestInterface"]
},
- // Type Aliases must be in PascalCase
+
{
"selector": ["typeAlias", "typeLike", "enum"],
"format": ["PascalCase"]
@@ -120,20 +119,17 @@
"format": null
}
],
- // Ensures that components are always written in PascalCase
+
"react/jsx-pascal-case": [
"error",
{ "allowAllCaps": false, "allowNamespace": false }
],
- // Enforces whitespace around equal sign operators
"react/jsx-equals-spacing": ["warn", "never"],
"react/no-this-in-sfc": "error",
- // All tests must need not have an assertion
"jest/expect-expect": 0,
- // Enforce Strictly functional components
"react/no-unstable-nested-components": ["error", { "allowAsProps": true }],
"react/function-component-definition": [
0,
@@ -142,10 +138,20 @@
"prettier/prettier": "error"
},
- // Let ESLint use the react version in the package.json
"settings": {
"react": {
"version": "detect"
}
- }
+ },
+ "ignorePatterns": [
+ "**/*.css",
+ "**/*.scss",
+ "**/*.less",
+ "**/*.json",
+ "**/*.svg",
+ "docs/docusaurus.config.ts",
+ "docs/sidebars.ts",
+ "docs/src/**",
+ "docs/blog/**"
+ ]
}
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 9e3081d0ee..0748858133 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,3 +1,4 @@
+
-**Did you add tests for your changes?**
-
-
-
**Snapshots/Videos:**
@@ -44,10 +42,23 @@ Fixes #
+## Checklist
+
+### CodeRabbit AI Review
+- [ ] I have reviewed and addressed all critical issues flagged by CodeRabbit AI
+- [ ] I have implemented or provided justification for each non-critical suggestion
+- [ ] I have documented my reasoning in the PR comments where CodeRabbit AI suggestions were not implemented
+
+### Test Coverage
+- [ ] I have written tests for all new changes/features
+- [ ] I have verified that test coverage meets or exceeds 95%
+- [ ] I have run the test suite locally and all tests pass
+
+
**Other information**
**Have you read the [contributing guide](https://github.com/PalisadoesFoundation/talawa-admin/blob/master/CONTRIBUTING.md)?**
-
+
\ No newline at end of file
diff --git a/.github/workflows/check-tsdoc.js b/.github/workflows/check-tsdoc.js
index d5c3b33b90..0400f5a108 100644
--- a/.github/workflows/check-tsdoc.js
+++ b/.github/workflows/check-tsdoc.js
@@ -23,6 +23,7 @@ async function findTsxFiles(dir) {
} else if (
filePath.endsWith('.tsx') &&
!filePath.endsWith('.test.tsx') &&
+ !filePath.endsWith('.spec.tsx') &&
!filesToSkip.includes(path.relative(dir, filePath))
) {
results.push(filePath);
diff --git a/.github/workflows/codeql-codescan.yml b/.github/workflows/codeql-codescan.yml
index 6fa463001f..e018647d32 100644
--- a/.github/workflows/codeql-codescan.yml
+++ b/.github/workflows/codeql-codescan.yml
@@ -32,13 +32,13 @@ jobs:
uses: actions/checkout@v4
- name: Initialize CodeQL
- uses: github/codeql-action/init@v2
+ uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
debug: true
- name: Autobuild
- uses: github/codeql-action/autobuild@v2
+ uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
+ uses: github/codeql-action/analyze@v3
diff --git a/.github/workflows/eslint_disable_check.py b/.github/workflows/eslint_disable_check.py
deleted file mode 100644
index 201b4462b8..0000000000
--- a/.github/workflows/eslint_disable_check.py
+++ /dev/null
@@ -1,122 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: UTF-8 -*-
-"""ESLint Checker Script.
-
-Methodology:
-
- Recursively analyzes TypeScript files in the 'src' directory and its subdirectories
- as well as 'setup.ts' files to ensure they do not contain eslint-disable statements.
-
- This script enforces code quality practices in the project.
-
-NOTE:
-
- This script complies with our python3 coding and documentation standards.
- It complies with:
-
- 1) Pylint
- 2) Pydocstyle
- 3) Pycodestyle
- 4) Flake8
-
-"""
-
-import os
-import re
-import argparse
-import sys
-
-def has_eslint_disable(file_path):
- """
- Check if a TypeScript file contains eslint-disable statements.
-
- Args:
- file_path (str): Path to the TypeScript file.
-
- Returns:
- bool: True if eslint-disable statement is found, False otherwise.
- """
- eslint_disable_pattern = re.compile(r'//\s*eslint-disable(?:-next-line|-line)?', re.IGNORECASE)
-
- try:
- with open(file_path, 'r', encoding='utf-8') as file:
- content = file.read()
- return bool(eslint_disable_pattern.search(content))
- except Exception as e:
- print(f"Error reading file {file_path}: {e}")
- return False
-
-def check_eslint(directory):
- """
- Recursively check TypeScript files for eslint-disable statements in the 'src' directory.
-
- Args:
- directory (str): Path to the directory.
-
- Returns:
- bool: True if eslint-disable statement is found, False otherwise.
- """
- eslint_found = False
-
- for root, dirs, files in os.walk(os.path.join(directory, 'src')):
- for file_name in files:
- if file_name.endswith('.tsx') and not file_name.endswith('.test.tsx'):
- file_path = os.path.join(root, file_name)
- if has_eslint_disable(file_path):
- print(f'File {file_path} contains eslint-disable statement.')
- eslint_found = True
-
- setup_path = os.path.join(directory, 'setup.ts')
- if os.path.exists(setup_path) and has_eslint_disable(setup_path):
- print(f'Setup file {setup_path} contains eslint-disable statement.')
- eslint_found = True
-
- return eslint_found
-
-def arg_parser_resolver():
- """Resolve the CLI arguments provided by the user.
-
- Returns:
- result: Parsed argument object
- """
- parser = argparse.ArgumentParser()
- parser.add_argument(
- "--directory",
- type=str,
- default=os.getcwd(),
- help="Path to the directory to check (default: current directory)"
- )
- return parser.parse_args()
-
-def main():
- """
- Execute the script's main functionality.
-
- This function serves as the entry point for the script. It performs
- the following tasks:
- 1. Validates and retrieves the directory to check from
- command line arguments.
- 2. Recursively checks TypeScript files for eslint-disable statements.
- 3. Provides informative messages based on the analysis.
- 4. Exits with an error if eslint-disable statements are found.
-
- Raises:
- SystemExit: If an error occurs during execution.
- """
- args = arg_parser_resolver()
-
- if not os.path.exists(args.directory):
- print(f"Error: The specified directory '{args.directory}' does not exist.")
- sys.exit(1)
-
- # Check eslint in the specified directory
- eslint_found = check_eslint(args.directory)
-
- if eslint_found:
- print("ESLint-disable check failed. Exiting with error.")
- sys.exit(1)
-
- print("ESLint-disable check completed successfully.")
-
-if __name__ == "__main__":
- main()
diff --git a/.github/workflows/issue.yml b/.github/workflows/issue.yml
index 420d50adbe..05c703117e 100644
--- a/.github/workflows/issue.yml
+++ b/.github/workflows/issue.yml
@@ -26,7 +26,7 @@ jobs:
- uses: Renato66/auto-label@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- - uses: actions/github-script@v6
+ - uses: actions/github-script@v7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
diff --git a/.github/workflows/merge-conflict-check.yml b/.github/workflows/merge-conflict-check.yml
new file mode 100644
index 0000000000..5b7d939ae6
--- /dev/null
+++ b/.github/workflows/merge-conflict-check.yml
@@ -0,0 +1,65 @@
+name: Merge Conflict Check Workflow
+
+on:
+ pull_request:
+ branches:
+ - '**'
+ types:
+ - opened
+ - reopened
+ - synchronize
+ - ready_for_review
+
+jobs:
+ Merge-Conflict-Check:
+ name: Check for Merge Conflicts
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v4
+
+ - name: Check Mergeable Status via Github API
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ PR_NUMBER=${{ github.event.pull_request.number }}
+ max_retries=3
+ retry_delay=5
+
+ for ((i=1; i<=max_retries; i++)); do
+ echo "Attempt $i of $max_retries"
+
+ if ! response=$(gh api "repos/${{ github.repository }}/pulls/$PR_NUMBER" --jq '.mergeable'); then
+ if [[ $response == *"rate limit exceeded"* ]]; then
+ echo "Rate limit exceeded. Waiting before retry..."
+ sleep 60 # Wait longer for rate limit
+ else
+ echo "Failed to call GitHub API: $response"
+ if [ $i -eq $max_retries ]; then
+ echo "Maximum retries reached. Exiting."
+ exit 1
+ fi
+ sleep $retry_delay
+ fi
+ continue
+ fi
+
+ case "$response" in
+ "true")
+ echo "No conflicts detected."
+ exit 0
+ ;;
+ "false")
+ echo "Merge conflicts detected."
+ exit 1
+ ;;
+ *)
+ echo "Mergeable status unknown: $response"
+ if [ $i -eq $max_retries ]; then
+ echo "Maximum retries reached. Exiting."
+ exit 1
+ fi
+ sleep $retry_delay
+ ;;
+ esac
+ done
diff --git a/.github/workflows/pull-request-target.yml b/.github/workflows/pull-request-target.yml
index af75effc13..082a5e965c 100644
--- a/.github/workflows/pull-request-target.yml
+++ b/.github/workflows/pull-request-target.yml
@@ -19,18 +19,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Add the PR Review Policy
- uses: thollander/actions-comment-pull-request@v2
+ uses: thollander/actions-comment-pull-request@v3
with:
- comment_tag: pr_review_policy
+ comment-tag: pr_review_policy
message: |
## Our Pull Request Approval Process
Thanks for contributing!
### Testing Your Code
-
Remember, your PRs won't be reviewed until these criteria are met:
-
+
1. We don't merge PRs with poor code quality.
1. Follow coding best practices such that CodeRabbit.ai approves your PR.
1. We don't merge PRs with failed tests.
diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml
index aaeebc8345..f387698bce 100644
--- a/.github/workflows/pull-request.yml
+++ b/.github/workflows/pull-request.yml
@@ -37,19 +37,19 @@ jobs:
- name: Count number of lines
run: |
- chmod +x ./.github/workflows/countline.py
- ./.github/workflows/countline.py --lines 600 --exclude_files src/screens/LoginPage/LoginPage.tsx src/GraphQl/Queries/Queries.ts src/screens/OrgList/OrgList.tsx src/GraphQl/Mutations/mutations.ts src/components/EventListCard/EventListCardModals.tsx src/components/TagActions/TagActionsMocks.ts src/utils/interfaces.ts src/screens/MemberDetail/MemberDetail.tsx
+ chmod +x ./.github/workflows/scripts/countline.py
+ ./.github/workflows/scripts/countline.py --lines 600 --exclude_files src/screens/LoginPage/LoginPage.tsx src/GraphQl/Queries/Queries.ts src/screens/OrgList/OrgList.tsx src/GraphQl/Mutations/mutations.ts src/components/EventListCard/EventListCardModals.tsx src/components/TagActions/TagActionsMocks.ts src/utils/interfaces.ts src/screens/MemberDetail/MemberDetail.tsx
- name: Get changed TypeScript files
id: changed-files
- uses: tj-actions/changed-files@v40
+ uses: tj-actions/changed-files@v45
- name: Check formatting
if: steps.changed-files.outputs.only_changed != 'true'
run: npm run format:check
- name: Run formatting if check fails
if: failure()
- run: npm run format
+ run: npm run format:fix
- name: Check for type errors
if: steps.changed-files.outputs.only_changed != 'true'
@@ -58,8 +58,8 @@ jobs:
- name: Check for linting errors in modified files
if: steps.changed-files.outputs.only_changed != 'true'
env:
- CHANGED_FILES: ${{ steps.changed_files.outputs.all_changed_files }}
- run: npx eslint ${CHANGED_FILES} && python .github/workflows/eslint_disable_check.py
+ CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
+ run: npx eslint ${CHANGED_FILES}
- name: Check for TSDoc comments
run: npm run check-tsdoc # Run the TSDoc check script
@@ -71,8 +71,8 @@ jobs:
- name: Compare translation files
run: |
- chmod +x .github/workflows/compare_translations.py
- python .github/workflows/compare_translations.py --directory public/locales
+ chmod +x .github/workflows/scripts/compare_translations.py
+ python .github/workflows/scripts/compare_translations.py --directory public/locales
- name: Check if the source and target branches are different
if: ${{ github.event.pull_request.base.ref == github.event.pull_request.head.ref }}
@@ -80,6 +80,7 @@ jobs:
echo "Source Branch ${{ github.event.pull_request.head.ref }}"
echo "Target Branch ${{ github.event.pull_request.base.ref }}"
echo "Error: Source and Target Branches are the same. Please ensure they are different."
+ echo "Error: Close this PR and try again."
exit 1
Check-Sensitive-Files:
@@ -92,16 +93,21 @@ jobs:
- name: Get Changed Unauthorized files
id: changed-unauth-files
- uses: tj-actions/changed-files@v40
+ uses: tj-actions/changed-files@v45
with:
files: |
+ .env*
+ vitest.config.js
+ src/App.tsx
.github/**
env.example
.node-version
.husky/**
scripts/**
+ src/style/**
schema.graphql
package.json
+ package-lock.json
tsconfig.json
.gitignore
.eslintrc.json
@@ -123,6 +129,17 @@ jobs:
ISSUE_GUIDELINES.md
PR_GUIDELINES.md
README.md
+ *.pem
+ *.key
+ *.cert
+ *.password
+ *.secret
+ *.credentials
+ .nojekyll
+ yarn.lock
+ docs/docusaurus.config.ts
+ docs/sidebar*
+ CNAME
- name: List all changed unauthorized files
if: steps.changed-unauth-files.outputs.any_changed == 'true' || steps.changed-unauth-files.outputs.any_deleted == 'true'
@@ -132,6 +149,7 @@ jobs:
for file in ${CHANGED_UNAUTH_FILES}; do
echo "$file is unauthorized to change/delete"
done
+ echo "To override this, apply the 'ignore-sensitive-files-pr' label"
exit 1
Count-Changed-Files:
@@ -144,7 +162,7 @@ jobs:
- name: Get changed files
id: changed-files
- uses: tj-actions/changed-files@v40
+ uses: tj-actions/changed-files@v45
- name: Echo number of changed files
env:
@@ -170,6 +188,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
+ - name: Get changed files
+ id: changed-files
+ uses: tj-actions/changed-files@v45
+
- name: Set up Python
uses: actions/setup-python@v5
with:
@@ -177,12 +199,32 @@ jobs:
- name: Run Python script
run: |
- python .github/workflows/eslint_disable_check.py
+ python .github/workflows/scripts/eslint_disable_check.py --files ${{ steps.changed-files.outputs.all_changed_files }}
+
+ Check-Code-Coverage-Disable:
+ name: Check for code coverage disable
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Get changed files
+ id: changed-files
+ uses: tj-actions/changed-files@v45
+
+ - name: Set up Python
+ uses: actions/setup-python@v5
+ with:
+ python-version: 3.9
+
+ - name: Run Python script
+ run: |
+ python .github/workflows/scripts/code_coverage_disable_check.py --files ${{ steps.changed-files.outputs.all_changed_files }}
Test-Application:
name: Test Application
runs-on: ubuntu-latest
- needs: [Code-Quality-Checks, Check-ESlint-Disable]
+ needs: [Code-Quality-Checks, Check-ESlint-Disable,Check-Code-Coverage-Disable]
steps:
- name: Checkout the Repository
uses: actions/checkout@v4
@@ -197,11 +239,30 @@ jobs:
- name: Get changed TypeScript files
id: changed-files
- uses: tj-actions/changed-files@v40
+ uses: tj-actions/changed-files@v45
- - name: Run tests
+ - name: Run Jest Tests
+ if: steps.changed-files.outputs.only_changed != 'true'
+ env:
+ NODE_V8_COVERAGE: './coverage/jest'
+ run: |
+ npm run test -- --watchAll=false --coverage
+
+ - name: Run Vitest Tests
+ if: steps.changed-files.outputs.only_changed != 'true'
+ env:
+ NODE_V8_COVERAGE: './coverage/vitest'
+ run: |
+ npm run test:vitest:coverage
+
+ - name: Merge Coverage Reports
if: steps.changed-files.outputs.only_changed != 'true'
- run: npm run test -- --watchAll=false --coverage
+ run: |
+ mkdir -p coverage
+ if ! npx lcov-result-merger 'coverage/*/lcov.info' > 'coverage/lcov.info'; then
+ echo "Failed to merge coverage reports"
+ exit 1
+ fi
- name: TypeScript compilation for changed files
run: |
@@ -210,25 +271,56 @@ jobs:
npx tsc --noEmit "$file"
fi
done
-
+
- name: Present and Upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
+ gcov_ignore: 'docs/'
fail_ci_if_error: false
+ files: './coverage/lcov.info'
name: '${{env.CODECOV_UNIQUE_NAME}}'
- name: Test acceptable level of code coverage
- uses: VeryGoodOpenSource/very_good_coverage@v2
+ uses: VeryGoodOpenSource/very_good_coverage@v3
with:
path: "./coverage/lcov.info"
- min_coverage: 95.0
+ min_coverage: 0.0
- Graphql-Inspector:
- if: ${{ github.actor != 'dependabot[bot]' }}
- name: Runs Introspection on the GitHub talawa-api repo on the schema.graphql file
+ # Graphql-Inspector:
+ # if: ${{ github.actor != 'dependabot[bot]' }}
+ # name: Runs Introspection on the GitHub talawa-api repo on the schema.graphql file
+ # runs-on: ubuntu-latest
+ # steps:
+ # - name: Checkout the Repository
+ # uses: actions/checkout@v4
+
+ # - name: Set up Node.js
+ # uses: actions/setup-node@v4
+ # with:
+ # node-version: '22.x'
+
+ # - name: resolve dependency
+ # run: npm install -g @graphql-inspector/cli
+
+ # - name: Clone API Repository
+ # run: |
+ # # Retrieve the complete branch name directly from the GitHub context
+ # FULL_BRANCH_NAME=${{ github.base_ref }}
+ # echo "FULL_Branch_NAME: $FULL_BRANCH_NAME"
+
+ # # Clone the specified repository using the extracted branch name
+ # git clone --branch $FULL_BRANCH_NAME https://github.com/PalisadoesFoundation/talawa-api && ls -a
+
+ # - name: Validate Documents
+ # run: graphql-inspector validate './src/GraphQl/**/*.ts' './talawa-api/schema.graphql'
+
+ Start-App-Without-Docker:
+ name: Check if Talawa Admin app starts (No Docker)
runs-on: ubuntu-latest
+ needs: [Code-Quality-Checks, Test-Application]
+ if: github.actor != 'dependabot'
steps:
- name: Checkout the Repository
uses: actions/checkout@v4
@@ -236,22 +328,98 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
- node-version: '22.x'
+ node-version: '20.x'
- - name: resolve dependency
- run: npm install -g @graphql-inspector/cli
-
- - name: Clone API Repository
+ - name: Install Dependencies
+ run: npm install
+
+ - name: Build Production App
+ run: npm run build
+
+ - name: Start Production App
run: |
- # Retrieve the complete branch name directly from the GitHub context
- FULL_BRANCH_NAME=${{ github.base_ref }}
- echo "FULL_Branch_NAME: $FULL_BRANCH_NAME"
-
- # Clone the specified repository using the extracted branch name
- git clone --branch $FULL_BRANCH_NAME https://github.com/PalisadoesFoundation/talawa-api && ls -a
+ npm run preview &
+ echo $! > .pidfile_prod
+ - name: Check if Production App is running
+ run: |
+ chmod +x .github/workflows/scripts/app_health_check.sh
+ .github/workflows/scripts/app_health_check.sh 4173 120
+ - name: Stop Production App
+ run: |
+ if [ -f .pidfile_prod ]; then
+ kill "$(cat .pidfile_prod)"
+ fi
+ - name: Start Development App
+ run: |
+ npm run serve &
+ echo $! > .pidfile_dev
+ - name: Check if Development App is running
+ run: |
+ chmod +x .github/workflows/scripts/app_health_check.sh
+ .github/workflows/scripts/app_health_check.sh 4321 120
+ - name: Stop Development App
+ if: always()
+ run: |
+ if [ -f .pidfile_dev ]; then
+ kill "$(cat .pidfile_dev)"
+ fi
- - name: Validate Documents
- run: graphql-inspector validate './src/GraphQl/**/*.ts' './talawa-api/schema.graphql'
+ Docker-Start-Check:
+ name: Check if Talawa Admin app starts in Docker
+ runs-on: ubuntu-latest
+ needs: [Code-Quality-Checks, Test-Application]
+ if: github.actor != 'dependabot'
+ steps:
+ - name: Checkout the Repository
+ uses: actions/checkout@v4
+
+ - name: Set up Docker
+ uses: docker/setup-buildx-action@v3
+ with:
+ driver-opts: |
+ image=moby/buildkit:latest
+ - name: Build Docker image
+ run: |
+ set -e
+ echo "Building Docker image..."
+ docker build -t talawa-admin-app .
+ echo "Docker image built successfully"
+ - name: Run Docker Container
+ run: |
+ set -e
+ echo "Started Docker container..."
+ docker run -d --name talawa-admin-app-container -p 4321:4321 talawa-admin-app
+ echo "Docker container started successfully"
+ - name: Check if Talawa Admin App is running
+ run: |
+ chmod +x .github/workflows/scripts/app_health_check.sh
+ .github/workflows/scripts/app_health_check.sh 4321 120 true
+ - name: Stop Docker Container
+ if: always()
+ run: |
+ docker stop talawa-admin-app-container
+ docker rm talawa-admin-app-container
+
+ Test-Docusaurus-Deployment:
+ name: Test Deployment to https://docs-admin.talawa.io
+ runs-on: ubuntu-latest
+ needs: [Docker-Start-Check, Start-App-Without-Docker]
+ # Run only if the develop-postgres branch and not dependabot
+ if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.base.ref == 'develop-postgres' }}
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: yarn
+ cache-dependency-path: 'docs/'
+ # Run Docusaurus in the ./docs directory
+ - name: Install dependencies
+ working-directory: ./docs
+ run: yarn install --frozen-lockfile
+ - name: Test building the website
+ working-directory: ./docs
+ run: yarn build
Check-Target-Branch:
if: ${{ github.actor != 'dependabot[bot]' }}
@@ -259,7 +427,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check if the target branch is develop
- if: github.event.pull_request.base.ref != 'develop'
+ if: github.event.pull_request.base.ref != 'develop-postgres'
run: |
- echo "Error: Pull request target branch must be 'develop'. Please refer PR_GUIDELINES.md"
+ echo "Error: Pull request target branch must be 'develop-postgres'. Please refer PR_GUIDELINES.md"
+ echo "Error: Close this PR and try again."
exit 1
+
+ Validate-Coderabbit:
+ name: Validate CodeRabbit Approval
+ runs-on: ubuntu-latest
+ if: github.actor != 'dependabot[bot]'
+ needs: [Test-Docusaurus-Deployment]
+ steps:
+ - name: Checkout Repository
+ uses: actions/checkout@v4
+ - name: Validate CodeRabbit.ai Approval
+ run: |
+ chmod +x $GITHUB_WORKSPACE/.github/workflows/scripts/validate-coderabbit.sh
+ $GITHUB_WORKSPACE/.github/workflows/scripts/validate-coderabbit.sh
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ PR_NUMBER: ${{ github.event.pull_request.number }}
+ GITHUB_REPOSITORY: ${{ github.repository }}
diff --git a/.github/workflows/push-deploy-website.yml b/.github/workflows/push-deploy-website.yml
new file mode 100644
index 0000000000..e03dab9840
--- /dev/null
+++ b/.github/workflows/push-deploy-website.yml
@@ -0,0 +1,57 @@
+##############################################################################
+##############################################################################
+#
+# NOTE!
+#
+# Please read the README.md file in this directory that defines what should
+# be placed in this file
+#
+##############################################################################
+##############################################################################
+
+name: PUSH Workflow - Website Deployment
+
+on:
+ push:
+ branches:
+ - 'develop-postgres'
+
+env:
+ CODECOV_UNIQUE_NAME: CODECOV_UNIQUE_NAME-${{ github.run_id }}-${{ github.run_number }}
+
+jobs:
+ Deploy-Docusaurus:
+ name: Deploy https://docs-admin.talawa.io website
+ runs-on: ubuntu-latest
+ # Run only if the develop-postgres branch and not dependabot
+ if: ${{ github.actor != 'dependabot[bot]' }}
+ environment:
+ # This "name" has to be the repos' branch that contains
+ # the current active website. There must be an entry for
+ # the same branch in the PalisadoesFoundation's
+ # "Code and automation > Environments > gigithub-pages"
+ # menu. The branch "name" must match the branch in the
+ # "on.push.branches" section at the top of this file
+ name: develop-postgres
+ url: https://docs-admin.talawa.io
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: yarn
+ cache-dependency-path: 'docs/'
+ - uses: webfactory/ssh-agent@v0.9.0
+ with:
+ ssh-private-key: ${{ secrets.DEPLOY_GITHUB_PAGES }}
+ - name: Deploy to GitHub Pages
+ env:
+ USE_SSH: true
+ GIT_USER: git
+ working-directory: ./docs
+ run: |
+ git config --global user.email "actions@github.com"
+ git config --global user.name "gh-actions"
+ yarn install --frozen-lockfile
+ yarn deploy
+
diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml
index 950d063fac..7f7328b38c 100644
--- a/.github/workflows/push.yml
+++ b/.github/workflows/push.yml
@@ -9,7 +9,7 @@
##############################################################################
##############################################################################
-name: push workflow
+name: PUSH Workflow - All Branches
on:
push:
@@ -53,10 +53,10 @@ jobs:
run: npm install
- run: npm run test -- --watchAll=false --coverage
- name: Present and upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}}
- uses: codecov/codecov-action@v4
+ uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
+ gcov_ignore: 'docs/'
fail_ci_if_error: false
name: '${{env.CODECOV_UNIQUE_NAME}}'
-
diff --git a/.github/workflows/scripts/app_health_check.sh b/.github/workflows/scripts/app_health_check.sh
new file mode 100644
index 0000000000..8d102347a0
--- /dev/null
+++ b/.github/workflows/scripts/app_health_check.sh
@@ -0,0 +1,75 @@
+#!/bin/bash
+
+# This script performs a health check to ensure an application is running on a specified port.
+# The script uses netcat (nc) to check if the port is open, with a configurable timeout.
+# It also includes optional logic to fetch Docker container logs if the health check fails during a Docker-based test.
+
+# Variables:
+# port="$1" - The port to check (passed as the first argument to the script).
+# timeout="${2:-120}" - The maximum time in seconds to wait for the application to start. Defaults to 120 seconds if not provided.
+# is_docker_test="${3:-false}" - A flag to indicate whether the script is being run in a Docker-based test. Defaults to false.
+
+# Logic:
+# 1. Print a message indicating the start of the health check.
+# 2. Enter a loop to repeatedly check if the port is open using `nc -z localhost "${port}"`.
+# - If the port is not open and the timeout has not expired, sleep for 1 second and decrement the timeout.
+# - Print a status message every 10 seconds with the remaining time.
+# 3. If the timeout expires, print an error message and, if in Docker test mode, fetch Docker logs for debugging.
+# 4. If the port is detected as open, print a success message and exit.
+
+# Script:
+
+port="$1"
+timeout="${2:-120}"
+is_docker_test="${3:-false}"
+
+
+# Validate required port parameter
+if [ -z "${port}" ] || ! [[ "${port}" =~ ^[0-9]+$ ]] || [ "${port}" -lt 1 ] || [ "${port}" -gt 65535 ]; then
+ echo "Error: Invalid or missing port number. Must be between 1-65535"
+ exit 1
+fi
+
+# Validate timeout parameter
+if ! [[ "${timeout}" =~ ^[0-9]+$ ]] || [ "${timeout}" -lt 1 ]; then
+ echo "Error: Invalid timeout value. Must be a positive integer"
+ exit 1
+fi
+
+# Validate is_docker_test parameter
+if [ "${is_docker_test}" != "true" ] && [ "${is_docker_test}" != "false" ]; then
+ echo "Error: is_docker_test must be either 'true' or 'false'"
+ exit 1
+fi
+
+echo "Starting health check with ${timeout}s timeout"
+while [ "${timeout}" -gt 0 ]; do
+ if nc -z localhost "${port}" 2>/dev/null; then
+ break
+ elif [ $? -ne 1 ]; then
+ echo "Error: Failed to check port ${port} (nc command failed)"
+ exit 1
+ fi
+ sleep 1
+ timeout=$((timeout-1))
+ if [ $((timeout % 10)) -eq 0 ]; then
+ echo "Waiting for app to start on port ${port}... ${timeout}s remaining"
+ # Try to get more information about the port status
+ netstat -an | grep "${port}" || true
+ fi
+done
+
+if [ "${timeout}" -eq 0 ]; then
+ echo "Error: Timeout waiting for application to start on port ${port}"
+ echo "System port status:"
+ netstat -an | grep "${port}" || true
+ if [ "${is_docker_test}" = "true" ]; then
+ echo "Fetching Docker container logs..."
+ if ! docker logs talawa-admin-app-container; then
+ echo "Error: Failed to fetch logs from container talawa-admin-app-container"
+ fi
+ fi
+ exit 1
+fi
+echo "App started successfully on port ${port}"
+
diff --git a/.github/workflows/scripts/code_coverage_disable_check.py b/.github/workflows/scripts/code_coverage_disable_check.py
new file mode 100644
index 0000000000..1a55c3f720
--- /dev/null
+++ b/.github/workflows/scripts/code_coverage_disable_check.py
@@ -0,0 +1,167 @@
+"""Code Coverage Disable Checker Script.
+
+Methodology:
+
+ Recursively analyzes TypeScript files in the specified directories or
+ checks specific files
+ to ensure they do not contain code coverage disable statements.
+
+ This script enforces proper code coverage practices in the project.
+
+NOTE:
+ This script complies with our python3 coding and documentation standards.
+ It complies with:
+
+ 1) Pylint
+ 2) Pydocstyle
+ 3) Pycodestyle
+ 4) Flake8
+ 5) Python Black
+
+"""
+
+import os
+import re
+import argparse
+import sys
+
+
+def has_code_coverage_disable(file_path):
+ """
+ Check if a TypeScript file contains code coverage disable statements.
+
+ Args:
+ file_path (str): Path to the TypeScript file.
+
+ Returns:
+ bool: True if code coverage disable statement is found, False
+ otherwise.
+ """
+ code_coverage_disable_pattern = re.compile(
+ r"""//?\s*istanbul\s+ignore(?:\s+(?:next|-line))?[^\n]*|
+ /\*\s*istanbul\s+ignore\s+(?:next|-line)\s*\*/""",
+ re.IGNORECASE,
+ )
+ try:
+ with open(file_path, "r", encoding="utf-8") as file:
+ content = file.read()
+ return bool(code_coverage_disable_pattern.search(content))
+ except FileNotFoundError:
+ print(f"File not found: {file_path}")
+ return False
+ except PermissionError:
+ print(f"Permission denied: {file_path}")
+ return False
+ except (IOError, OSError) as e:
+ print(f"Error reading file {file_path}: {e}")
+ return False
+
+
+def check_code_coverage(files_or_dirs):
+ """
+ Check TypeScript files for code coverage disable statements.
+
+ Args:
+ files_or_dirs (list): List of files or directories to check.
+
+ Returns:
+ bool: True if code coverage disable statement is found, False
+ otherwise.
+ """
+ code_coverage_found = False
+
+ for item in files_or_dirs:
+ if os.path.isdir(item):
+ # If it's a directory, recursively walk through the files in it
+ for root, _, files in os.walk(item):
+ if "node_modules" in root:
+ continue
+ for file_name in files:
+ if (
+ file_name.endswith(".tsx")
+ or file_name.endswith(".ts")
+ and not file_name.endswith(".test.tsx")
+ and not file_name.endswith(".test.ts")
+ and not file_name.endswith(".spec.tsx")
+ and not file_name.endswith(".spec.ts")
+ ):
+ file_path = os.path.join(root, file_name)
+ if has_code_coverage_disable(file_path):
+ print(
+ f"""File {file_path} contains code coverage disable statement."""
+ )
+ code_coverage_found = True
+ elif os.path.isfile(item):
+ # If it's a file, check it directly
+ if (
+ item.endswith(".tsx")
+ or item.endswith(".ts")
+ and not item.endswith(".test.tsx")
+ and not item.endswith(".test.ts")
+ and not item.endswith(".spec.tsx")
+ and not item.endswith(".spec.ts")
+ ):
+ if has_code_coverage_disable(item):
+ print(
+ f"""File {item} contains code coverage disable statement. Please remove it and add the appropriate tests."""
+ )
+ code_coverage_found = True
+
+ return code_coverage_found
+
+
+def arg_parser_resolver():
+ """Resolve the CLI arguments provided by the user.
+
+ Returns:
+ result: Parsed argument object
+ """
+ parser = argparse.ArgumentParser()
+ parser.add_argument(
+ "--directory",
+ type=str,
+ nargs="+",
+ default=[os.getcwd()],
+ help="""One or more directories to check for code coverage disable
+ statements (default: current directory).""",
+ )
+ parser.add_argument(
+ "--files",
+ type=str,
+ nargs="+",
+ default=[],
+ help="""One or more files to check directly for code coverage disable
+ statements (default: check directories).""",
+ )
+ return parser.parse_args()
+
+
+def main():
+ """
+ Execute the script's main functionality.
+
+ This function serves as the entry point for the script. It performs
+ the following tasks:
+ 1. Validates and retrieves the files or directories to check from
+ command line arguments.
+ 2. Checks files or directories for code coverage disable statements.
+ 3. Provides informative messages based on the analysis.
+ 4. Exits with an error if code coverage disable statements are found.
+
+ Raises:
+ SystemExit: If an error occurs during execution.
+ """
+ args = arg_parser_resolver()
+ files_or_dirs = args.files if args.files else args.directory
+ # Check code coverage in the specified files or directories
+ code_coverage_found = check_code_coverage(files_or_dirs)
+
+ if code_coverage_found:
+ print("Code coverage disable check failed. Exiting with error.")
+ sys.exit(1)
+
+ print("Code coverage disable check completed successfully.")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/.github/workflows/compare_translations.py b/.github/workflows/scripts/compare_translations.py
similarity index 100%
rename from .github/workflows/compare_translations.py
rename to .github/workflows/scripts/compare_translations.py
diff --git a/.github/workflows/countline.py b/.github/workflows/scripts/countline.py
similarity index 100%
rename from .github/workflows/countline.py
rename to .github/workflows/scripts/countline.py
diff --git a/.github/workflows/scripts/eslint_disable_check.py b/.github/workflows/scripts/eslint_disable_check.py
new file mode 100644
index 0000000000..a24a80949e
--- /dev/null
+++ b/.github/workflows/scripts/eslint_disable_check.py
@@ -0,0 +1,155 @@
+#!/usr/bin/env python3
+# -*- coding: UTF-8 -*-
+"""ESLint Checker Script.
+
+Methodology:
+
+ Recursively analyzes TypeScript files in the specified directory
+ or checks specific files directly to ensure they do not contain
+ eslint-disable statements.
+
+ This script enforces code quality practices in the project.
+
+NOTE:
+ This script complies with our python3 coding and documentation standards.
+ It complies with:
+
+ 1) Pylint
+ 2) Pydocstyle
+ 3) Pycodestyle
+ 4) Flake8
+ 5) Python Black
+
+"""
+import os
+import re
+import argparse
+import sys
+
+
+def has_eslint_disable(file_path):
+ """
+ Check if a TypeScript file contains eslint-disable statements.
+
+ Args:
+ file_path (str): Path to the TypeScript file.
+
+ Returns:
+ bool: True if eslint-disable statement is found, False otherwise.
+ """
+ eslint_disable_pattern = re.compile(
+ r"""\/\/\s*eslint-disable(?:-next-line
+ |-line)?[^\n]*|\/\*\s*eslint-disable[^\*]*\*\/""",
+ re.IGNORECASE,
+ )
+
+ try:
+ with open(file_path, "r", encoding="utf-8") as file:
+ content = file.read()
+ return bool(eslint_disable_pattern.search(content))
+ except FileNotFoundError:
+ print(f"File not found: {file_path}")
+ return False
+ except PermissionError:
+ print(f"Permission denied: {file_path}")
+ return False
+ except (IOError, OSError) as e:
+ print(f"Error reading file {file_path}: {e}")
+ return False
+
+
+def check_eslint(files_or_directories):
+ """
+ Check TypeScript files for eslint-disable statements.
+
+ Args:
+ files_or_directories (list): List of files or directories to check.
+
+ Returns:
+ bool: True if eslint-disable statement is found, False otherwise.
+ """
+ eslint_found = False
+
+ for item in files_or_directories:
+ if os.path.isfile(item):
+ # If it's a file, directly check it
+ if item.endswith(".ts") or item.endswith(".tsx"):
+ if has_eslint_disable(item):
+ print(f"File {item} contains eslint-disable statement. Please remove them and ensure the code adheres to the specified ESLint rules.")
+ eslint_found = True
+ elif os.path.isdir(item):
+ # If it's a directory, walk through it and check all
+ # .ts and .tsx files
+ for root, _, files in os.walk(item):
+ if "node_modules" in root:
+ continue
+ for file_name in files:
+ if file_name.endswith(".ts") or file_name.endswith(".tsx"):
+ file_path = os.path.join(root, file_name)
+ if has_eslint_disable(file_path):
+ print(
+ f"""File {file_path} contains eslint-disable
+ statement."""
+ )
+ eslint_found = True
+
+ return eslint_found
+
+
+def arg_parser_resolver():
+ """Resolve the CLI arguments provided by the user.
+
+ Returns:
+ result: Parsed argument object
+ """
+ parser = argparse.ArgumentParser()
+ parser.add_argument(
+ "--files",
+ type=str,
+ nargs="+",
+ default=[],
+ help="""List of files to check for eslint disable
+ statements (default: None).""",
+ )
+ parser.add_argument(
+ "--directory",
+ type=str,
+ nargs="+",
+ default=[os.getcwd()],
+ help="""One or more directories to check for eslint disable
+ statements (default: current directory).""",
+ )
+ return parser.parse_args()
+
+
+def main():
+ """
+ Execute the script's main functionality.
+
+ This function serves as the entry point for the script. It performs
+ the following tasks:
+ 1. Validates and retrieves the files and directories to check from
+ command line arguments.
+ 2. Recursively checks TypeScript files for eslint-disable statements.
+ 3. Provides informative messages based on the analysis.
+ 4. Exits with an error if eslint-disable statements are found.
+
+ Raises:
+ SystemExit: If an error occurs during execution.
+ """
+ args = arg_parser_resolver()
+
+ # Determine whether to check files or directories based on the arguments
+ files_or_directories = args.files if args.files else args.directory
+ # Check eslint in the specified files or directories
+ eslint_found = check_eslint(files_or_directories)
+
+ if eslint_found:
+ print("ESLint-disable check failed. Exiting with error.")
+ sys.exit(1)
+
+ print("ESLint-disable check completed successfully.")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/.github/workflows/talawa_admin_md_mdx_format_adjuster.py b/.github/workflows/scripts/talawa_admin_md_mdx_format_adjuster.py
similarity index 100%
rename from .github/workflows/talawa_admin_md_mdx_format_adjuster.py
rename to .github/workflows/scripts/talawa_admin_md_mdx_format_adjuster.py
diff --git a/.github/workflows/scripts/validate-coderabbit.sh b/.github/workflows/scripts/validate-coderabbit.sh
new file mode 100644
index 0000000000..e94ed0d6f5
--- /dev/null
+++ b/.github/workflows/scripts/validate-coderabbit.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+echo "Step 1: Fetching all PR reviews..."
+
+response=$(curl -s -f -H "Authorization: token $GITHUB_TOKEN" \
+ "https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER}/reviews?per_page=1000") || {
+ echo "Error: Failed to fetch reviews from GitHub API"
+ exit 1
+}
+
+latest_reviews=$(echo "$response" | jq -c '[.[]] | group_by(.user.login) | map(max_by(.submitted_at))') || {
+ echo "Error: Failed to process reviews JSON"
+ exit 1
+}
+
+if [ "$latest_reviews" = "null" ] || [ -z "$latest_reviews" ]; then
+ echo "Error: Invalid reviews data"
+ exit 1
+fi
+
+echo "Step 2: Checking approval status of 'coderabbitai[bot]'..."
+approval_state=$(echo "$latest_reviews" | jq -r '[.[] | select(.user.login == "coderabbitai[bot]" and .state == "APPROVED")] | length')
+
+if [[ "$approval_state" =~ ^[0-9]+$ ]] && [[ $approval_state -gt 0 ]]; then
+ echo "Success: PR approved by CodeRabbit.ai."
+else
+ echo ""
+ echo "ERROR:"
+ echo ""
+ echo "1) This PR is not approved by CodeRabbit.ai."
+ echo "2) In the 'Add a comment' section at the bottom"
+ echo " of the PR web page, add a comment with the"
+ echo " statement below to restart a review"
+ echo ""
+ echo " @coderabbitai full review"
+ echo ""
+ exit 1
+fi
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index 24667f8e06..c78d285a91 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -13,7 +13,7 @@ name: Mark stale issues and pull requests
on:
schedule:
- - cron: "0 0 * * *"
+ - cron: "0 * * * *"
permissions:
issues: write
@@ -21,11 +21,10 @@ permissions:
jobs:
stale:
-
+ name: Process Stale Issues and PRs
runs-on: ubuntu-latest
-
steps:
- - uses: actions/stale@v8
+ - uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.'
@@ -40,4 +39,4 @@ jobs:
exempt-all-milestones: true
exempt-pr-labels: 'wip'
exempt-issue-labels: 'wip'
- operations-per-run: 30
+ operations-per-run: 50
diff --git a/.husky/pre-commit b/.husky/pre-commit
index 77ecddae25..8a0ce26aa2 100755
--- a/.husky/pre-commit
+++ b/.husky/pre-commit
@@ -1,5 +1,3 @@
-#!/usr/bin/env sh
-. "$(dirname -- "$0")/_/husky.sh"
npm run format:fix
# npm run lint:fix
diff --git a/.nojekyll b/.nojekyll
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/3141 b/3141
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/CODEOWNERS b/CODEOWNERS
index 57dc9c6c80..5ce54cbe03 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -1,2 +1,2 @@
/.github/ @palisadoes
-CODEOWNERS @palisadoes
+# CODEOWNERS @palisadoes
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000000..6b13a712b7
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,15 @@
+FROM node:20.10.0 AS build
+
+WORKDIR /usr/src/app
+
+COPY package*.json ./
+
+RUN npm install
+
+COPY . .
+
+RUN npm run build
+
+EXPOSE 4321
+
+CMD ["npm", "run", "serve"]
\ No newline at end of file
diff --git a/INSTALLATION.md b/INSTALLATION.md
index 5813b7d1cb..3c09f69e33 100644
--- a/INSTALLATION.md
+++ b/INSTALLATION.md
@@ -13,25 +13,9 @@ This document provides instructions on how to set up and start a running instanc
- [Install node.js](#install-nodejs)
- [Install TypeScript](#install-typescript)
- [Install Required Packages](#install-required-packages)
-- [Configuration](#configuration)
- - [Creating .env file](#creating-env-file)
- - [Setting up PORT in .env file](#setting-up-port-in-env-file)
- - [Setting up REACT_APP_TALAWA_URL in .env file](#setting-up-react_app_talawa_url-in-env-file)
- - [Setting up REACT_APP_BACKEND_WEBSOCKET_URL in .env file](#setting-up-react_app_backend_websocket_url-in-env-file)
- - [Setting up REACT_APP_RECAPTCHA_SITE_KEY in .env file](#setting-up-react_app_recaptcha_site_key-in-env-file)
- - [Setting up Compiletime and Runtime logs](#setting-up-compiletime-and-runtime-logs)
-- [Post Configuration Steps](#post-configuration-steps)
- - [Running Talawa-Admin](#running-talawa-admin)
- - [Accessing Talawa-Admin](#accessing-talawa-admin)
- - [Talawa-Admin Registration](#talawa-admin-registration)
- - [Talawa-Admin Login](#talawa-admin-login)
-- [Testing](#testing)
- - [Running tests](#running-tests)
- - [Debugging tests](#debugging-tests)
- - [Linting code files](#linting-code-files)
- - [Husky for Git Hooks](#husky-for-git-hooks)
- - [pre-commit hook](#pre-commit-hook)
- - [post-merge hook](#post-merge-hook)
+- [Installation using Docker](#installation-using-docker)
+ - [Prerequisites](#prerequisites-1)
+ - [Development Setup](#development-setup)
@@ -145,15 +129,47 @@ npm install
The prerequisites are now installed. The next step will be to get the app up and running.
+# Installation using Docker
+
+## Prerequisites
+
+1. Install Docker on your system:
+ - [Docker Desktop for Windows/Mac](https://www.docker.com/products/docker-desktop)
+ - [Docker Engine for Linux](https://docs.docker.com/engine/install/)
+
+### Development Setup
+
+If you prefer to use Docker, you can install the app using the following command:
+
+1. Create a `.env` file as described in the Configuration section
+
+2. Build the Docker Image:
+
+Run the following command to build the Docker image:
+
+````bash
+docker build -t talawa-admin .
+```bash
+
+3. Run the Docker container:
+
+After the build is complete, run the Docker container using this command:
+
+```bash
+docker run -p 4321:4321 talawa-admin
+```bash
+
+The application will be accessible at `http://localhost:4321`
+
# Configuration
It's important to configure Talawa-Admin. Here's how to do it.
You can use our interactive setup script for the configuration. Use the following command for the same.
-```
+```bash
npm run setup
-```
+```bash
All the options in "setup" can be done manually as well and here's how to do it. - [Creating .env file](#creating-env-file)
@@ -161,8 +177,10 @@ All the options in "setup" can be done manually as well and here's how to do it.
A file named .env is required in the root directory of talawa-admin for storing environment variables used at runtime. It is not a part of the repo and you will have to create it. For a sample of `.env` file there is a file named `.env.example` in the root directory. Create a new `.env` file by copying the contents of the `.env.example` into `.env` file. Use this command:
-```
+````
+
cp .env.example .env
+
```
This `.env` file must be populated with the following environment variables for `talawa-admin` to work:
@@ -186,19 +204,25 @@ Add a custom port number for Talawa-Admin development purposes to the variable n
Add the endpoint for accessing talawa-api graphql service to the variable named `REACT_APP_TALAWA_URL` in the `.env` file.
```
+
REACT_APP_TALAWA_URL="http://API-IP-ADRESS:4000/graphql/"
+
```
If you are a software developer working on your local system, then the URL would be:
```
+
REACT_APP_TALAWA_URL="http://localhost:4000/graphql/"
+
```
If you are trying to access Talawa Admin from a remote host with the API URL containing "localhost", You will have to change the API URL to
```
+
REACT_APP_TALAWA_URL="http://YOUR-REMOTE-ADDRESS:4000/graphql/"
+
```
## Setting up REACT_APP_BACKEND_WEBSOCKET_URL in .env file
@@ -206,19 +230,25 @@ REACT_APP_TALAWA_URL="http://YOUR-REMOTE-ADDRESS:4000/graphql/"
The endpoint for accessing talawa-api WebSocket graphql service for handling subscriptions is automatically added to the variable named `REACT_APP_BACKEND_WEBSOCKET_URL` in the `.env` file.
```
+
REACT_APP_BACKEND_WEBSOCKET_URL="ws://API-IP-ADRESS:4000/graphql/"
+
```
If you are a software developer working on your local system, then the URL would be:
```
+
REACT_APP_BACKEND_WEBSOCKET_URL="ws://localhost:4000/graphql/"
+
```
If you are trying to access Talawa Admin from a remote host with the API URL containing "localhost", You will have to change the API URL to
```
+
REACT_APP_BACKEND_WEBSOCKET_URL="ws://YOUR-REMOTE-ADDRESS:4000/graphql/"
+
```
For additional details, please refer the `How to Access the Talawa-API URL` section in the INSTALLATION.md file found in the [Talawa-API repo](https://github.com/PalisadoesFoundation/talawa-api).
@@ -238,7 +268,9 @@ If you want to setup Google reCAPTCHA now, you may refer to the `RECAPTCHA` sect
Copy/paste this `reCAPTCHA site key` to the variable named `REACT_APP_RECAPTCHA_SITE_KEY` in `.env` file.
```
+
REACT_APP_RECAPTCHA_SITE_KEY="this_is_the_recaptcha_key"
+
```
## Setting up Compiletime and Runtime logs
@@ -254,7 +286,9 @@ It's now time to start Talawa-Admin and get it running
Run the following command to start `talawa-admin` development server:
```
+
npm run serve
+
```
## Accessing Talawa-Admin
@@ -262,13 +296,17 @@ npm run serve
By default `talawa-admin` runs on port `4321` on your system's localhost. It is available on the following endpoint:
```
+
http://localhost:4321/
+
```
If you have specified a custom port number in your `.env` file, Talawa-Admin will run on the following endpoint:
```
+
http://localhost:${{customPort}}/
+
```
Replace `${{customPort}}` with the actual custom port number you have configured in your `.env` file.
@@ -290,7 +328,9 @@ It is important to test our code. If you are a contributor, please follow these
You can run the tests for `talawa-admin` using this command:
```
+
npm run test
+
```
## Debugging tests
@@ -298,8 +338,10 @@ npm run test
You can see the output of failing tests in broswer by running `jest-preview` package before running your tests
```
+
npm run jest-preview
npm run test
+
```
You don't need to re-run the `npm run jest-preview` command each time, simply run the `npm run test` command if the Jest Preview server is already running in the background, it'll automatically detect any failing tests and show the preview at `http://localhost:3336` as shown in this screenshot -
@@ -311,7 +353,9 @@ You don't need to re-run the `npm run jest-preview` command each time, simply ru
You can lint your code files using this command:
```
+
npm run lint:fix
+
```
## Husky for Git Hooks
@@ -335,3 +379,4 @@ If you don't want this hook to run, you can manually opt out of this using the `
git pull --no-verify
This is a React page
+```
diff --git a/README.md b/README.md
index cbade9e407..911ba11453 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Talawa Admin
-[💬 Join the community on Slack](https://github.com/PalisadoesFoundation/)
+💬 Join the community on Slack from our [Palisadoes Foundation GitHub Home Page](https://github.com/PalisadoesFoundation)
![talawa-logo-lite-200x200](https://github.com/PalisadoesFoundation/talawa-admin/assets/16875803/26291ec5-d3c1-4135-8bc7-80885dff613d)
diff --git a/config/vite.config.ts b/config/vite.config.ts
index 71ce6c6f47..28cd47ae5a 100644
--- a/config/vite.config.ts
+++ b/config/vite.config.ts
@@ -23,8 +23,9 @@ export default defineConfig({
],
server: {
// this ensures that the browser opens upon server start
- open: true,
- // this sets a default port to 3000
+ open: false,
+ host: '0.0.0.0',
+ // this sets a default port to 4321
port: 4321,
},
});
diff --git a/docs/.gitignore b/docs/.gitignore
new file mode 100644
index 0000000000..7dd4990993
--- /dev/null
+++ b/docs/.gitignore
@@ -0,0 +1,22 @@
+# Dependencies
+/node_modules
+
+# Production
+/build
+
+# Generated files
+.docusaurus
+.cache-loader
+.package-lock.json
+package-lock.json
+
+# Misc
+.DS_Store
+.env.local
+.env.development.local
+.env.test.local
+.env.production.local
+
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
diff --git a/docs/CNAME b/docs/CNAME
new file mode 100644
index 0000000000..2594cfef31
--- /dev/null
+++ b/docs/CNAME
@@ -0,0 +1 @@
+docs-admin.talawa.io
diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 0000000000..cfb8c7133e
--- /dev/null
+++ b/docs/README.md
@@ -0,0 +1,176 @@
+# Talawa Admin Documentation Website
+
+[![N|Solid](static/img/markdown/misc/logo.png)](https://github.com/PalisadoesFoundation/talawa-admin)
+
+# Installation
+
+This document provides instructions on how to set up and start a running instance of the [talawa-admin documentation website](https://docs-admin.talawa.io/) on your local system. The instructions are written to be followed in sequence so make sure to go through each of them step by step without skipping any sections.
+
+# Table of Contents
+
+
+
+- [Developer-Docs Installation](#talawa-admin-installation)
+- [Table of Contents](#table-of-contents)
+- [Prerequisites for Developers](#prerequisites-for-developers)
+ - [Install node.js](#install-nodejs)
+ - [Install the Required Packages](#install-the-required-packages)
+ - [Install Yarn on Windows Using NPM](#install-yarn-on-windows-using-npm)
+ - [Install Yarn on Windows Using msi File](#install-yarn-on-windows-using-msi-file)
+ - [Install Yarn on macOS Using NPM](#install-yarn-on-macos-using-npm)
+ - [Install Yarn on macOS Using Homebrew](#install-yarn-on-macos-using-homebrew)
+ - [Install Yarn on Linux Using NPM](#install-yarn-on-linux-using-npm)
+- [Running the Development Server](#running-the-development-server)
+- [Building Static HTML Pages](#building-static-html-pages)
+
+# Prerequisites for Developers
+
+The contents of the `talawa-admin` repo is used to automatically create [the talawa-admin Documentation website](https://docs-admin.talawa.io/). The automation uses [Docusaurus](https://docusaurus.io/docs/), a modern static website generator.
+
+We recommend that you follow these steps before beginning development work in this repository.
+
+## Install the Required Packages
+
+For the package installation, use only the `yarn` package as `npm` will throw an error. Only `npm` use case here would be to install the `yarn` package. Visit the [Docusaurus installation web page](https://docusaurus.io/docs/installation) if you have any difficulties with the steps below.
+
+The steps are simple:
+
+1. If you have previously installed yarn on your local device run the following command to confirm
+
+```terminal
+$ yarn -version
+```
+
+2. If you don't have yarn installed, follow these steps:
+
+**Note:** Please bear in mind that to install docusaurus in your system, a Node.js version 16.14 or above (which can be checked by running node -v) is required. Other requirements that pertains to the installation of docusaurus can be found [here](https://docusaurus.io/docs/installation)
+
+```console
+$ git clone https://github.com/PalisadoesFoundation/talawa-admin.git
+$ cd talawa-admin
+$ yarn add docusaurus
+```
+
+### Install Yarn on Windows Using NPM
+
+NPM (Node Package Manager) is a package manager included with the Node.js installation. It is used for developing and sharing JavaScript code, but it also provides another method of installing Yarn
+
+1. [Download the Node Windows installer](https://nodejs.org/en/download/)
+1. After choosing the path, double-click to install. Then give access to run the application
+1. Install Yarn by running the following command
+
+```terminal
+$ npm install --global yarn
+```
+
+4. Check Yarn installation
+
+```terminal
+$ yarn -version
+```
+
+### Install Yarn on Windows Using msi File
+
+Here’s how to install the Yarn package manager on Windows
+
+1. [Download the Yarn Windows installer](https://classic.yarnpkg.com/en/docs/install#windows-stable)
+1. After choosing the path, double-click to install. Then give access to run the application
+
+1. Check Yarn installation
+
+```terminal
+$ yarn -version
+```
+
+### Install Yarn on macOS Using NPM
+
+The .pkg installer can be used to install Yarn on macOS. Using the .pkg installer also helps resolve dependencies since it does not require a command line to install Node.js
+
+1. [Click on the macOS Installer option to download the .pkg installer](https://nodejs.org/en/download/)
+2. Run the Node.js installer
+3. Verify Node.js Installation by running the following command in your terminal
+
+```terminal
+$ node -v
+$ npm -v
+```
+
+4. Run the following command to install Yarn
+
+```terminal
+$ sudo npm install --global yarn
+```
+
+5. Verify Yarn Installation
+
+```terminal
+$ yarn --version
+```
+
+### Install Yarn on macOS Using Homebrew
+
+One of the easiest way to install Yarn on macOS is to use the command line installer
+
+1. Install Yarn by running the given command in your terminal
+
+```terminal
+$ brew install yarn
+```
+
+### Install Yarn on Linux Using NPM
+
+Installing Yarn on Linux through NPM can be done via command line installer, this doesn't automatically install Node.js
+
+1. Run the following command in your terminal to install Node and NPM respectively. [Confirm your Linux distro and it's command prompt](https://classic.yarnpkg.com/lang/en/docs/install/#debian-stable)
+
+```terminal
+$ sudo apt install nodejs
+$ sudo apt install npm
+```
+
+2. Verify installation
+
+```terminal
+$ node -v
+$ npm -v
+```
+
+3. Install Yarn with the following command
+
+```terminal
+npm install --global yarn
+```
+
+Finally, after installing yarn and confirming that it is installed in your computer, run the command below to install the packages
+
+```terminal
+$ yarn install
+```
+
+# Running the Development Server
+
+To preview your changes as you edit the files, you can run a local development server that will serve your website and it will reflect the latest changes.
+
+The command to run the server is:
+
+```console
+$ yarn run start
+OR
+$ yarn start
+```
+
+By default, a browser window will open at http://localhost:3000.
+
+This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
+
+# Building Static HTML Pages
+
+**In most cases is unnecessary**. Running the `development server` will be sufficient.
+
+If you need to generate static HTML pages (unlikely), then follow these steps.
+
+```console
+$ yarn run build
+```
+
+This command generates static content into the `/build` directory and can be served using any static contents hosting service.
diff --git a/docs/docs/intro.md b/docs/docs/intro.md
new file mode 100644
index 0000000000..45e8604c8b
--- /dev/null
+++ b/docs/docs/intro.md
@@ -0,0 +1,47 @@
+---
+sidebar_position: 1
+---
+
+# Tutorial Intro
+
+Let's discover **Docusaurus in less than 5 minutes**.
+
+## Getting Started
+
+Get started by **creating a new site**.
+
+Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**.
+
+### What you'll need
+
+- [Node.js](https://nodejs.org/en/download/) version 18.0 or above:
+ - When installing Node.js, you are recommended to check all checkboxes related to dependencies.
+
+## Generate a new site
+
+Generate a new Docusaurus site using the **classic template**.
+
+The classic template will automatically be added to your project after you run the command:
+
+```bash
+npm init docusaurus@latest my-website classic
+```
+
+You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.
+
+The command also installs all necessary dependencies you need to run Docusaurus.
+
+## Start your site
+
+Run the development server:
+
+```bash
+cd my-website
+npm run start
+```
+
+The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.
+
+The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
+
+Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.
diff --git a/docs/docs/tutorial-basics/_category_.json b/docs/docs/tutorial-basics/_category_.json
new file mode 100644
index 0000000000..2e6db55b1e
--- /dev/null
+++ b/docs/docs/tutorial-basics/_category_.json
@@ -0,0 +1,8 @@
+{
+ "label": "Tutorial - Basics",
+ "position": 2,
+ "link": {
+ "type": "generated-index",
+ "description": "5 minutes to learn the most important Docusaurus concepts."
+ }
+}
diff --git a/docs/docs/tutorial-basics/congratulations.md b/docs/docs/tutorial-basics/congratulations.md
new file mode 100644
index 0000000000..04771a00b7
--- /dev/null
+++ b/docs/docs/tutorial-basics/congratulations.md
@@ -0,0 +1,23 @@
+---
+sidebar_position: 6
+---
+
+# Congratulations!
+
+You have just learned the **basics of Docusaurus** and made some changes to the **initial template**.
+
+Docusaurus has **much more to offer**!
+
+Have **5 more minutes**? Take a look at **[versioning](../tutorial-extras/manage-docs-versions.md)** and **[i18n](../tutorial-extras/translate-your-site.md)**.
+
+Anything **unclear** or **buggy** in this tutorial? [Please report it!](https://github.com/facebook/docusaurus/discussions/4610)
+
+## What's next?
+
+- Read the [official documentation](https://docusaurus.io/)
+- Modify your site configuration with [`docusaurus.config.js`](https://docusaurus.io/docs/api/docusaurus-config)
+- Add navbar and footer items with [`themeConfig`](https://docusaurus.io/docs/api/themes/configuration)
+- Add a custom [Design and Layout](https://docusaurus.io/docs/styling-layout)
+- Add a [search bar](https://docusaurus.io/docs/search)
+- Find inspirations in the [Docusaurus showcase](https://docusaurus.io/showcase)
+- Get involved in the [Docusaurus Community](https://docusaurus.io/community/support)
diff --git a/docs/docs/tutorial-basics/create-a-blog-post.md b/docs/docs/tutorial-basics/create-a-blog-post.md
new file mode 100644
index 0000000000..550ae17ee1
--- /dev/null
+++ b/docs/docs/tutorial-basics/create-a-blog-post.md
@@ -0,0 +1,34 @@
+---
+sidebar_position: 3
+---
+
+# Create a Blog Post
+
+Docusaurus creates a **page for each blog post**, but also a **blog index page**, a **tag system**, an **RSS** feed...
+
+## Create your first Post
+
+Create a file at `blog/2021-02-28-greetings.md`:
+
+```md title="blog/2021-02-28-greetings.md"
+---
+slug: greetings
+title: Greetings!
+authors:
+ - name: Joel Marcey
+ title: Co-creator of Docusaurus 1
+ url: https://github.com/JoelMarcey
+ image_url: https://github.com/JoelMarcey.png
+ - name: Sébastien Lorber
+ title: Docusaurus maintainer
+ url: https://sebastienlorber.com
+ image_url: https://github.com/slorber.png
+tags: [greetings]
+---
+
+Congratulations, you have made your first post!
+
+Feel free to play around and edit this post as much as you like.
+```
+
+A new blog post is now available at [http://localhost:3000/blog/greetings](http://localhost:3000/blog/greetings).
diff --git a/docs/docs/tutorial-basics/create-a-document.md b/docs/docs/tutorial-basics/create-a-document.md
new file mode 100644
index 0000000000..c22fe29446
--- /dev/null
+++ b/docs/docs/tutorial-basics/create-a-document.md
@@ -0,0 +1,57 @@
+---
+sidebar_position: 2
+---
+
+# Create a Document
+
+Documents are **groups of pages** connected through:
+
+- a **sidebar**
+- **previous/next navigation**
+- **versioning**
+
+## Create your first Doc
+
+Create a Markdown file at `docs/hello.md`:
+
+```md title="docs/hello.md"
+# Hello
+
+This is my **first Docusaurus document**!
+```
+
+A new document is now available at [http://localhost:3000/docs/hello](http://localhost:3000/docs/hello).
+
+## Configure the Sidebar
+
+Docusaurus automatically **creates a sidebar** from the `docs` folder.
+
+Add metadata to customize the sidebar label and position:
+
+```md title="docs/hello.md" {1-4}
+---
+sidebar_label: 'Hi!'
+sidebar_position: 3
+---
+
+# Hello
+
+This is my **first Docusaurus document**!
+```
+
+It is also possible to create your sidebar explicitly in `sidebars.js`:
+
+```js title="sidebars.js"
+export default {
+ tutorialSidebar: [
+ 'intro',
+ // highlight-next-line
+ 'hello',
+ {
+ type: 'category',
+ label: 'Tutorial',
+ items: ['tutorial-basics/create-a-document'],
+ },
+ ],
+};
+```
diff --git a/docs/docs/tutorial-basics/create-a-page.md b/docs/docs/tutorial-basics/create-a-page.md
new file mode 100644
index 0000000000..20e2ac3005
--- /dev/null
+++ b/docs/docs/tutorial-basics/create-a-page.md
@@ -0,0 +1,43 @@
+---
+sidebar_position: 1
+---
+
+# Create a Page
+
+Add **Markdown or React** files to `src/pages` to create a **standalone page**:
+
+- `src/pages/index.js` → `localhost:3000/`
+- `src/pages/foo.md` → `localhost:3000/foo`
+- `src/pages/foo/bar.js` → `localhost:3000/foo/bar`
+
+## Create your first React Page
+
+Create a file at `src/pages/my-react-page.js`:
+
+```jsx title="src/pages/my-react-page.js"
+import React from 'react';
+import Layout from '@theme/Layout';
+
+export default function MyReactPage() {
+ return (
+ My React page
+
jPQ1os7*AOkb2*LRb{O-+C97i_n
z2I@>^O)#WwMhxr4s;^U&se%2V#g)$UMXcXHU)C<7ih`meC7t?9h6U9|gRL%vjBW=4
zyJ(KaCRlNg`fO6a(x7h==WMvQG|_Skr4D&0<8t`N`#*Y0lJn{f4xjR5Q%h*qiJ!9l
z{{3xuZ%nm38N+XqLO_y}X{{=Z1sg+iy?Wk0(xmzIV8KVwj}M}&csjjc2tOdzyInRf
zj&mB~+`^C>=hnyxW|Ah^U8Pcl0}jx|K^QWjuTpX%S?_Y({asp@tk2!qmNit^7Ky53%ZtMKP6FKlx|zSaeDQD~}Xbf@cZU>-AI+P+