Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #2505 #2637

Conversation

gurramkarthiknetha
Copy link

@gurramkarthiknetha gurramkarthiknetha commented Dec 11, 2024

What kind of change does this PR introduce?

Feature/Refactoring

Issue Number:

Fixes #2505

Did you add tests for your changes?

Yes

Snapshots/Videos:

N/A

If relevant, did you update the documentation?

No

Summary

This PR refactors the CSS structure for the EventVolunteers and its related components. The changes involve merging all CSS files from the subdirectory and related components into the global CSS file. After the merge, the old CSS files were deleted, and the components were updated to reference the global CSS. This improves maintainability and adheres to the updated design patterns.

Does this PR introduce a breaking change?

No, these changes only refactor the existing CSS structure.

Other information

Testing was completed to ensure no UI regressions. All screens were verified for consistency with the updated global CSS styles.

Have you read the contributing guide?

Yes

Summary by CodeRabbit

  • New Features

    • Introduced a new configuration file for YAML language server integration.
    • Added a template for environment variables necessary for local development.
    • Enhanced issue and pull request templates with new sections and updated metadata.
    • Implemented workflows for automated dependency updates, stale issue management, and code quality checks.
    • Added localization support with new JSON files for multiple languages.
  • Bug Fixes

    • Adjusted linting and formatting rules for improved code quality.
  • Documentation

    • Created comprehensive guides for installation, contribution, and issue reporting.
  • Chores

    • Updated various configuration files to support new features and improve maintainability.

DangaRanga and others added 30 commits May 23, 2021 12:21
Updated CONTRIBUTING.md with new branching strategy
…dependabot/npm_and_yarn/dns-packet-1.3.4

Bump dns-packet from 1.3.1 to 1.3.4
* Update authorized-changes-detection.yml

* Code Coverage @ 87.1%

* Update .gitignore

* Delete codecov

This executable should not be in the repo

* added translation hint text in placeholders (#487)

* Update pull-requests.yml

* Create DOCUMENTATION.md

* Rename issue-guidelines.md to ISSUE_GUIDELINES.md

* Update CONTRIBUTING.md

* Update issue.yml

* Rename PR-guidelines.md to PR_GUIDELINES.md

* Update CONTRIBUTING.md

* Update pull-request-target.yml

* Delete PULL_REQUEST_TEMPLATE.md

* Delete ISSUE_TEMPLATE.md

* Rename Code_Style.md to CODE_STYLE.md

* added removeMember mutation (#491)

* added removeMember mutation

* changed mutation name

* remove contributions from router (#502)

* Fixed Settings page Header (#501)

* fixed cani-use lite warning

* fixed the alignments for smaller screens and also added spacing on places where it was needed

* fixed the linting errors

* ran prettier to remove styling errors

* made the orgSetting title dynamic

* linted the code and made the settings header as required and also made the settings page navbar responsive

* linted code and made necessary changes

* errors fixed

* Added dropdown for Applanguage in UserUpdation form (#498)

* Added dropdown for Applanguage in UserUpdation form

* App language code changed to Default language

* Change the Scalar Types [Provides relevant client side changes for #1085 in Talawa-API] (#500)

* Change typedefs

* Fix date parsing

* Move ID to ObjectID scalar

* Client changes for Adding GraphQL Scalars (#511)

* Change typedefs

* Fix date parsing

* Move ID to ObjectID scalar

* Revert ObjectID to ID

* Change ObjectID to ID

* modal closed after organization creation (#516)

* most recently added Org displays at the top (#515)

* Add Husky (#520)

* updated contributing (#521)

* Display and choose Organisation image (#512)

* upload image working for createOrganisation

* Organisation image showing everywhere

* Testcase failure fixed

* Linting fixed

* convertToBase64 func made and tests for it

* CI/CD error fixed

* tests added for AdminNavbar & OrganisationDashboard

* Linting fixed

* fixed translation on the plugin tab (#510)

* added OrgName to the Navbar (#525)

* Fix create event mutation [Fixes part of #1101 in Talawa-API] (#523)

* Add format fix

* Fix updation of posts

* Test coverage improved for organizationPeople.tsx (#526)

* Update INSTALLATION.md

* Update INSTALLATION.md

* Update INSTALLATION.md

* Update stale.yml

* Remove tags (#532)

* Fixed navbar added tests (#534)

* Fixed navbar added tests

* Fixed the translation of All orgnaizations btn in AdminNavbar

* Fix the updateOrg page, and made it to create mutation request [Fixes #531] (#536)

* fix orgUpdate system

* fix translations

* Update CONTRIBUTING.md

* Code Coverage @ 88%

* Fixes #478 : Implemeneted calendar to the Event tab (#537)

* calendar-implemented

* calendar-implemented

* fixed tests

* Added post-merge hook using husky (#541)

* Added post-merge hook using husky

* made required changes to installation.md

* make changes to documentation for husky

* made the required changes in installation guide

* Update pull-requests.yml

* Fixed yarn installation instructions (#584)

* organization sorting for all organization (#619)

* removed redundant notification (#577)

* Profile Page for Members (#543)

* Initial member page made

* Changed query added Org and Events section

* Homescreen ready

* initial translation added for Profile

* initial translation added for Profile

* Added translations

* Added translations

* Revised translation

* Fixed failing tests for components

* Link added to OrgAdminListCard

* Linting fixed for OrgPeopleListCard

* Added tests, removed logs

* Uniform design

* Fix:routing issue for orgdash page (#580)

* Fix:routing issue for orgdash page

* fix:failing test of SuperDashListCard

* Rectify Warnings: EventListCard.test.tsx (#595)

* Added logic to close modal after successful submission (#623)

* Feature Request: Position of the search bar.  (#631)

* Feature Request: Position of the search bar #614 resolved

* Feature Request: Position of the search bar #614 resolved

* fixes: #550 added test for the calendar (#552)

* added test for the calendar

* updates mocks

* Update Router Function [Fixes #636] (#638)

* Update Router Function

* Empty commit

* Fix about content overflow (#632)

Signed-off-by: Ekene Nwobodo <Nwobodoe71@gmail.com>

* removed duplicate rows per page section in orgposts (#648)

* fixed :made card in organization dashboard interactive (#620)

* Implemented manage functionality for admin and super admin after login (#539)

* Implememnted manage functinality for admin/superadmin after login

* Update AdminDashListCard.module.css

* Some formatting issues with module file

* resolved workflow issues

* Added folding feature to posts (#581)

* added folding feature to posts

* added fold feature to posts

* brought code under code coverage

* added tests

* added tests for remainging uncovered lines

* brought code coverage to 100% for the changes

* Code coverage @87.2%

* Fix User Update Details Page and Add Update Password Page [Fixes #530] (#657)

* fixed updateuser logic

* update translations

* fix lint

* lint fix 2

* fix tests

* fixed:move orgLocation & remove duplicate orgName (#655)

* fixed:move orgLocation & remove duplicate orgName

* Dummy commit

* fixes - [#597] - Navbar navlinks hover and button styles  (#603)

* fixed: #585 - Password error showing. Tested

* fix: #590 - fixed navbar hover issues

* fix: #590 - fixed navbar hover issues

* Code Coverage 87.4%

* fixes 599 (#653)

* fixed errors and removed window.replace

* written test case for ensure window.location.replace

* written test case for ensure window.location.replace

* added useHistory to keep track of routing behind the scenes

* fixed merge conflicts and errors

* updated comments for file changes

* Added warning comments for routing

---------

Co-authored-by: Adepeju <adepeju.kayode@gmail>

* fix org search location (#682)

Signed-off-by: Ekene Nwobodo <Nwobodoe71@gmail.com>

* fixed the issue of validate the input before submit #674 (#678)

* Adds required tests for OrganizationEvents.tsx and Fixes a minor bug in Calendar (#527)

* adds tests for organization events

* removes the unrequired branch from OrganizationEvents.tsx

* fixes failing tests

* fixes failing lint tests

* Update password preview feature with coverage tests (#629)

* Fix to the issue #585 (#607)

* [fix]- fixed the password error warning

* [fix]- fixed the password error warning

* [fix]- fixed the password error warning

* [fix]-fixed the password error warning

* [fix]-fixed the password error warning

* [fix]-fixed the password error warning

* [fix]-fixed the password error warning

* [feat]-added test cases for password error warning

* [feat]- added test cases for password error warning

* [feat]- added test cases for password error warning

* [fix]- fixed the linting

* Improve test coverage for calendar.tsx (#679)

* Improve test coverage for calendar.tsx

* Restore previous tests

* remove --coverage

* i rebased my codebase and resolved the initial issue (#669)

* fixed the issue use of toast in place of window.alert #645 (#687)

* Update ISSUE_GUIDELINES.md

* fixed the static time data under Organization card in the Organization List tab (#689)

* fixed the static time in org card

* formatted the date to MM D, YYYY

---------

Co-authored-by: thesaaddevloper <thesaaddeveloper@gmail.com>

* Fixed the pagination alignment issue (#702)

* [fix]- fixed the password error warning

* [fix]- fixed the password error warning

* [fix]- fixed the password error warning

* [fix]-fixed the password error warning

* [fix]-fixed the password error warning

* [fix]-fixed the password error warning

* [fix]-fixed the password error warning

* [feat]-added test cases for password error warning

* [feat]- added test cases for password error warning

* [feat]- added test cases for password error warning

* [fix]- fixed the linting

* [fix]- fixed the pagination alignment issue

* [fix]- fixed the pagination alignment issue

* [fix]- fixed the pagination alignment issue

* Removed overlapping (#675)

* changes input element to textarea and changes in test (#710)

* Code Coverage @90.7%

* Indicating active tabs (#691)

* added underline to active links in navbar

* fixed lint error

* fixed the org default image #688 and removed stock image (#695)

* fixed the org default image #688 and removed stock image

* removed eslint warning

* added new img as default org img

* Update INSTALLATION.md

* Added Clear Error and Warn Messages when API is unavailable (#670)

* Added error and warn messages

* Added tests & fixed inconsistency in mocks

* Lint fix LoginPage

* Lint Fix LoginPage.test

* minor fix

* Minor update to LoginPage

* Minor change to LoginPage.test

* Replaced toast.warn() with toast.error()

* Fixed test accordingly

* Lint Fix

* Minor fix

* Extra edge case handled

* code coverage fix

* Lint fix

* Update LoginPage

* Update LoginPage.test

* Lint fix

* improve test coverage for orgpost.tsx (#718)

* Improve test coverage for calendar.tsx

* Restore previous tests

* remove --coverage

* improve test for orgpost.tsx

* Implemented Proper Error Handling for all Screens [Fixes: #535] (#731)

* Handled error cases for all screens

* Some more fixes

* Some more fixes

* Added StaticMockLink to use Mocks multiple times [Fixes Multiple Issues] (#745)

* add StaticMockLink

* lint fix

* remove showWarning

* Added prompt to Register on Login Page (#628)

* Add prompt to Login page
- Add prompt in other languages: fr, sp, hi, zh.
- switch styling of Login Button with Reg Button

* format with prettier

* fixed event checkboxes to update (#707)

* Block/Unblock functionality for only members of the organization (#690)

* Implememnted manage functinality for admin/superadmin after login

* Update AdminDashListCard.module.css

* Some formatting issues with module file

* resolved workflow issues

* Updated block/unblock page preventing users who are not members of organiztion

* Update BlockUser.test.tsx to resolve failing tests

Modified the mocks fields according to the corresponding changes in BlockUser.tsx file.

* created a reusable postNotFound Component with responsive UI (#717)

* created a reusable postNotFound Component with responsive UI

* run test error solved

* added translation to the component and also created the test.tsx for the error component

* fixed the failing test and added the postNotFound reusable component for OrgList

---------

Co-authored-by: thesaaddevloper <thesaaddeveloper@gmail.com>

* fix: #601 modal responsive width (#621)

* added dynamic title to OrgPeople section (#704)

* added dynamic title to OrgPeople section

* fixed code coverage

* fixed code coverage

* uncommented the mistakenly added code

* Delete er

* Updated session timeout notification toast with already existing one (#734)

* Added a toast to notify users that session has expired and redirects to the login page

* Updated toast notification on session timeout  with already existing one

* eliminated the use of  magic numbers

* minor error correction on the timeout minutes

---------

Co-authored-by: TheoCathy <theocathyne@gmail.com>

* Fixed the empty space in the OrgList (#751)

* created a reusable postNotFound Component with responsive UI

* run test error solved

* added translation to the component and also created the test.tsx for the error component

* fixed the failing test and added the postNotFound reusable component for OrgList

* fixed the empty space in orgList

* fixed the failing test

* removed the unwanted files

---------

Co-authored-by: thesaaddevloper <thesaaddeveloper@gmail.com>

* align navbar items (#755)

* align navbar items

* replace More with a hamburger icon

* replace More with a hamburger icon to fix workflow error

* replace More with a hamburger icon to fix workflow error

* Fixes: toggle password for registration  (#758)

* added toggle-password

* updated

* formatting

* added icon for toggle password

* Super Admin Dashboard Error When Organizations Absent (#754)

* No Organization Warning on OrgList

* Minor Fix

* Fixed failing tests

* Added Warning on Roles and Request Pages

* Added Tests for OrgList

* Testing Fixes

* Added more tests

* Added Tests for Roles and Request Pages

* Code Coverage @ 91.0%

* Add link to dashboard admin card (#760)

* image upload made functional (#677)

* image upload made functional

* lint

* fixed failing test

* linting

* re run test , remove yarn.lock changes

* updateUser test cov

* OrgPost

* rerun tests

* Empty commit

* reverted last 2 commits changes

* re run code cov

* update userUpdate

* rerun code cov again

* revert last commit

* Update PR_GUIDELINES.md

* Implemented Search bar and the radio buttons in orgPost page that searches both title and text of post (#770)

* created a reusable postNotFound Component with responsive UI

* run test error solved

* added translation to the component and also created the test.tsx for the error component

* fixed the failing test and added the postNotFound reusable component for OrgList

* fixed the empty space in orgList

* fixed the failing test

* removed the unwanted files

* the one search bar which searches both text and title of post

* testing file

* orpost file testing

* code coverage is increased

* fixed the failing test

---------

Co-authored-by: thesaaddevloper <thesaaddeveloper@gmail.com>
Co-authored-by: saadabban76 <�115649011+saadabban76@users.noreply.github.com>

* center org image on mobile (#778)

Signed-off-by: Ekene Nwobodo <Nwobodoe71@gmail.com>

* removed link for plugin dropdown toggle (#781)

* removed link for plugin dropdown toggle

* added id

* align superadmin nav items and fix failed tests (#766)

* changed the handleSearchByName function in searchByName in Roles page (#735)

* changed the handleSearchByName function to search using target's value instead of searchByName variable

* updated the file Roles.tsx to take care of useState lag

* changed tests for suiting searchByName

* changed tests for searchByName including backspaces

* added tests for paginationList and changing rowsPerPage

* added tests to increase coverage in Roles.tsx

* changed the package.json file's test command

* removed extra scrollbars (#800)

* Recently added Post displays at top (#773)

* Recently added Post displays at top

* reversed the posts as required in the query

* Increased the OrgList Code Coverage (#786)

* increased the orgList coverage to 95$

* increased the orgList Code Coverage

* increased the orgList Code Coverage

* increased the orgList Code Coverage

* fixed image rendering in orgPost page

* increased the code coverage for orgList Component

* increased code coverage to 97% in orgList Component

---------

Co-authored-by: saadabban76 <�115649011+saadabban76@users.noreply.github.com>

* Modify event visibility for non-admins (#796)

* Modify event visibility for non-admins

Signed-off-by: Ekene Nwobodo <Nwobodoe71@gmail.com>

* Add test suites for events visibilty

---------

Signed-off-by: Ekene Nwobodo <Nwobodoe71@gmail.com>

* Bug Fix: Drawer menu visibility (#794)

* Remove filter by event field (#807)

* increased the orgList coverage to 95$

* increased the orgList Code Coverage

* increased the orgList Code Coverage

* increased the orgList Code Coverage

* fixed image rendering in orgPost page

* increased the code coverage for orgList Component

* increased code coverage to 97% in orgList Component

* removed the filter by event section in orgPeople's component

* fixed the failing test

---------

Co-authored-by: saadabban76 <�115649011+saadabban76@users.noreply.github.com>

* Add image to post (#804)

* increased the orgList coverage to 95$

* increased the orgList Code Coverage

* increased the orgList Code Coverage

* increased the orgList Code Coverage

* fixed image rendering in orgPost page

* increased the code coverage for orgList Component

* increased code coverage to 97% in orgList Component

* added Image to the post's card

* replaced external links with codebase default image

* replaced external links with codebase default image

* replaced blank image with the default image

* fixed the failing test

---------

Co-authored-by: saadabban76 <�115649011+saadabban76@users.noreply.github.com>

* Update pull-request-target.yml

* Update pull-request-target.yml

* Update pull-request-target.yml

* Update pull-request-target.yml

* Update pull-request-target.yml

* Update pull-request-target.yml

* Upgrade Yarn to NPM in Talawa Admin Project (#802)

* npm upgrade

* remove package lock

* Update push.yml

* empty

* upgrade yarn to npm

* fix docs

* fix scripts

* empty

* stop watch mode

* fix ymls

* empty

* fix scripts

* empty commit

* update scripts

* Redirect to dashboard on organization update (#816)

* Redirect to dashboard on organization update

* Minor Change

* Proper Testing Of Pagination In All List Views (#797)

* install faker package used for mocks in tests

* Test init for pagination

* install dependencies needed to implement certain tests

* add a data-testid attribute to their markup for use in tests

* add data-testid attributes to its markup being referenced from tests

* add test to ensure the number of organization displayed on the page corresponds to the option selected from rowsPerPage

* add prop to allow rendering of component in test environment

* add data-testid attributes to their markup being referenced from tests

* add data-testid attributes to its markup being referenced from tests

* add test to affirm that the number of persons displayed on the webpage is same with the selected option from rowsPerPage

* install dependencies for certain tests

* fix lint errors

* tests fix

* remove unnecessary dependencies

* lint fix

* tests fix update

* restore file to previous state

* empty commit

* tests fix update

* lint fix

* Conditional Usage of Google reCAPTCHA [Fixes #798] (#820)

* conditonal recaptcha

* Update INSTALLATION.md

* add tests

* fixed the issue of Mismatched passwords validation #722 (#824)

* fixed the issue of Mismatched passwords validation #722

* fixed lint code error

* Code Coverage @ 92%

* Replace Talawa Portal with Talawa Admin Portal #817 (#821)

* Update website title to Talawa Admin Portal in en

* Update website title in fr json file

* Update website title in sp json file

* Update website title in zh json file

* Update website title in hi json file

* Update the test in ListNavbar file

* Update the test in LoginPage.test file

* Create a function for the tex macher to make test

* Fix lint errors in the LandingPage test file

* Remove console.log in LandingPage test file

* Upgrade to use npm instead of yarn

* Delete yarn.lock file

* Fix lint errors

* Fix lint errors

* Update the heading in hi.json file

* Remove unused codes

* Fix lint error in LanfingPage file

* Correct the talawa_portal value in Fr json file

* Correct the talawa_portal value in sp json file

* Remove anused package in package.json file

* Organization Form Redirect Issue Prevents User Navigation, Affecting User Experience.  Issue #808 (#815)

* addressing issue #808

* finished - requested changes

* addressing warning

* Added:  event preview modal to view event details (#772)

* added event preview model

* added event preview model

* fixed formatting

* added test

* added test

* added test

* failing tests

* test

* tests

* Update workflow (#832)

* Workflow fix (#833)

* Update pull-requests.yml

* Update pull-requests.yml

* Update pull-requests.yml

* Code Coverage @ 91.0%

* Feature: Separation of ADMIN and SUPERADMIN functionalities (#826)

* Initial changes

* Commit to sync repo

* Made changes to OrgList

* Some fixes

* Minor fix

* Added tests for OrgList

* Added tests for OrgList

* Coverage fix

* Required changes added

* Made changes to OrgList

* Some fix

* Some fixes

* fixes test for OrgList

* Some more fixes

* Empty commit

* Lint fix

* Fixed test

* Lint fix

* Added Whitespace Validation to Organization and Post create forms (#838)

* Added whitespace check in Org Create form

* Added Tests

* Added Empty String check to OrgPost Form

* Added Tests for OrgPost

* fixed the issue of Toast msg is not available in all languages #740 (#845)

* fixed the issue of Toast msg is not available in all languages #740

* format issue

* Empty-Commit

* Fixed Org Update (#843)

* Prevent Admins and Super Admins from downgrading their own roles (#840)

* Code Cleanup

* Disabled Super Admins from changing their roles

* Added Tests

* Added more tests

* Improved Code Quality

* Revert "Fixed Org Update (#843)" (#847)

This reverts commit 53c3fef28ef986d63b1eec45663acb7d07cf1b8d.

* Fixed Organization Update and Translation (#849)

* Fixed Organization Update

* Minor Changes

* Success message updated

* Fail tests on warning [Priority Needed] (#856)

* fix warnings

Signed-off-by: Ansh Goyal <anshgoyal1704@gmail.com>

* fix warnings

Signed-off-by: Ansh Goyal <anshgoyal1704@gmail.com>

* fix warnings

Signed-off-by: Ansh Goyal <anshgoyal1704@gmail.com>

* fix warnings

Signed-off-by: Ansh Goyal <anshgoyal1704@gmail.com>

* fix warnings

Signed-off-by: Ansh Goyal <anshgoyal1704@gmail.com>

* restore addonregister

Signed-off-by: Ansh Goyal <anshgoyal1704@gmail.com>

---------

Signed-off-by: Ansh Goyal <anshgoyal1704@gmail.com>

* Code duplicacy removed (#852)

* Code duplicacy removed

* Tests added

* Added comments

* Fixed failing tests

* Code formatted

* Unused packages removed, flag icons package updated to latest version (#860)

* Unused packages removed, flag icons updated to latest version

* Empty commit

* Changes in package-lock.json

* Fixes #848: limiting mulitple toast (#851)

* limiting-toast

* added test

* Organization People Filters Improved (#855)

* Added Filters to Users and Organizations Query

* Added Last Name Filter on User, Member and Admin

* Added Translation

* Fixed Failing Tests

* Added Tests for Filters

* Fixed Failing Tests

* Code Cleanup

* Fixed Tests

* Added Translation

* remove graphql-boost dep (#866)

Signed-off-by: Ansh Goyal <anshgoyal1704@gmail.com>

* added UserNotFound component to the Roles page and improved the search (#865)

* changed the handleSearchByName function to search using target's value instead of searchByName variable

* updated the file Roles.tsx to take care of useState lag

* changed tests for suiting searchByName

* changed tests for searchByName including backspaces

* added tests for paginationList and changing rowsPerPage

* added tests to increase coverage in Roles.tsx

* changed the package.json file's test command

* changed PostNotFound component to be used as a reusable one and added it in Roles section and set languages option in locales folder

* changed formatting in locales changed files

* removed comments in Roles.tsx

* Empty commit

* renamed the PostNotFound component and modifiied relevant files

* changed Roles.tsx filtering

* empty commit

* reverted changes in package.json

* Improved signupform validations (#828)

* Improved signupform validations

* updated signup form validation to show all messages at once

* improved test coverage for LoginPage

* Fixed failing test

---------

Co-authored-by: Joyce Malicha <joycejattane@gmail.com>

* added tests for Search Bar in the Organization List Page of SUPERADMIN #827 (#867)

* added tests for Search Bar in the Organization List Page of SUPERADMIN #827

* added tests for Search Bar in the Organization List Page of SUPERADMIN #827

* Added Tests Previews (#868)

* Installed jest-preview

* Automatic Setup

* Fiixed Failing Test Command

* Added Basic CSS

* Added PostCSS Module

* Fixed MUI Styling

* Minor Changes

* Added cross-env to support windows

* Adaptar for React 17 and CSS Modules Mock

* Added Mocked Styles to Tests

* Documentatin Updated

* Fixed Failing Tests

* Minorr change in documentation

* Jest is now Dev Dependency

* Workflow Test

* Jest Module Path Updates

* Module Path Tese 2

* Github Workflow Fixed

* Removed Legacy Test Command

* Added Documentation to Debug Tests

* Fixed Documentation

* Docs Image Added To Repo

* Images Reorganization

* Organized Images

* Revert "Improved signupform validations (#828)" (#875)

This reverts commit 5820dd9ec05256551b48470c8880fcdc05452fda.

* Restored SearchBar Test for OrgList Page (#878)

* Restored searchBar test

* Lint fix

* Coverage fix

* Lint fix

* Some fixes

* Some fixes

* fixed the issue of Users filter to fetch corresponding Users to Organisation #701 (#853)

* fixed the issue of Users filter to fetch corresponding Users to Organisation #701

* removedd uunused variable

* fixed failing text

* fixed merged issue

* fixed lint error

* swap variable

* Revert "Restored SearchBar Test for OrgList Page (#878)" (#879)

This reverts commit 3d39c524d54e81853490d2d8a1f844ce67252365.

* Fixed crashing on error in Block/Unblock page (#862)

* Website crash fixed

* lint fixed

* Added tests for empty response from server

* More tests added

* Rerun tests empty commit

* Redirect on error functioning

* Fixed failing tests

* Testcase and Title added when users not found

* Linting fixed

* Typo fixed

* Fixed failing tests

* Linting fixed

* Added NotFound component in OrgPeople and changed Roles.tsx  (#882)

* changed the handleSearchByName function to search using target's value instead of searchByName variable

* updated the file Roles.tsx to take care of useState lag

* changed tests for suiting searchByName

* changed tests for searchByName including backspaces

* added tests for paginationList and changing rowsPerPage

* added tests to increase coverage in Roles.tsx

* changed the package.json file's test command

* changed PostNotFound component to be used as a reusable one and added it in Roles section and set languages option in locales folder

* changed formatting in locales changed files

* removed comments in Roles.tsx

* Empty commit

* renamed the PostNotFound component and modifiied relevant files

* changed Roles.tsx filtering

* empty commit

* reverted changes in package.json

* added NotFound component in OrgPeople, made changes in the locales files and made some changes to Roles too

* added NotFound component to OrgPeople, changerd locales files and changed Roles.tsx

* minor change

* Restored Search-Bar Test for OrgList Page (#880)

* Restored searchBar test

* Lint fix

* Coverage fix

* Lint fix

* Some fixes

* Some fixes

* Fixed Org Dashboard Error (#873)

* Fixed TypeError

* Minor Change

* Fixed Tests

* Added back logo512

* Fixed auth header getting copied on login (#890)

* fix user update  (#876)

* fix user detials update

* remove userType from update-user page

* fix failed test for userUpdate.test.tsx

* Removed and Replaced Ant Design from the project (#891)

* Fixed auth header getting copied on login

* Removed/Replaced  Ant Design from the project

* Fixed failing tests

* Removed comment

* Add today functionality in calendar (#897)

* Update countline.py

* Update pull-requests.yml

* Updated countlines.py to cover .spec. files (#900)

Co-authored-by: Peter Harrison <peter@colovore.com>

* fixed the Inability to set user roles for specific organizations #556 (#898)

* fixed the Inability to set user roles for specific organizations #556

* added all language translation

* Revert "fixed the Inability to set user roles for specific organizations #556 (#898)" (#901)

This reverts commit 891d898eb5543116bb9042a6386b5a12e474159c.

* Documentation updated, Redundant css files removed (#896)

* Doc updated unused files removed

* Removed unused css files from setup tests

* Added small calendar in the events #887  (#903)

* added small clanedar

* added small clanedar

* fixed Code Coverage: Create tests for OrgSettings.tsx #396 (#905)

* remove redundancy from orgPostCard (#906)

* Revert "remove redundancy from orgPostCard (#906)" (#910)

This reverts commit d5ce4aa27ee241b0687f7db3d6acd1b62339562f.

* Block/Unblock Page Improvements (#885)

* Added Radio Buttons

* Optimized Queries

* Optimized Query and Added Last Name Filter

* Radio Button Working

* Added Translations

* Fixed Filter Name

* Fixed Debounce

* Fixed Asynchronous Debounce

* Added Tests

* Better Error and Loading State Handline

* Fixed Loader

* Fixed Loader

* Modulrised Mock Data

* Minor Change

* Fixed Tests

* Increase Coverage

* User query replaced with OrgMemberConnection

* Fixed Tests

* Code Coverage Increase

* Code Cov

* Fixed Translations

* Fixed Failing Tests

* fix in failing test (#913)

* Improve and Standardize Automated Linting Tests (#916)

* added linting rules

* added linting rules

* added linting rules

* Rename `data` variables to more readable name [Fixes #829] (#835)

* Refactor screens

* Update components

* Fix test

* Fix typecheck errors

* Increase test coverage

* Merge latest adminUI-Redesign into Develop (#927)

* Updated CODE_STYLE.md

* Updated CODE_STYLE.md (#917)

* Updated CODE_STYLE.md

* Import section update

* Upgrade and Migrate from Bootstrap 4 to Bootstrap 5 (#925)

* Updated CODE_STYLE.md

* Latest Boostrap v5.3.0 & react-bootstrap v2.7.4 installed

* Buttons replaced from normal ones to Bootstrap ones

* Import section update

* Error fixed for Buttons

* Language dropdowns and Change language

* InputBoxes & Checkboxes fixed and imported from BS

* Removed unused package popper.js

* Replaced react-modal with Bootstrap one in Login Page

* Modals converted to React Bootstrap one

* Completely replaced react-modal with react-bootstrap/Modal from the project

* Removed react-modal from the project

* Removed classbased modal and unused images

* Notification navbar migrated

* Modal migration

* Modal migration

* Modal migration done for OrgPostCard

* Empty commit to make workflow run

* Empty commit to make workflow run

* Empty commit to run the workflow

---------

Co-authored-by: Anwer Sayeed <deeyasrewna@gmail.com>

* Introduces API versioning check in CI/CD (#924)

* a random change

* husky precommit

* one more try

* one more try

* one more try

* one more try

* one more try

* one more try

* second try

* removed unwanted deps

* removed unwanted deps

* resolved the error

* updated variable name

* rerun test

* rerun test

* added test to pull.yml

* removed push check

* resolved conflict

* Update stale.yml

* Update CONTRIBUTING.md

* Merge talawa-user-portal into develop (#935)

* Create login and register page for user portal

* Lint public locales

* Create tests for login page components

* Add react import in tests

* Create organizations screen for user portal

* Fix failing tests and lint code

* fix failing tests

* Add tests for organization screen and componenets

* Fix non-null assertions

* Fix non-null assertions in organizations test

* Fix bootstrap migration changes

* Merge latest Admin UI Redesign into Develop (#934)

* Updated CODE_STYLE.md

* Updated CODE_STYLE.md (#917)

* Updated CODE_STYLE.md

* Import section update

* Upgrade and Migrate from Bootstrap 4 to Bootstrap 5 (#925)

* Updated CODE_STYLE.md

* Latest Boostrap v5.3.0 & react-bootstrap v2.7.4 installed

* Buttons replaced from normal ones to Bootstrap ones

* Import section update

* Error fixed for Buttons

* Language dropdowns and Change language

* InputBoxes & Checkboxes fixed and imported from BS

* Removed unused package popper.js

* Replaced react-modal with Bootstrap one in Login Page

* Modals converted to React Bootstrap one

* Completely replaced react-modal with react-bootstrap/Modal from the project

* Removed react-modal from the project

* Removed classbased modal and unused images

* Notification navbar migrated

* Modal migration

* Modal migration

* Modal migration done for OrgPostCard

* Empty commit to make workflow run

* Empty commit to make workflow run

* Empty commit to run the workflow

* Sass filed added with documentation

* Linting fixed

* Fixed the folder structure and naming convention

* Customised Bootstrap  (#929)

* Sass filed added with documentation

* Linting fixed

* Fixed the folder structure and naming convention

* Assets typo fixed

* Typo fix

* Merge conflict error fixed

---------

Co-authored-by: Anwer Sayeed <deeyasrewna@gmail.com>

* test PR for API versioning check (#932)

* testPR

* test2

* testing the change

* testing it again

* test--no-verify

* test--no-verify

* echo token

* test-again

* test-again

* test

* test

* read-only

* clone

* clone

* redesigned newsfeed (#939)

* Revert "redesigned newsfeed (#939)" (#943)

This reverts commit a645eca7cf2ce1335374f48b52335a293e344580.

* Make Talawa-Admin mutations in sync with the backend (#946)

* Initial change

* Redundant Notification removed

* Fixed linting and other issues

* Tests fixed

* Add Home Screen And People Screen along with other components (#940)

* Create login and register page for user portal

* Lint public locales

* Create tests for login page components

* Add react import in tests

* Create organizations screen for user portal

* Fix failing tests and lint code

* fix failing tests

* Add tests for organization screen and componenets

* Fix non-null assertions

* Fix non-null assertions in organizations test

* Fix bootstrap migration changes

* Add Home Screen along with other components

* Fix failing tests

* Add required tests and Offcanvas navbar

* Remove unused variables from tests

* Sync the Mutations with talawa-api

* Merge AdminUI-Redesign into Develop (#947)

* Updated CODE_STYLE.md

* Updated CODE_STYLE.md (#917)

* Updated CODE_STYLE.md

* Import section update

* Upgrade and Migrate from Bootstrap 4 to Bootstrap 5 (#925)

* Updated CODE_STYLE.md

* Latest Boostrap v5.3.0 & react-bootstrap v2.7.4 installed

* Buttons replaced from normal ones to Bootstrap ones

* Import section update

* Error fixed for Buttons

* Language dropdowns and Change language

* InputBoxes & Checkboxes fixed and imported from BS

* Removed unused package popper.js

* Replaced react-modal with Bootstrap one in Login Page

* Modals converted to React Bootstrap one

* Completely replaced react-modal with react-bootstrap/Modal from the project

* Removed react-modal from the project

* Removed classbased modal and unused images

* Notification navbar migrated

* Modal migration

* Modal migration

* Modal migration done for OrgPostCard

* Empty commit to make workflow run

* Empty commit to make workflow run

* Empty commit to run the workflow

* Sass filed added with documentation

* Linting fixed

* Fixed the folder structure and naming convention

* Customised Bootstrap  (#929)

* Sass filed added with documentation

* Linting fixed

* Fixed the folder structure and naming convention

* Assets typo fixed

* Typo fix

* Initial login page work

* Merge conflict error fixed

* Theming modified and Added Loader over every screen

* Fixed UI issue for navbar and login

* Fixed production bug

* Removed unused variable

* Tests fixed

* Added Change Language Btn dropdown

* Merge conflict fixed, merge latest develop into adminUI-redesign (#938)

* Merge latest adminUI-Redesign into Develop (#927)

* Updated CODE_STYLE.md

* Updated CODE_STYLE.md (#917)

* Updated CODE_STYLE.md

* Import section update

* Upgrade and Migrate from Bootstrap 4 to Bootstrap 5 (#925)

* Updated CODE_STYLE.md

* Latest Boostrap v5.3.0 & react-bootstrap v2.7.4 installed

* Buttons replaced from normal ones to Bootstrap ones

* Import section update

* Error fixed for Buttons

* Language dropdowns and Change language

* InputBoxes & Checkboxes fixed and imported from BS

* Removed unused package popper.js

* Replaced react-modal with Bootstrap one in Login Page

* Modals converted to React Bootstrap one

* Completely replaced react-modal with react-bootstrap/Modal from the project

* Removed react-modal from the project

* Removed classbased modal and unused images

* Notification navbar migrated

* Modal migration

* Modal migration

* Modal migration done for OrgPostCard

* Empty commit to make workflow run

* Empty commit to make workflow run

* Empty commit to run the workflow

---------

Co-authored-by: Anwer Sayeed <deeyasrewna@gmail.com>

* Introduces API versioning check in CI/CD (#924)

* a random change

* husky precommit

* one more try

* one more try

* one more try

* one more try

* one more try

* one more try

* second try

* removed unwanted deps

* removed unwanted deps

* resolved the error

* updated variable name

* rerun test

* rerun test

* added test to pull.yml

* removed push check

* resolved conflict

* Sass filed added with documentation

* Linting fixed

* Fixed the folder structure and naming convention

* Update stale.yml

* Typo fix

* Update CONTRIBUTING.md

* Merge talawa-user-portal into develop (#935)

* Create login and register page for user portal

* Lint public locales

* Create tests for login page components

* Add react import in tests

* Create organizations screen for user portal

* Fix failing tests and lint code

* fix failing tests

* Add tests for organization screen and componenets

* Fix non-null assertions

* Fix non-null assertions in organizations test

* Fix bootstrap migration changes

* Merge conflict error fixed

---------

Co-authored-by: Anwer Sayeed <deeyasrewna@gmail.com>
Co-authored-by: Kanishka Bansode <96020697+kb-0311@users.noreply.github.com>
Co-authored-by: Peter Harrison <16875803+palisadoes@users.noreply.github.com>
Co-authored-by: Noble Mittal <62551163+beingnoble03@users.noreply.github.com>

* Random checkout

* Design ready for homescreen

* Login page 100% code c=coverage

* Login page icon adjustment

* Added translations

* Fixed the failing tests

* Revert to older version of loader

* Animation added fixed warnings

* Fixed accessability

* Mutations and Tests foxed

* Fixed coloring in UserPortal

* Tests fixed and ChangeLanguageDropdown used in UserLoginPage

* Linting Fixed

---------

Co-authored-by: Anwer Sayeed <deeyasrewna@gmail.com>
Co-authored-by: Kanishka Bansode <96020697+kb-0311@users.noreply.github.com>
Co-authored-by: Peter Harrison <16875803+palisadoes@users.noreply.github.com>
Co-authored-by: Noble Mittal <62551163+beingnoble03@users.noreply.github.com>

* Merge latest adminUI-Redesign (#950)

* Initial Organizations screen done

* Removed yellow scrollbar

* Linting fixed

* Replaced images with svgs for logos

* Styling done for btnsContainer

* Better typechecking and readability

* Animated Drawer working

* Responsive page ready

* OrgCard responsive

* Fixed navbar issue and added webkit keyframes

* LeftDrawer ready

* Translations added

* Added shimmer loading effect

* Styling issue fixed

* Failing tests fixed for OrgList

* Removed unused vars

* Tests done for LeftDrawer

* Succesfully made component without causing any breaking change

* 100% Code coverage achieved for Requests Screen

* Fix alignment

* Roles screen UI done

* Role screen fixed with 100% test coverage

* Changing screen activeness fixed

* Unused vars and Typos fixed

* Language support added

* Linting and typos fixed

* Fixed failing tests for LeftDrawer

* Completed tests of AdminDashListCard with 100% code coverage

* OrgListCard done

* Finalised tests

* Requests user search made functional again !

* Fixed loading on refetch and UX on all screens

* OrgList failing errors fixed

* Fixed all failing tests

* Achieved 100% code coverage for OrgList.tsx

* Wrote tests and mod LeftDrawer for admins

* Minor ui issue fixed

* Fixed failing test

* UI bug dropdown

* Frontend insync with Backend attempt 1

* Introspection fail fix 1

* Introspection error fix 3

* Introspection error fix another attempt

* Another attempt

* [Talawa-user-portal] Add Settings and Donate Screen, along with other UI fixes (#953)

* Create login and register page for user portal

* Lint public locales

* Create tests for login page components

* Add react import in tests

* Create organizations screen for user portal

* Fix failing tests and lint code

* fix failing tests

* Add tests for organization screen and componenets

* Fix non-null assertions

* Fix non-null assertions in organizations test

* Fix bootstrap migration changes

* Add Home Screen along with other components

* Fix failing tests

* Add required tests and Offcanvas navbar

* Remove unused variables from tests

* Sync the Mutations with talawa-api

* Add Settings and Donate Screen

* Add multilingual support for the screens

* Add Event Project and Volunteer Management (#961)

* Add screens for adding and updating event projects

* Add delete operation for event projects and debug update

* Remove yarn.lock

* Begin testing

* Add display of tasks and functionality to add tasks

* Add modal for edit task

* Add UpdateTaskModal

* Add Delete Task Modal and volunteers display

* Add test for DeleteEventProjectModal.tsx

* Add tests for add and update event project modal

* Add screen for managing volunteers

* Add option to assign and remove volunteers

* Add tests for AddTaskModal.tsx

* Add tests for TaskListItem.tsx and DeleteTaskModal.tsx

* Complete testing for all Task Modals

* Add completed display to tasks

* Add tests for event dashboard

* Restructure files

* Add attendee management modal

* Add testing for EventAttendeeModal

* Move to 100% testing and wrapper for attendees modal

* Add basic checkIn functionality for users

* Add testing for CheckIn modals

* Introduce the tag generation into the repository

* Update linting rule and fix errors

* Remove alloted seat and alloted room

* Fix testing

* Correct some tests

* Migrate from attendees to registrants

* Migrate Event Project modals to new design

* Migrate registrants modals and checkin modals to new design with 100% test coverage

* Move task modals to new styles

* Move to 100% test coverage

* Admin workflow completed with updated package.json (#960)

* Merge latest AdminUI Redesign into develop (#956)

* Initial Organizations screen done

* Removed yellow scrollbar

* Linting fixed

* Replaced images with svgs for logos

* Styling done for btnsContainer

* Better typechecking and readability

* Animated Drawer working

* Responsive page ready

* OrgCard responsive

* Fixed navbar issue and added webkit keyframes

* LeftDrawer ready

* Translations added

* Added shimmer loading effect

* Styling issue fixed

* Failing tests fixed for OrgList

* Removed unused vars

* Tests done for LeftDrawer

* Succesfully made component without causing any breaking change

* 100% Code coverage achieved for Requests Screen

* Fix alignment

* Roles screen UI done

* Role screen fixed with 100% test coverage

* Changing screen activeness fixed

* Unused vars and Typos fixed

* Language support added

* Linting and typos fixed

* Fixed failing tests for LeftDrawer

* Completed tests of AdminDashListCard with 100% code coverage

* OrgListCard done

* Finalised tests

* Requests user search made functional again !

* Fixed loading on refetch and UX on all screens

* OrgList failing errors fixed

* Fixed all failing tests

* Achieved 100% code coverage for OrgList.tsx

* Wrote tests and mod LeftDrawer for admins

* Minor ui issue fixed

* Fixed failing test

* UI bug dropdown

* Frontend insync with Backend attempt 1

* Introspection fail fix 1

* Introspection error fix 3

* Introspection error fix another attempt

* Another attempt

* Fixed Default Animation on Organizations Screen

* Fixed typo

* Loading data from localstorage functional

* Fixed name conventions

* Fixed typo

* UI Fix

* Changed screen name

* Table Loader added

* Added LeftOrg drawer and Organization screen comp to Screens

* routesReducer tests fixed

* Redundant adminNavbar removed from project

* MemberDetail issue fixed

* Achieved 100% code coverage for LeftDrawerOrg, Added Empty div in images

* Fixed failing tests

* Fix tests

* Fixed warnings

* Linting fixes

* Linting issues fixed

* Achieved 100% code coverage for CollapsibleDropdown

* Achieved 100% CC on IconComponent and removed useless imports

* Achieved 100% cc for LeftDrawer Component

* Achieved 100% CC on SuperAdminScreen Component

* Fixed typo

* Integrated Event Dashboard

* Failing tests for LeftDrawer LeftDrawerOrg OrgList screen fixed

* Removed redundant code

* Removed useless imports

* Linting fixed

* Removed LeftDrawerOrg

* Update documentation

* copy-docs -to-talawa branch update to develop

* removed dependance of code copying from generate segment

* Update push.yml (#969)

* Update push.yml (#970)

* Feature Request: Adding a dialog to go to plugin store after an organization is created by the admin (#951)

* Add/ test for OrgPost.tsx

* fix:  org post back to default

* Added Dialog 2

* Updated Dialog UI

* Removed Extra code

* Updated Plugin store

* fix: warnings and solves #951  & #948

* fix: warnings and solves #951  & #948

* fix: warnings and solves #951  & #948

* Fix: UI Redesign

* fix: merge

* fix

* Update AddOnStore.tsx

* Fixed Merge Errors

* Add test: for OrgEntry

* Test 3

* fix test 4

* Merge latest AdminUI Redesign into develop (#972)

* Initial Organizations screen done

* Removed yellow scrollbar

* Linting fixed

* Replaced images with svgs for logos

* Styling done for btnsContainer

* Better typechecking and readability

* Animated Drawer working

* Responsive page ready

* OrgCard responsive

* Fixed navbar issue and added webkit keyframes

* LeftDrawer ready

* Translations added

* Added shimmer loading effect

* Styling issue fixed

* Failing tests fixed for OrgList

* Removed unused vars

* Tests done for LeftDrawer

* Succesfully made component without causing any breaking change

* 100% Code coverage achieved for Requests Screen

* Fix alignment

* Roles screen UI done

* Role screen fixed with 100% test coverage

* Changing screen activeness fixed

* Unused vars and Typos fixed

* Language support added

* Linting and typos fixed

* Fixed failing tests for LeftDrawer

* Completed tests of AdminDashListCard with 100% code coverage

* OrgListCard done

* Finalised tests

* Requests user search made functional again !

* Fixed loading on refetch and UX on all screens

* OrgList failing errors fixed

* Fixed all failing tests

* Achieved 100% code coverage for OrgList.tsx

* Wrote tests and mod LeftDrawer for admins

* Minor ui issue fixed

* Fixed failing test

* UI bug dropdown

* Frontend insync with Backend attempt 1

* Introspection fail fix 1

* Introspection error fix 3

* Introspection error fix another attempt

* Another attempt

* Fixed Default Animation on Organizations Screen

* Fixed typo

* Loading data from localstorage functional

* Fixed name conventions

* Fixed typo

* UI Fix

* Changed screen name

* Table Loader added

* Added LeftOrg drawer and Organization screen comp to Screens

* routesReducer tests fixed

* Redundant adminNavbar removed from project

* MemberDetail issue fixed

* Achieved 100% code coverage for LeftDrawerOrg, Added Empty div in images

* Fixed failing tests

* Fix tests

* Fixed warnings

* Linting fixes

* Linting issues fixed

* Achieved 100% code coverage for CollapsibleDropdown

* Achieved 100% CC on IconComponent and removed useless imports

* Achieved 100% cc for LeftDrawer Component

* Achieved 100% CC on SuperAdminScreen Component

* Fixed typo

* Integrated Event Dashboard

* Failing tests for LeftDrawer LeftDrawerOrg OrgList screen fixed

* Removed redundant code

* Removed useless imports

* Linting fixed

* Removed LeftDrawerOrg

* Dashboard screen ui almost ready

* Org Dash ready

* Block/Unblock screen ready

* Organization settings page ready

* Lang changes

* Page refresh on updating org removed

* OrgUpdate tests done

* OrgUpdate 100% test coverage achieved

* OrgSettings Tests done

* Organization Dashboard Cards done

* Organization Dashboard achieved 100% CC

* 100% CC achieved for BlockUser screen

* Finalised changes

* Small change

* Tests fixed

* Separate OrgSettings component made

* Linting fixed

* Formatting fixed

* Events screen and Post Comment Modal for Talawa-user-portal  (#963)

* Create login and register page for user portal

* Lint public locales

* Create tests for login page components

* Add react import in tests

* Create organizations screen for user portal

* Fix failing tests and lint code

* fix failing tests

* Add tests for organization screen and componenets

* Fix non-null assertions

* Fix non-null assertions in organizations test

* Fix bootstrap migration changes

* Add Home Screen along with other components

* Fix failing tests

* Add required tests and Offcanvas navbar

* Remove unused variables from tests

* Sync the Mutations with talawa-api

* Add Settings and Donate Screen

* Add multilingual support for the screens

* Add events screen without calendar view

* Add multilingual support to Events screen

* Fix failing tests due to merge

* Add Post Comment functionality

* Refactor Events tests

* Deprecate event registrants from query

* Update README.md

* Add My Tasks screen and Fix UI bugs [User Portal] (#978)

* Create login and register page for user portal

* Lint public locales

* Create tests for login page components

* Add react import in tests

* Create organizations screen for user portal

* Fix failing tests and lint code

* fix failing tests

* Add tests for organization screen and componenets

* Fix non-null assertions

* Fix non-null assertions in organizations test

* Fix bootstrap migration changes

* Add Home Screen along with other components

* Fix failing tests

* Add required tests and Offcanvas navbar

* Remove unused variables from tests

* Sync the Mutations with talawa-api

* Add Settings and Donate Screen

* Add multilingual support for the screens

* Add events screen without calendar view

* Add multilingual support to Events screen

* Fix failing tests due to merge

* Add Post Comment functionality

* Refactor Events tests

* Deprecate event registrants from query

* Add my tasks screen for user portal

* Remove unnecessary comments from test files

* Add Feedback UI Components to Talawa Admin (#980)

* Add feedback component

* Add tests for feedback modal

* Add handling for empty feedback

* Add Average Rating and Reviews component

* Add testing for all the added cards

* Fix tests and move to 100% coverage

* Add bugfix

* Add merge function to fix failing tests

* Add key definitons

* Change merge policy

* Add custom merge policy to all the Event Stat tests

* remove cache

* Migrate to a single query in the parent

* Adding Plugin Logic to the Talawa Mobile Web App (#976)

* Add/ test for OrgPost.tsx

* fix:  org post back to default

* Added Dialog 2

* Updated Dialog UI

* Removed Extra code

* Updated Plugin store

* fix: warnings and solves #951  & #948

* fix: warnings and solves #951  & #948

* fix: warnings and solves #951  & #948

* Fix: UI Redesign

* fix: merge

* fix

* Update AddOnStore.tsx

* Fixed Merge Errors

* Add test: for OrgEntry

* Test 3

* fix test 4

* chores: version changes

* Add: Initial Websocket setup on talawa mobile web

* Add: plugin logic

* Add: plugin logic

* removed extra

* removed extra

* Added: Tests

* fix

* Add Side Navigation to Event Dashboard (#981)

* Create left drawer for event dashboard

* Add basic styles to the event dashboard

* Fix button styling

* Add testing

* Add testing for the left event drawer

* Add 100% line coverage for all components

* Increase timeout for tests

* Move maximum rating in feedback from 10 to 5 [Fixes #990] (#987)

* Move maximum rating in feedbacks from 10 to 5

* Fix failing tests

* Add chat screen to talawa-user-portal (#986)

* Create login and register page for user portal

* Lint public locales

* Create tests for login page components

* Add react import in tests

* Create organizations screen for user portal

* Fix failing tests and lint code

* fix failing tests

* Add tests for organization screen and componenets

* Fix non-null assertions

* Fix non-null assertions in organizations test

* Fix bootstrap migration changes

* Add Home Screen along with other components

* Fix failing tests

* Add required tests and Offcanvas navbar

* Remove unused variables from tests

* Sync the Mutations with talawa-api

* Add Settings and Donate Screen

* Add multilingual support for the screens

* Add events screen without calendar view

* Add multilingual support to Events screen

* Fix failing tests due to merge

* Add Post Comment functionality

* Refactor Events tests

* Deprecate event registrants from query

* Add my tasks screen for user portal

* Remove unnecessary comments from test files

* Add chat screen along with components

* Add mui/system package for x-chart support

* Add chat screen tests and fix other bugs

* Update issue.yml

* Update stale.yml

* Merge latest AdminUI Redesign into Master (#1006)

* Pagination Done for Orglist

* Fixed warnings

* Infinite scroll and search working for Requests screen

* Simplified the code

* Infinite scroll enabled and functioning on OrgList Requests and Users screen

* FIxed warning

* Fixed typo

* Fixed bug

* Joined and Blockedbyorgs screen and mdoal ready

* Tables ready !

* Remove user from organization functionality working well

* Update user role in organization feature ready

* Minor changes

* Done with tests on OrgList

* Done with testss of Requests screen

* 100% CC achieved for Users screen

* Main tests done for UserTableItem

* 100% Code Coverage Achieved for UserTableItem

* Removed Redundant Landing Page

* 100% CC achieved for TableLoader

* Translation added for Users Screen

* Translation done for Requests screen

* Translation done for dashboard screen

* Linting and warnings fixed

* Improved login page

* UI Done for Forgot Password Screen

* Forgot Password Screen Tests done!

* Fixed all pending tests

* Better message for btns and coloring

* Linting issues fixed

* Fixed code styles

* SUPPRESSED UNKNOWN ERROR

* Fixed formatting

* Updated typoed message

* Fixed failing tests accompanying typo

* fix createEvent to close modal and show events without refresh (#1014)

* fix: Ensure Full Visibility of Logo on 404 Error Page (#1018)

- Adjusted the positioning of the logo on the 404 error page to ensure full visibility.
- Implemented CSS modifications to prevent the logo from being covered or cut off.
- Tested the changes by navigating to various undefined endpoints, confirming that the logo is now displayed
  correctly on the 404 error page.

This commit addresses the bug by ensuring the proper display of the logo on the 404 error page,
enhancing the user experience.

Fixes #1016

Signed-off-by: Akhilender <akhilenderb9@gmail.com>

* Implemented featurs for Postfeed Management (#982)

* redesigned newsfeed

* added test

* newsfeed management

* pinned post

* postfeed management

* pin unpin tag and video control

* changes part 2

* newsfeed changes

* changes in Card Preview of newsfeed

* changes in Card Preview of newsfeed

* testing phase 1

* translation

* tests

* tests

* merged intto develop

* test

* Added query

* Update pull-requests.yml

* update and delete buttons of event modal are now working (#1051)

* update and delete buttons of event modal are now working

* fixed the naming conventions and style of the modal

* Dynamic dashboard Enhancements (#979)

* Dynamic Organization Dashboard

* Dynamic Organization Dashboard

* refined organization dashboard

* Update src/utils/handleLatestFeed.ts

Co-authored-by: Noble Mittal <62551163+beingnoble03@users.noreply.github.com>

* fixed inconsistent casing

* fixed org dashboard test

* fixed org dashboard test

* revert previous commit

* final changes

* final changes

---------

Co-authored-by: Noble Mittal <62551163+beingnoble03@users.noreply.github.com>

* Fix dashboard items (#1007)

* Dashboard items are working now.

* added variables for links -fix dashboard items

* Added variables for links -fix dashboard items.

* made the changes as said

* Removed : string from variable assignment.

* remove repititive code and resolved falling tests

* Fix repeating code and falling tests.

* Resolved some more falling tests

* write test for missed lines

* Fix event creation issue with white spaces. (#1025)

* fix event creation with white spaces

* Add test for empty input values

* chore: fix unit test (#1052)

* Fix layout distortion due to untruncated title description of events. (#1049)

* Fix layout distortion due to untruncated title description of events

* Add test

* add test for LeftDrawerEvent.tsx

* fixed some tests

* add test complete

* test: SecuredRouteForUser component 100% Test Coverage and fixed uncovered lines (#1048)

* SecuredRouteForUser test case added

* Fixed Linting Errors

* Update SecuredRouteForUser.test.tsx

* Update SecuredRouteForUser.test.tsx

* linting fix

* Update SecuredRouteForUser.test.tsx

* Update SecuredRouteForUser.test.tsx

* Fix incorrect toast Notification. (#1053)

* correct toast notification for TableRow.tsx with full test coverage

* Add correct toast with full code  coverage

* Add correct toast for deleteEventProjectModal.tsx with full test coverage

* Add correct toast for UpdateEventProjectModal.tsx with full test coverage

* Add correct toast for EventRegistrantsModal.tsx and full test  coverage.

* Add correct toast for AddTaskModal.tsx with full test coverage

* Add correct toast for UpdateTaskModal.tsx with full test coverage

* minor fix

* Add correct toast to EventRegistrantsModal.tsx

* fix EventRegitrantsModal.tsx

* created a return button on event dashboard (#1057)

* test: Loader Component 100% Test Coverage and Fix Uncovered Lines (#1047)

* test: Achieve 100% Test Coverage and Fix Uncovered Lines

- Improved the test coverage for the Loader component, addressing the previously uncovered lines and ensuring that all tests pass successfully.
- Added a test to ensure that the component renders correctly with a custom 'sm' size. I verified that both the spinner-wrapper and
  spinner elements are present and that the correct class is applied.
- Added a test to ensure that the component renders correctly with a 'lg' size. I verified that the spinner element has the appropriate class.
- Added a test to ensure that the component renders correctly with an 'xl' size. I verified that the spinner element has the correct class.

With these new tests, I now have 100% test coverage, and there are no more uncovered lines. The Loader component is thoroughly tested for
different size scenarios, and all tests pass successfully.

Signed-off-by: Akhilender <akhilenderb9@gmail.com>

* Fixed linting in Loader component

Signed-off-by: Akhilender <akhilenderb9@gmail.com>

* Test: Increasing the test level

- Trying to meet the code coverage level for Loader component.

Signed-off-by: Akhilender <akhilenderb9@gmail.com>

* Fixed Linting

Signed-off-by: Akhilender <akhilenderb9@gmail.com>

* fix: Linting

Signed-off-by: Akhilender <akhilenderb9@gmail.com>

* Improving test coverage for Loader Component

- Fixed lint errors

Signed-off-by: Akhilender <akhilenderb9@gmail.com>

* test: Improving the tests on the Loader Component

- Added a new aspect in the test-case1

Signed-off-by: Akhilender <akhilenderb9@gmail.com>

* Fixed: Removed runtime-generated classes from testing

- Eliminated all checks for classes associated with bootstrap components assigned at runtime.
- Recognized that validating classes assigned during runtime is inappropriate.

Signed-off-by: Akhilender <akhilenderb9@gmail.com>

---------

Signed-off-by: Akhilender <akhilenderb9@gmail.com>

* Simulated Test Database (#984)

* Dynamic Organization Dashboard

* Dynamic Organization Dashboard

* Sample Org Implementation

* removed unnecessary changes

* removed unnecessary svgs

* removed unnecessary import

* added appropriate button style

* fixed OrgListCard tests

* Fixed OrgList and OrgListCard Tests

* Removed Unnecessary 'container' Variable

* Added Missing Translations and removed unused variable

* Fixed event check in management not updating automatically bug (#1062)

* fixed the event checkIn bug

* fixed the failing test

* fixed the CheckInWrapper test

* Fix user profile buttons layout and added form validation (#1064)

* Fix user profile buttons layout and added form validation

* Fix falling tests and warnings

* Add test for missed lines

* fix falling tests

* test: Achieved 100% test coverage and fixed uncovered lines (#1068)

* test: Achieved 100% test coverage and fixed uncovered lines

- Improved the test coverage for the User-Password-Update component, addressing the previously uncovered lines and ensuring that all tests pass
  successfully.
- Added two new tests
  1. Empty Password Field Test:
   - The first test ensures that an error is displayed when attempting to save changes with an empty password field.

  2. Mismatched New and Confirm Passwords Test
   - The second test covers the scenario where the new and confirm password fields do not match.

With these new tests, I now have 100% test coverage, and there are no more uncovered lines.

Signed-off-by: Akhilender <akhilenderb9@gmail.com>

* Altered the formData

- Altered the formData to make sure all are related to the organization name.

Signed-off-by: Akhilender <akhilenderb9@gmail.com>

---------

Signed-off-by: Akhilender <akhilenderb9@gmail.com>

* created test for src/components/UserPortal/EventCard/EventCard.tsx (#1079)

* created test for eventCard of User portal

* corrected the start and end time

* Feature request: Adding advertisement screen (#994)

* Add/ test for OrgPost.tsx

* fix:  org post back to default

* Added Dialog 2

* Updated Dialog UI

* Removed Extra code

* Updated Plugin store

* fix: warnings and solves #951  & #948

* fix: warnings and solves #951  & #948

* fix: warnings and solve…
…ations" button (PalisadoesFoundation#1124)

* Changes position and text of all organization button

* Made changes to the routesReducer.test file

* Made changes in IconComponent.test file

* Fetched changes from main repo

* Fixed unnecessary changes

---------

Co-authored-by: Aditya Agarwal <adi790u@gmail.com>
* Added Base branch check to main

* Deleted all files in the main branch in anticipation of merging develop into main cleanly

* Merge develop to main

* Deleted all main files

* Merged develop into main
* Deleted all files in the main branch in anticipation of merging develop into main cleanly

* Merge develop into main
* Deleted all files in the main branch in anticipation of merging develop into main cleanly

* Merge develop into main

* Deleted all files in the main branch in anticipation of merging develop into main cleanly

* Merge develop into main
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [tar](https://github.com/isaacs/node-tar) from 6.1.15 to 6.2.1.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](isaacs/node-tar@v6.1.15...v6.2.1)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…lisadoesFoundation#1961)

Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 40 to 41.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](tj-actions/changed-files@v40...v41)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](expressjs/express@4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ejs](https://github.com/mde/ejs) from 3.1.9 to 3.1.10.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](mde/ejs@v3.1.9...v3.1.10)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…tion#2020)

* Deleted all files in the main branch in anticipation of merging develop into main cleanly

* Merge develop into main

---------

Co-authored-by: Peter Harrison <peter@colovore.com>
* 20240727112607 Deleted all files in the main branch in anticipation of merging develop into main cleanly

* 20240727112842 Merge develop into main
* 20240929102850 Deleted all files in the main branch in anticipation of merging develop into main cleanly

* 20240929103238 Merge develop into main
…lisadoesFoundation#2307)

Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 40 to 41.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](tj-actions/changed-files@v40...v41)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
dependabot bot and others added 6 commits September 29, 2024 11:32
Bumps [rollup](https://github.com/rollup/rollup) from 4.21.3 to 4.22.5.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](rollup/rollup@v4.21.3...v4.22.5)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* 20241114065242 Deleted all files in the main branch in anticipation of merging develop into main cleanly

* 20241114065332 Merge develop into main
Copy link

coderabbitai bot commented Dec 11, 2024

Walkthrough

The pull request introduces a variety of changes, including the addition of new configuration files for project setup and localization, updates to existing files for linting and formatting, and the introduction of scripts for automated tasks. Notably, it includes a new .coderabbit.yaml for YAML language server integration, a .env.example for environment variable setup, and various localization files for multiple languages. Additionally, it refines the project's structure and documentation, enhancing the overall development workflow and user experience.

Changes

File Path Change Summary
.coderabbit.yaml New configuration file for YAML language server integration with various settings.
.env.example New template for environment variables necessary for local development, including configurations for ports and APIs.
.eslintignore Excludes src/components/CheckIn/tagTemplate.ts from linting.
.eslintrc.json Updated linting rules, added support for Node.js, and modified plugins and rules for TypeScript and React.
.github/ISSUE_TEMPLATE/bug-report.md Updated metadata fields for consistency and added a section for potential internship candidates.
.github/ISSUE_TEMPLATE/feature-request.md Updated metadata fields for consistency and added a section for potential internship candidates.
.github/dependabot.yaml New configuration file for Dependabot to manage npm package updates.
.github/pull_request_template.md Modified template to include branching strategy and additional fields for contributors.
.github/workflows/README.md New README file outlining guidelines for contributing to workflows.
.github/workflows/codeql-codescan.yml New workflow for automating code analysis using CodeQL.
.github/workflows/check-tsdoc.js New script to validate TypeScript files for TSDoc comments.
.github/workflows/pull-request.yml New workflow for managing pull requests with multiple jobs for code quality checks and testing.
package.json Major updates including project name and version, new dependencies, and restructuring of scripts.
public/locales/en/common.json New localization file for English UI elements.
public/locales/fr/common.json New localization file for French UI elements.
public/locales/hi/common.json New localization file for Hindi UI elements.
public/locales/sp/common.json New localization file for Spanish UI elements.
public/locales/zh/common.json New localization file for Chinese UI elements.
schema.graphql Comprehensive updates to the GraphQL schema with new types, directives, inputs, and mutations.
setup.ts New setup script for configuring environment variables and ensuring proper application setup.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Setup Script
    participant .env File
    participant API

    User->>Setup Script: Start setup
    Setup Script->>.env File: Check for existing .env
    alt .env does not exist
        Setup Script->>.env File: Create .env from .env.example
    end
    Setup Script->>User: Prompt for API URL
    User->>Setup Script: Provide API URL
    Setup Script->>.env File: Update with API URL
    Setup Script->>User: Prompt for reCAPTCHA key
    User->>Setup Script: Provide reCAPTCHA key
    Setup Script->>.env File: Update with reCAPTCHA key
    Setup Script->>User: Prompt for logging
    User->>Setup Script: Confirm logging
    Setup Script->>.env File: Enable logging
    Setup Script->>User: Setup complete
Loading

Assessment against linked issues

Objective Addressed Explanation
Refactor CSS files in src/screens/EventVolunteers No changes related to CSS refactoring were made.
Refactor CSS files in src/screens/EventManagement No changes related to CSS refactoring were made.
Refactor CSS files in src/screens/OrganizationEvents No changes related to CSS refactoring were made.
Refactor CSS files in src/screens/Requests No changes related to CSS refactoring were made.
Refactor CSS files in src/screens/OrganizationVenues No changes related to CSS refactoring were made.
Refactor CSS files in src/screens/FundCampaignPledge No changes related to CSS refactoring were made.
Refactor CSS files in src/screens/CommunityProfile No changes related to CSS refactoring were made.
Refactor CSS files in src/screens/Leaderboard No changes related to CSS refactoring were made.
Refactor CSS files in src/screens/Users No changes related to CSS refactoring were made.
Refactor CSS files in src/screens/SubTags No changes related to CSS refactoring were made.

Possibly related issues

Possibly related PRs

Suggested reviewers

  • varshith257
  • palisadoes
  • gautam-divyanshu
  • AVtheking

Poem

🐰 In the land of code where rabbits hop,
New configs and scripts make our hearts stop!
With YAML and JSON, we dance with glee,
Talawa's bright future is plain to see!
So let’s code together, with joy and delight,
For every new change makes our project just right! 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Experiment)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

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.
  2. We don't merge PRs with failed tests.
    1. When tests fail, click on the Details link to learn more.
    2. Write sufficient tests for your changes (CodeCov Patch Test). Your testing level must be better than the target threshold of the repository
    3. Tests may fail if you edit sensitive files. Ask to add the ignore-sensitive-files-pr label if the edits are necessary.
  3. We cannot merge PRs with conflicting files. These must be fixed.

Our policies make our code better.

Reviewers

Do not assign reviewers. Our Queue Monitors will review your PR and assign them.
When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

CONTRIBUTING.md

Read our CONTRIBUTING.md file. Most importantly:

  1. PRs with issues not assigned to you will be closed by the reviewer
  2. Fix the first comment in the PR so that each issue listed automatically closes

Other

  1. 🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.
  2. Read the CONTRIBUTING.md file make

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments.

🛑 Comments failed to post (45)
.gitignore (1)

3-5: 💡 Codebase verification

Remove yarn.lock and pnpm-lock.yaml from .gitignore

The project is using npm as its package manager, evidenced by the presence of package-lock.json. Including lock files from other package managers in .gitignore is unnecessary and may cause confusion about which package manager to use.

  • Remove yarn.lock and pnpm-lock.yaml entries from .gitignore
  • Keep using npm as the standardized package manager for this project
🔗 Analysis chain

Verify package manager standardization

Including both yarn.lock and pnpm-lock.yaml suggests multiple package managers might be in use. This could lead to dependency resolution inconsistencies.

Let's verify the project's package manager standard:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for package manager configuration files
echo "Checking for package manager files..."
fd -H -t f "package-lock.json|yarn.lock|pnpm-lock.yaml"

# Check for package manager scripts in package.json
echo "Checking package.json for scripts..."
if [ -f "package.json" ]; then
    cat package.json | jq '.scripts'
fi

Length of output: 1333

public/locales/sp/errors.json (1)

2-8: 💡 Codebase verification

⚠️ Potential issue

Spanish translations needed for error messages

The error messages in public/locales/sp/errors.json are direct copies of the English messages from public/locales/en/errors.json. Please translate these messages to Spanish:

  • "Talawa-API service is unavailable!..." → "¡El servicio Talawa-API no está disponible! ¿Está funcionando? Verifique también su conectividad de red."
  • "Not found" → "No encontrado"
  • "An unknown error occurred..." → "Ocurrió un error desconocido. Por favor, inténtelo de nuevo más tarde. {{msg}}"
  • "Sorry! you are not Authorised!" → "¡Lo siento! ¡No está autorizado!"
  • "Error sending mail" → "Error al enviar el correo"
  • "Email not registered" → "Correo electrónico no registrado"
  • "Oops! The Page you requested was not found!" → "¡Ups! ¡La página solicitada no fue encontrada!"
🔗 Analysis chain

Translate English messages to Spanish

The messages are in English despite being in the Spanish localization directory (public/locales/sp/). This defeats the purpose of localization. Please translate the following messages to Spanish:

  • "Talawa-API service is unavailable!..."
  • "Not found"
  • "An unknown error occurred..."
  • "Sorry! you are not Authorised!"
  • "Error sending mail"
  • "Email not registered"
  • "Oops! The Page you requested was not found!"

Let's verify the English translations from the source file:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Compare with English translations to ensure consistency
cat public/locales/en/errors.json

Length of output: 617

public/locales/hi/errors.json (2)

2-2: 🛠️ Refactor suggestion

Clean up message formatting and complete incomplete translations

  1. Remove trailing spaces from translations:

    • Line 2: "तलवा-एपीआई सेवा उपलब्ध नहीं है! " → "तलवा-एपीआई सेवा उपलब्ध नहीं है!"
    • Line 5: "क्षमा मांगना! " → "क्षमा मांगना!"
  2. The "notFoundMsg" translation appears incomplete:

    • Line 8: "उफ़! " seems to be missing the actual error message content

Also applies to: 5-5, 8-8


1-11: 💡 Codebase verification

Translation keys are complete but some messages appear truncated

All error message keys from the English version are present in the Hindi translation. However, some Hindi translations appear to be shortened versions of their English counterparts:

  • talawaApiUnavailable: Missing the network connectivity check portion
  • notAuthorised: Missing the "you are not Authorised" part
  • notFoundMsg: Missing the "The Page you requested was not found" part
🔗 Analysis chain

Verify translation completeness against English version

Let's ensure all error messages from the English version are present in the Hindi translation.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Compare keys between English and Hindi translations
# Expected: All keys in English version should exist in Hindi version

echo "Comparing translation keys..."
echo "Keys in English but not in Hindi:"
jq -r 'keys[]' public/locales/en/errors.json > /tmp/en_keys
jq -r 'keys[]' public/locales/hi/errors.json > /tmp/hi_keys
grep -Fxvf /tmp/hi_keys /tmp/en_keys

echo "\nKeys in Hindi but not in English:"
grep -Fxvf /tmp/en_keys /tmp/hi_keys

Length of output: 398


Script:

#!/bin/bash
# Let's try a different approach to compare the JSON files directly
echo "Content of English errors.json:"
cat public/locales/en/errors.json

echo -e "\nContent of Hindi errors.json:"
cat public/locales/hi/errors.json

Length of output: 1237

DOCUMENTATION.md (2)

21-29: ⚠️ Potential issue

Fix grammar and formatting issues.

There are several issues in this section:

  1. Grammar error in "The process in easy" (line 22)
  2. Grammar error in "should automatically launched" (line 25)
  3. Bare URL usage (line 25)
  4. Typo in "brower" (line 28)
-The process in easy:
+The process is easy:
-A local version of `docs.talawa.io` should automatically launched in your browser at http://localhost:3000/
+A local version of `docs.talawa.io` should automatically launch in your browser at `http://localhost:3000`
-Always monitor the local website in your brower to make sure the changes are acceptable.
+Always monitor the local website in your browser to make sure the changes are acceptable.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

## How to use Docusaurus
The process is easy:
1. Install `talawa-docs` on your system
1. Launch docusaurus on your system according to the `talawa-docs`documentation. 
    - A local version of `docs.talawa.io` should automatically launch in your browser at `http://localhost:3000`
1. Add/modify the markdown documents to the `docs/` directory of the `talawa-docs` repository
1. If adding a file, then you will also need to edit the `sidebars.js` which is used to generate the [docs.talawa.io](https://docs.talawa.io/) menus.
1. Always monitor the local website in your browser to make sure the changes are acceptable. 
    - You'll be able to see errors that you can use for troubleshooting in the CLI window you used to launch the local website.
🧰 Tools
🪛 Markdownlint (0.35.0)

25-25: null
Bare URL used

(MD034, no-bare-urls)

🪛 LanguageTool

[grammar] ~25-~25: The modal verb ‘should’ requires the verb’s base form.
Context: ...f docs.talawa.io should automatically launched in your browser at http://localhost:300...

(MD_BASEFORM)


[grammar] ~26-~26: Did you mean the formatting language “Markdown” (= proper noun)?
Context: ...ttp://localhost:3000/ 1. Add/modify the markdown documents to the docs/ directory of t...

(MARKDOWN_NNP)


1-32: 💡 Codebase verification

Documentation changes should be moved to a separate PR

This documentation file (DOCUMENTATION.md) is part of a much larger PR that primarily focuses on CSS refactoring for EventVolunteers (#2505). Based on the PR details:

  1. The PR's stated purpose is specifically about "refactoring the CSS structure for the EventVolunteers"
  2. The documentation change is part of a massive PR that includes many infrastructure and configuration changes
  3. The DOCUMENTATION.md is a newly added file that introduces documentation guidelines, which is unrelated to the CSS refactoring objective

Best practices suggest that documentation changes should be submitted in a separate, focused PR to:

  • Maintain clear change history
  • Enable easier review process
  • Keep PRs focused on single responsibilities
🔗 Analysis chain

Verify if this documentation change aligns with the PR objectives.

This documentation file appears to be unrelated to the stated PR objectives of refactoring CSS for the EventVolunteers component. The PR description focuses on CSS changes, but this file introduces new documentation guidelines.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify if this documentation change is part of the intended PR scope
# Check if there are any references to EventVolunteers or CSS changes in the commit history

# Check the PR description and commits
gh pr view 2637 --json title,body,commits | jq '.commits[] | select(.message | contains("DOCUMENTATION.md"))'

# Check if there are any related changes to EventVolunteers
fd -e css -e js -p "EventVolunteers"

Length of output: 307


Script:

#!/bin/bash
# Let's get more comprehensive information about the PR
gh pr view 2637 --json title,body,files

# Also check if DOCUMENTATION.md existed before or is newly added
git log -1 -- DOCUMENTATION.md

Length of output: 9568

🧰 Tools
🪛 Markdownlint (0.35.0)

25-25: null
Bare URL used

(MD034, no-bare-urls)

🪛 LanguageTool

[grammar] ~25-~25: The modal verb ‘should’ requires the verb’s base form.
Context: ...f docs.talawa.io should automatically launched in your browser at http://localhost:300...

(MD_BASEFORM)


[grammar] ~26-~26: Did you mean the formatting language “Markdown” (= proper noun)?
Context: ...ttp://localhost:3000/ 1. Add/modify the markdown documents to the docs/ directory of t...

(MARKDOWN_NNP)


[uncategorized] ~32-~32: The preposition “to” seems more likely in this position.
Context: ... PLEASE do not add markdown files in this repository. Add them to `talawa-do...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)

scripts/githooks/check-localstorage-usage.js (4)

65-69: ⚠️ Potential issue

Improve localStorage pattern matching.

The current pattern matching might miss some cases and could have false positives:

  1. It doesn't catch destructured localStorage usage
  2. It might match comments or string literals

Consider using AST parsing for more accurate detection:

import * as parser from '@babel/parser';
import traverse from '@babel/traverse';

const hasLocalStorageUsage = (content) => {
  const ast = parser.parse(content, {
    sourceType: 'module',
    plugins: ['typescript', 'jsx']
  });
  
  let hasUsage = false;
  traverse(ast, {
    MemberExpression(path) {
      if (
        path.get('object').isIdentifier({ name: 'localStorage' }) &&
        path.get('property').isIdentifier({ 
          name: /^(getItem|setItem|removeItem)$/ 
        })
      ) {
        hasUsage = true;
        path.stop();
      }
    }
  });
  
  return hasUsage;
};

10-18: 🛠️ Refactor suggestion

Improve error handling in containsSkipComment function.

The current error handling silently fails by returning false. Consider:

  1. Distinguishing between different types of errors (e.g., file not found vs. permission issues)
  2. Propagating critical errors up the stack
 const containsSkipComment = (file) => {
   try {
     const content = readFileSync(file, 'utf-8');
     return content.includes('// SKIP_LOCALSTORAGE_CHECK');
   } catch (error) {
-    console.error(`Error reading file ${file}:`, error.message);
-    return false;
+    if (error.code === 'ENOENT') {
+      console.warn(`File not found: ${file}`);
+      return false;
+    }
+    throw new Error(`Failed to check skip comment in ${file}: ${error.message}`);
   }
 };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

const containsSkipComment = (file) => {
  try {
    const content = readFileSync(file, 'utf-8');
    return content.includes('// SKIP_LOCALSTORAGE_CHECK');
  } catch (error) {
    if (error.code === 'ENOENT') {
      console.warn(`File not found: ${file}`);
      return false;
    }
    throw new Error(`Failed to check skip comment in ${file}: ${error.message}`);
  }
};
🧰 Tools
🪛 eslint

[error] 10-10: Missing return type on function.

(@typescript-eslint/explicit-function-return-type)


61-78: 🛠️ Refactor suggestion

Improve file content checking and error handling.

The current implementation doesn't handle binary files and has basic error handling.

   try {
     if (existsSync(file)) {
+      // Skip binary files
+      const buffer = readFileSync(file);
+      if (buffer.includes(0)) {
+        console.log(`Skipping binary file: ${file}`);
+        return;
+      }
+
       const content = readFileSync(file, 'utf-8');
 
       if (
         content.includes('localStorage.getItem') ||
         content.includes('localStorage.setItem') ||
         content.includes('localStorage.removeItem')
       ) {
         filesWithLocalStorage.push(file);
       }
     } else {
-      console.log(`File ${file} does not exist.`);
+      console.warn(`File ${file} does not exist.`);
     }
   } catch (error) {
-    console.error(`Error reading file ${file}:`, error.message);
+    if (error.code === 'ENOENT') {
+      console.warn(`File not found: ${file}`);
+    } else {
+      console.error(`Error processing ${file}:`, error.message);
+      process.exit(1);
+    }
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

  try {
    if (existsSync(file)) {
      // Skip binary files
      const buffer = readFileSync(file);
      if (buffer.includes(0)) {
        console.log(`Skipping binary file: ${file}`);
        return;
      }

      const content = readFileSync(file, 'utf-8');

      if (
        content.includes('localStorage.getItem') ||
        content.includes('localStorage.setItem') ||
        content.includes('localStorage.removeItem')
      ) {
        filesWithLocalStorage.push(file);
      }
    } else {
      console.warn(`File ${file} does not exist.`);
    }
  } catch (error) {
    if (error.code === 'ENOENT') {
      console.warn(`File not found: ${file}`);
    } else {
      console.error(`Error processing ${file}:`, error.message);
      process.exit(1);
    }
  }

20-37: ⚠️ Potential issue

Fix potential command injection vulnerability and improve file pattern matching.

The current implementation is vulnerable to command injection through file paths and might miss some TypeScript files.

 const getModifiedFiles = () => {
   try {
     if (scanEntireRepo) {
-      const result = execSync('git ls-files | grep ".tsx\\?$"', {
+      const result = execSync('git ls-files "*.ts" "*.tsx"', {
         encoding: 'utf-8',
       });
       return result.trim().split('\n');
     }

     const result = execSync('git diff --cached --name-only', {
       encoding: 'utf-8',
     });
-    return result.trim().split('\n');
+    return result
+      .trim()
+      .split('\n')
+      .filter(file => /\.[jt]sx?$/.test(file));
   } catch (error) {
     console.error('Error fetching modified files:', error.message);
     process.exit(1);
   }
 };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

const getModifiedFiles = () => {
  try {
    if (scanEntireRepo) {
      const result = execSync('git ls-files "*.ts" "*.tsx"', {
        encoding: 'utf-8',
      });
      return result.trim().split('\n');
    }

    const result = execSync('git diff --cached --name-only', {
      encoding: 'utf-8',
    });
    return result
      .trim()
      .split('\n')
      .filter(file => /\.[jt]sx?$/.test(file));
  } catch (error) {
    console.error('Error fetching modified files:', error.message);
    process.exit(1);
  }
};
🧰 Tools
🪛 eslint

[error] 20-20: Missing return type on function.

(@typescript-eslint/explicit-function-return-type)

scripts/__mocks__/@pdfme/generator.ts (1)

17-21: 🛠️ Refactor suggestion

Consider using deterministic mock content generation.

The current implementation uses random values which could make tests non-deterministic. Consider using a more predictable pattern for testing consistency.

   const contentSize = Math.min(template.schemas.length, inputs.length) * 10;
-  const mockContent = Array.from({ length: contentSize }, () =>
-    Math.floor(Math.random() * 256),
-  );
+  const mockContent = Array.from(
+    { length: contentSize },
+    (_, index) => index % 256
+  );
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

  const contentSize = Math.min(template.schemas.length, inputs.length) * 10;
  const mockContent = Array.from(
    { length: contentSize },
    (_, index) => index % 256
  );
  return Promise.resolve(new Uint8Array([...pdfHeader, ...mockContent]));
scripts/__mocks__/@pdfme/generator.test.ts (3)

4-47: 🛠️ Refactor suggestion

Enhance test coverage with additional test cases

The current test suite covers basic functionality but misses important scenarios:

  1. Successful PDF generation with valid template and inputs
  2. Edge cases (null/undefined inputs, malformed template)
  3. Verification of generated PDF structure

Consider adding these test cases:

test('should generate PDF with valid template and inputs', async () => {
  const template = {
    schemas: [{ name: 'field1', type: 'text' }]
  } as Template;
  const inputs = [{ field1: 'test value' }];
  
  const result = await generate({ template, inputs });
  expect(result).toBeInstanceOf(Uint8Array);
  expect(result.length).toBeGreaterThan(0);
});

test('should handle special characters in inputs', async () => {
  const template = {
    schemas: [{ name: 'field1', type: 'text' }]
  } as Template;
  const inputs = [{ field1: 'test™ value©' }];
  
  const result = await generate({ template, inputs });
  expect(result).toBeInstanceOf(Uint8Array);
});

test('should throw error for malformed template', async () => {
  const template = {
    schemas: [{ type: 'text' }] // missing name
  } as Template;
  const inputs = [{ field1: 'test' }];
  
  await expect(
    generate({ template, inputs })
  ).rejects.toThrow();
});

13-19: ⚠️ Potential issue

Fix incorrect Promise resolution check

The test is not properly awaiting the Promise resolution, which will cause it to fail as it's comparing a Promise with Uint8Array.

   test('should resolve to a Uint8Array', async () => {
-    const result = generate({
+    const result = await generate({
       template: { schemas: [] } as Template,
       inputs: [],
     });
     expect(result).toBeInstanceOf(Uint8Array);
   });
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

  test('should resolve to a Uint8Array', async () => {
    const result = await generate({
      template: { schemas: [] } as Template,
      inputs: [],
    });
    expect(result).toBeInstanceOf(Uint8Array);
  });

5-11: ⚠️ Potential issue

Fix async/await usage in Promise test

The test is marked as async but doesn't await the generate() call. This could mask timing-related issues.

-  test('should return a Promise', async () => {
-    const result = generate({
+  test('should return a Promise', () => {
+    const result = generate({
       template: { schemas: [] } as Template,
       inputs: [],
     });
     expect(result).toBeInstanceOf(Promise);
   });
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

  test('should return a Promise', () => {
    const result = generate({
      template: { schemas: [] } as Template,
      inputs: [],
    });
    expect(result).toBeInstanceOf(Promise);
  });
public/locales/hi/translation.json (3)

772-772: 🛠️ Refactor suggestion

Fix inconsistent quotation marks in translation values.

Some translations use different types of quotation marks which could cause issues:

- "postDeleted": "पोस्ट सफलतापूर्वक हटा दी गई.",
- "postUpdated": "पोस्ट सफलतापूर्वक अपडेट किया गया.",
+ "postDeleted": "पोस्ट सफलतापूर्वक हटा दी गई।",
+ "postUpdated": "पोस्ट सफलतापूर्वक अपडेट किया गया।"

Also applies to: 773-773


684-684: ⚠️ Potential issue

Duplicate translation key detected.

The key "tag" appears multiple times with the same translation value.

- "tag": " आपका ब्राउज़र में वीडियो टैग समर्थित नहीं है",
# ... later in the file ...
- "tag": " आपका ब्राउज़र में वीडियो टैग समर्थित नहीं है",
+ "videoTagNotSupported": " आपका ब्राउज़र में वीडियो टैग समर्थित नहीं है"

Also applies to: 723-723


57-88: 🛠️ Refactor suggestion

Consider consolidating duplicate translations.

The userLoginPage section contains many translations that are identical to those in the loginPage section.

Consider creating a shared section for common translations to avoid duplication and make maintenance easier. For example:

{
  "common": {
    "login": "लॉगिन",
    "register": "पंजीकरण",
    // ... other shared translations
  },
  "loginPage": {
    // unique translations only
  },
  "userLoginPage": {
    // unique translations only
  }
}
setup.ts (1)

45-48: 🛠️ Refactor suggestion

⚠️ Potential issue

Handle errors and use consistent fs methods in file operations

In the code blocks at lines 45-48, 111-117, and 153-159, you are mixing asynchronous fs.readFile with synchronous fs.writeFileSync within the callbacks, and not handling potential errors from fs.readFile. For better code consistency and error handling, consider using synchronous methods or properly handling errors in the asynchronous callbacks.

Apply the following changes to use synchronous methods:

// Lines 45-48
-fs.readFile('.env', 'utf8', (err, data) => {
-  const result = data.replace(`PORT=${port}`, `PORT=${customPort}`);
-  fs.writeFileSync('.env', result, 'utf8');
-});
+const data = fs.readFileSync('.env', 'utf8');
+const result = data.replace(`PORT=${port}`, `PORT=${customPort}`);
+fs.writeFileSync('.env', result, 'utf8');

// Lines 111-117
-fs.readFile('.env', 'utf8', (err, data) => {
-  const result = data.replace(
-    `REACT_APP_USE_RECAPTCHA=${useRecaptcha}`,
-    `REACT_APP_USE_RECAPTCHA=yes`,
-  );
-  fs.writeFileSync('.env', result, 'utf8');
-});
+const data = fs.readFileSync('.env', 'utf8');
+const result = data.replace(
+  `REACT_APP_USE_RECAPTCHA=${useRecaptcha}`,
+  `REACT_APP_USE_RECAPTCHA=yes`,
+);
+fs.writeFileSync('.env', result, 'utf8');

// Lines 153-159
-fs.readFile('.env', 'utf8', (err, data) => {
-  const result = data.replace(
-    `REACT_APP_RECAPTCHA_SITE_KEY=${recaptchaSiteKey}`,
-    `REACT_APP_RECAPTCHA_SITE_KEY=${recaptchaSiteKeyInput}`,
-  );
-  fs.writeFileSync('.env', result, 'utf8');
-});
+const data = fs.readFileSync('.env', 'utf8');
+const result = data.replace(
+  `REACT_APP_RECAPTCHA_SITE_KEY=${recaptchaSiteKey}`,
+  `REACT_APP_RECAPTCHA_SITE_KEY=${recaptchaSiteKeyInput}`,
+);
+fs.writeFileSync('.env', result, 'utf8');

Also applies to: 111-117, 153-159

.github/workflows/compare_translations.py (2)

154-156: 🛠️ Refactor suggestion

Ensure 'en' is present before removing from languages list

Using languages.remove("en") without checking if "en" exists in the list may raise a ValueError if it's not found. To avoid this potential exception, check for its presence first.

Apply this change:

languages = os.listdir(directory)
- languages.remove("en")  # Exclude default language directory
+ if "en" in languages:
+     languages.remove("en")  # Exclude default language directory
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

    languages = os.listdir(directory)
    if "en" in languages:
        languages.remove("en")  # Exclude default language directory


134-135: 🛠️ Refactor suggestion

Preserve exception context when re-raising exceptions

When re-raising an exception in an except block, use raise ... from e to maintain the original exception context. This helps in debugging by preserving the traceback of the original exception.

Apply this change:

except json.JSONDecodeError as e:
-    raise ValueError(f"Error decoding JSON from file {filepath}: {e}")
+    raise ValueError(f"Error decoding JSON from file {filepath}: {e}") from e
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

    except json.JSONDecodeError as e:
        raise ValueError(f"Error decoding JSON from file {filepath}: {e}") from e
🧰 Tools
🪛 Ruff (0.8.0)

135-135: Within an except clause, raise exceptions with raise ... from err or raise ... from None to distinguish them from errors in exception handling

(B904)

schema.graphql (3)

67-71: ⚠️ Potential issue

Remove duplicate type and enum definitions

There are several duplicate type and enum definitions in the schema, which will cause errors:

  • AdvertisementType enum is defined at lines 67-71 and again at lines 554-558.
  • EducationGrade enum is defined at lines 244-261 and again at lines 1223-1241.
  • EmploymentStatus enum is defined at lines 266-270 and again at lines 1242-1247.
  • Gender enum is defined at lines 438-442 and again at lines 1248-1253.
  • MaritalStatus enum is defined at lines 491-498 and again at lines 1254-1261.
  • UserPhone type is defined at lines 1348-1352 and again at lines 1407-1411.

Duplicate definitions in a GraphQL schema will cause validation errors. Please remove the duplicate definitions to prevent schema conflicts.

Also applies to: 244-261, 266-270, 438-442, 491-498, 554-558, 1223-1241, 1242-1247, 1248-1253, 1254-1261, 1348-1352, 1407-1411


43-52: ⚠️ Potential issue

Remove duplicate AddressInput input definitions

The AddressInput input type is defined twice (lines 43-52 and lines 1212-1221). Duplicate input definitions will cause errors in the schema. Please remove one of them.

Also applies to: 1212-1221


776-781: ⚠️ Potential issue

Remove duplicate OrganizationCustomField type definitions

The OrganizationCustomField type is defined twice (lines 776-781 and lines 783-788). Duplicate type definitions will lead to schema errors. Please consolidate them into a single definition.

Also applies to: 783-788

.husky/post-merge (1)

4-4: 🛠️ Refactor suggestion

Add error handling and improve dependency checking

The automatic dependency installation is helpful but could be enhanced:

  1. Add error handling for npm install failures
  2. Check for lock file changes as well
-git diff HEAD^ HEAD --exit-code -- ./package.json || npm install
+changed_files=$(git diff HEAD^ HEAD --name-only)
+if echo "$changed_files" | grep -qE 'package\.json$|package-lock\.json$|yarn\.lock$'; then
+  echo "📦 Dependencies changed. Installing..."
+  if npm install; then
+    echo "✅ Dependencies installed successfully"
+  else
+    echo "❌ Failed to install dependencies"
+    exit 1
+  fi
+fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

changed_files=$(git diff HEAD^ HEAD --name-only)
if echo "$changed_files" | grep -qE 'package\.json$|package-lock\.json$|yarn\.lock$'; then
  echo "📦 Dependencies changed. Installing..."
  if npm install; then
    echo "✅ Dependencies installed successfully"
  else
    echo "❌ Failed to install dependencies"
    exit 1
  fi
fi
.husky/pre-commit (1)

4-10: ⚠️ Potential issue

Improve error handling and file staging

The script needs better error handling and more selective file staging:

  1. Check exit codes for npm commands
  2. Only stage modified files from the npm scripts
-npm run format:fix
-# npm run lint:fix
-npm run lint-staged
-npm run typecheck
-npm run update:toc
-
-git add .
+# Run formatting
+if ! npm run format:fix; then
+  echo "❌ Formatting failed"
+  exit 1
+fi

+# Run lint-staged
+if ! npm run lint-staged; then
+  echo "❌ Lint-staged failed"
+  exit 1
+fi

+# Run type checking
+if ! npm run typecheck; then
+  echo "❌ Type checking failed"
+  exit 1
+fi

+# Update table of contents
+if ! npm run update:toc; then
+  echo "❌ TOC update failed"
+  exit 1
+fi

+# Stage only modified files from our scripts
+git add -u
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

# Run formatting
if ! npm run format:fix; then
  echo "❌ Formatting failed"
  exit 1
fi

# Run lint-staged
if ! npm run lint-staged; then
  echo "❌ Lint-staged failed"
  exit 1
fi

# Run type checking
if ! npm run typecheck; then
  echo "❌ Type checking failed"
  exit 1
fi

# Update table of contents
if ! npm run update:toc; then
  echo "❌ TOC update failed"
  exit 1
fi

# Stage only modified files from our scripts
git add -u
scripts/githooks/update-toc.js (2)

4-7: ⚠️ Potential issue

Add error handling for file operations

The file reading operation needs error handling and should be more flexible with file locations.

-const markdownFiles = fs
-  .readdirSync('./')
-  .filter((file) => file.endsWith('.md'));
+try {
+  const markdownFiles = fs
+    .readdirSync(process.cwd())
+    .filter((file) => file.endsWith('.md'));
+} catch (error) {
+  console.error('Failed to read directory:', error);
+  process.exit(1);
+}

Committable suggestion skipped: line range outside the PR's diff.


8-12: ⚠️ Potential issue

Improve command execution and validation

The script needs better error handling and should validate the markdown-toc tool's presence.

+// Validate markdown-toc installation
+try {
+  execSync('which markdown-toc', { stdio: 'ignore' });
+} catch (error) {
+  console.error('markdown-toc is not installed. Please install it first.');
+  process.exit(1);
+}

 markdownFiles.forEach((file) => {
-  const command = `markdown-toc -i "${file}" --bullets "-"`;
-  execSync(command, { stdio: 'inherit' });
-  
+  try {
+    const command = `markdown-toc -i "${file}" --bullets "-"`;
+    execSync(command, { stdio: 'inherit' });
+    console.log(`✅ Updated TOC in ${file}`);
+  } catch (error) {
+    console.error(`❌ Failed to update TOC in ${file}:`, error);
+    process.exit(1);
+  }
 });
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

// Validate markdown-toc installation
try {
  execSync('which markdown-toc', { stdio: 'ignore' });
} catch (error) {
  console.error('markdown-toc is not installed. Please install it first.');
  process.exit(1);
}

markdownFiles.forEach((file) => {
  try {
    const command = `markdown-toc -i "${file}" --bullets "-"`;
    execSync(command, { stdio: 'inherit' });
    console.log(`✅ Updated TOC in ${file}`);
  } catch (error) {
    console.error(`❌ Failed to update TOC in ${file}:`, error);
    process.exit(1);
  }
});
🧰 Tools
🪛 eslint

[error] 11-12: Delete ··⏎

(prettier/prettier)

public/manifest.json (1)

13-13: ⚠️ Potential issue

Fix incorrect icon size specification

The size "16x16" for "logo192.png" appears to be incorrect. The filename suggests this should be a 192x192 image.

-      "sizes": "16x16"
+      "sizes": "192x192"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

      "sizes": "192x192"
.github/workflows/codeql-codescan.yml (3)

14-20: 🛠️ Refactor suggestion

Consider limiting CodeQL scanning to specific branches

Running security scans on all branches ('**') might be resource-intensive. Consider limiting to main branches and PRs targeting them.

 on:
   pull_request:
     branches:
-      - '**'  
+      - 'develop'
+      - 'master'
   push:
     branches:
-      - '**'   
+      - 'develop'
+      - 'master'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

on:
  pull_request:
    branches:
      - 'develop'
      - 'master'
  push:
    branches:
      - 'develop'
      - 'master'
🧰 Tools
🪛 yamllint (1.35.1)

[error] 17-17: trailing spaces

(trailing-spaces)


[error] 20-20: trailing spaces

(trailing-spaces)


34-39: ⚠️ Potential issue

Security: Disable debug mode in production

Debug mode is enabled which could potentially expose sensitive information. Consider disabling it in production environments.

 - name: Initialize CodeQL
   uses: github/codeql-action/init@v2
   with:
    languages: ${{ matrix.language }}
-   debug: true
+   debug: ${{ github.event_name != 'push' }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

       - name: Initialize CodeQL
         uses: github/codeql-action/init@v2
         with:
          languages: ${{ matrix.language }}
          debug: ${{ github.event_name != 'push' }}

🧰 Tools
🪛 actionlint (1.7.4)

35-35: the runner of "github/codeql-action/init@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 yamllint (1.35.1)

[warning] 37-37: wrong indentation: expected 11 but found 10

(indentation)


27-29: 💡 Codebase verification

Add TypeScript to the CodeQL analysis matrix

The codebase is predominantly TypeScript with hundreds of .ts and .tsx files. While there are a few Python and JavaScript files, TypeScript is the primary language and should be included in the CodeQL analysis for comprehensive security scanning.

  • Add 'typescript' to the language matrix in .github/workflows/codeql-codescan.yml
🔗 Analysis chain

Consider expanding language matrix

The matrix only includes JavaScript. If the repository contains TypeScript or other languages, consider adding them to the matrix.


Let me verify the actual usage of these languages by checking for substantive code files rather than just their presence.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for presence of different language files
echo "Checking for TypeScript files..."
find . -type f -name "*.ts" -o -name "*.tsx" | grep -q . && echo "TypeScript files found"

echo "Checking for Python files..."
find . -type f -name "*.py" | grep -q . && echo "Python files found"

Length of output: 344


Script:

#!/bin/bash
# Get a count of files by extension to understand the codebase composition
echo "TypeScript files:"
find . -type f -name "*.ts" -o -name "*.tsx" | grep -v "node_modules" | grep -v "dist" | grep -v ".d.ts"

echo -e "\nPython files:"
find . -type f -name "*.py" | grep -v "venv" | grep -v "__pycache__"

echo -e "\nJavaScript files:"
find . -type f -name "*.js" -o -name "*.jsx" | grep -v "node_modules" | grep -v "dist"

Length of output: 27325

.github/pull_request_template.md (1)

51-51: ⚠️ Potential issue

Update contributing guide link to point to develop branch

The contributing guide link points to the master branch, which contradicts the stated branching strategy.

-**Have you read the [contributing guide](https://github.com/PalisadoesFoundation/talawa-admin/blob/master/CONTRIBUTING.md)?**
+**Have you read the [contributing guide](https://github.com/PalisadoesFoundation/talawa-admin/blob/develop/CONTRIBUTING.md)?**
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

**Have you read the [contributing guide](https://github.com/PalisadoesFoundation/talawa-admin/blob/develop/CONTRIBUTING.md)?**
.github/workflows/check-tsdoc.js (1)

37-46: 🛠️ Refactor suggestion

Enhance TSDoc validation regex

The current regex might miss some edge cases in TSDoc comment detection.

Consider using a more robust regex that:

  • Ensures the comment is properly formatted
  • Validates required tags
-    return /\/\*\*[\s\S]*?\*\//.test(content);
+    return /\/\*\*\s*\n\s*\*[\s\S]*?\*\//.test(content);

Committable suggestion skipped: line range outside the PR's diff.

.github/workflows/push.yml (1)

28-29: 💡 Codebase verification

🛠️ Refactor suggestion

Node.js version 22.x is incompatible with package.json requirements

The package.json specifies "node": ">=20.x" as the engine requirement, but the workflow is configured to use Node.js 22.x which is currently not an LTS version. This could lead to potential compatibility issues.

  • .github/workflows/push.yml: Change node-version: [22.x] to node-version: [20.x] to align with the minimum version requirement in package.json and ensure LTS support.
🔗 Analysis chain

Review Node.js version requirement

Using Node.js 22.x might be too aggressive as it's not yet LTS.

Consider using an LTS version:

-        node-version: [22.x]
+        node-version: [20.x]
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if package.json specifies Node.js engine requirements
rg -A 5 '"engines"' package.json

Length of output: 160

jest.config.js (2)

61-65: 🛠️ Refactor suggestion

Review coverage thresholds

The coverage thresholds seem quite low at 20%.

Consider increasing the coverage requirements:

  coverageThreshold: {
    global: {
-      lines: 20,
-      statements: 20,
+      branches: 80,
+      functions: 80,
+      lines: 80,
+      statements: 80,
    },
  },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

    global: {
      branches: 80,
      functions: 80,
      lines: 80,
      statements: 80,
    },
  },

24-26: ⚠️ Potential issue

Remove hardcoded absolute path

The configuration contains a hardcoded absolute path.

Remove the hardcoded path:

  modulePaths: [
-    '/Users/prathamesh/Desktop/Open-Source/palisadoes/talawa-admin/src',
    '<rootDir>/src',
  ],
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

    '<rootDir>/src',
  ],
.github/workflows/issue.yml (1)

29-29: ⚠️ Potential issue

Update runner version for github-script action

The current runner version might be too old for the github-script action.

-      - uses: actions/github-script@v6
+      - uses: actions/github-script@v7
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

      - uses: actions/github-script@v7
🧰 Tools
🪛 actionlint (1.7.4)

29-29: the runner of "actions/github-script@v6" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

.github/workflows/pull-request-target.yml (1)

12-15: ⚠️ Potential issue

Security consideration for pull_request_target

The pull_request_target event runs with repository secrets and is designed to handle fork-based PRs safely. However, it can be dangerous if not used carefully. Ensure that this workflow doesn't check out or execute code from the PR.

🧰 Tools
🪛 yamllint (1.35.1)

[error] 13-13: trailing spaces

(trailing-spaces)


[error] 15-15: trailing spaces

(trailing-spaces)

package.json (2)

154-159: ⚠️ Potential issue

Review dependency version resolutions

The resolutions field specifies fixed versions that might conflict with the newer versions declared in dependencies:

  • @apollo/client is fixed at ^3.4.0-beta.19 but dependencies use ^3.11.8
  • @types/react and @types/react-dom are fixed at 17.0.2 but React 18.3.1 is used

Consider updating the resolutions to match the dependency versions or document the reason for pinning these specific versions.


2-3: 💡 Codebase verification

Major version bump needs documentation and justification

The repository appears to be in its early stages with only 2 commits, yet jumps from version 0.1.0 to 3.0.0. This significant version bump:

  • Lacks a CHANGELOG.md to document breaking changes
  • Has no documented justification in any of the existing documentation files
  • Appears premature for a repository that's just getting started

Please:

  • Add a CHANGELOG.md file documenting the breaking changes
  • Consider if this major version bump is appropriate at this stage
  • Document the rationale for starting at version 3.0.0 if there's a specific reason
🔗 Analysis chain

Verify the major version bump implications

The version change from 0.1.0 to 3.0.0 suggests breaking changes. Please ensure this aligns with semantic versioning principles and document the breaking changes.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for CHANGELOG.md entries related to version 3.0.0
rg -A 10 "## \[3\.0\.0\]" CHANGELOG.md || echo "No CHANGELOG.md entry found for version 3.0.0"

Length of output: 194


Script:

#!/bin/bash
# Check for any release notes, documentation or PR description that might explain version changes
fd -e md -e txt -x rg -l "version|breaking|changelog|release" {} \;

# Check git history for version related commits
git log --oneline | rg "version|bump|release" || echo "No version related commits found"

# Check package.json history
git log -p package.json | rg "version|name" -A 2 -B 2 || echo "No version history found"

Length of output: 130


Script:

#!/bin/bash
# Check content of documentation files for version information
echo "=== Checking DOCUMENTATION.md ==="
rg "version|breaking|release" DOCUMENTATION.md -A 2 -B 2

echo "=== Checking INSTALLATION.md ==="
rg "version|breaking|release" INSTALLATION.md -A 2 -B 2

# Check if this is a new repository or first major release
git rev-list --count HEAD || echo "Unable to get commit count"

# Check if package.json was recently added
git log --diff-filter=A --summary | rg "package.json" || echo "No package.json creation found"

Length of output: 2723

.github/workflows/pull-request.yml (2)

61-62: ⚠️ Potential issue

Fix potential security issues in shell script execution

The current implementation might be susceptible to word splitting and path injection. Use proper quoting for variables.

-        run: npx eslint ${CHANGED_FILES} && python .github/workflows/eslint_disable_check.py
+        run: |
+          for file in $CHANGED_FILES; do
+            npx eslint "$file"
+          done
+          python .github/workflows/eslint_disable_check.py
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

          CHANGED_FILES: ${{ steps.changed_files.outputs.all_changed_files }}
        run: |
          for file in $CHANGED_FILES; do
            npx eslint "$file"
          done
          python .github/workflows/eslint_disable_check.py
🧰 Tools
🪛 actionlint (1.7.4)

61-61: property "changed_files" is not defined in object type {changed-files: {conclusion: string; outcome: string; outputs: {string => string}}}

(expression)


62-62: shellcheck reported issue in this script: SC2086:info:1:12: Double quote to prevent globbing and word splitting

(shellcheck)


79-83: ⚠️ Potential issue

Secure handling of GitHub context variables

Direct use of GitHub context variables in shell scripts could be unsafe. Pass them through environment variables instead.

-        run: |
-          echo "Source Branch ${{ github.event.pull_request.head.ref }}"
-          echo "Target Branch ${{ github.event.pull_request.base.ref }}"
+        env:
+          SOURCE_BRANCH: ${{ github.event.pull_request.head.ref }}
+          TARGET_BRANCH: ${{ github.event.pull_request.base.ref }}
+        run: |
+          echo "Source Branch $SOURCE_BRANCH"
+          echo "Target Branch $TARGET_BRANCH"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

        env:
          SOURCE_BRANCH: ${{ github.event.pull_request.head.ref }}
          TARGET_BRANCH: ${{ github.event.pull_request.base.ref }}
        run: |
          echo "Source Branch $SOURCE_BRANCH"
          echo "Target Branch $TARGET_BRANCH"
          echo "Error: Source and Target Branches are the same. Please ensure they are different."
          exit 1
🧰 Tools
🪛 actionlint (1.7.4)

79-79: "github.event.pull_request.head.ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details

(expression)

.github/workflows/talawa_admin_md_mdx_format_adjuster.py (3)

19-44: 🛠️ Refactor suggestion

Optimize regex patterns and add input validation

The function implementation is solid, but consider these improvements for robustness and performance:

 def escape_mdx_characters(text):
     """
     Escape special characters in a text string for MDX compatibility.
     Avoids escaping already escaped characters.

     Args:
         text: A string containing the text to be processed.

     Returns:
         A string with special characters (<, >, {, }) escaped, avoiding
         double escaping.
+
+    Raises:
+        TypeError: If input is not a string.
     """
+    if not isinstance(text, str):
+        raise TypeError("Input must be a string")
+
     # Regular expressions to find unescaped special characters
-    patterns = {
+    # Compile patterns once for better performance
+    PATTERNS = {
-        "<": r"(?<!\\)<",
-        ">": r"(?<!\\)>",
-        "{": r"(?<!\\){",
-        "}": r"(?<!\\)}"
+        "<": re.compile(r"(?<!\\)<"),
+        ">": re.compile(r"(?<!\\)>"),
+        "{": re.compile(r"(?<!\\){"),
+        "}": re.compile(r"(?<!\\)}")
     }

     # Replace unescaped special characters
-    for char, pattern in patterns.items():
-        text = re.sub(pattern, f"\\{char}", text)
+    for char, pattern in PATTERNS.items():
+        text = pattern.sub(f"\\{char}", text)

     return text
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

def escape_mdx_characters(text):
    """
    Escape special characters in a text string for MDX compatibility.
    Avoids escaping already escaped characters.

    Args:
        text: A string containing the text to be processed.

    Returns:
        A string with special characters (<, >, {, }) escaped, avoiding
        double escaping.

    Raises:
        TypeError: If input is not a string.
    """
    if not isinstance(text, str):
        raise TypeError("Input must be a string")

    # Regular expressions to find unescaped special characters
    # Compile patterns once for better performance
    PATTERNS = {
        "<": re.compile(r"(?<!\\)<"),
        ">": re.compile(r"(?<!\\)>"),
        "{": re.compile(r"(?<!\\){"),
        "}": re.compile(r"(?<!\\)}")
    }

    # Replace unescaped special characters
    for char, pattern in PATTERNS.items():
        text = pattern.sub(f"\\{char}", text)

    return text

45-65: ⚠️ Potential issue

Add robust error handling for file operations

The function needs better error handling for file operations to handle common scenarios gracefully.

 def process_file(filepath):
     """
     Process a single Markdown file for MDX compatibility.

     Args:
         filepath: The path to the Markdown file to process.

     Returns:
         None, writes the processed content back to the file only if there are changes.
+
+    Raises:
+        FileNotFoundError: If the file doesn't exist
+        PermissionError: If the file can't be accessed
+        OSError: For other file operation errors
     """
+    if not os.path.exists(filepath):
+        raise FileNotFoundError(f"File not found: {filepath}")
+
+    if not os.access(filepath, os.R_OK | os.W_OK):
+        raise PermissionError(f"Insufficient permissions for file: {filepath}")
+
+    try:
         with open(filepath, 'r', encoding='utf-8') as file:
             content = file.read()

         # Escape MDX characters
         new_content = escape_mdx_characters(content)

         # Write the processed content back to the file only if there is a change
         if new_content != content:
             with open(filepath, 'w', encoding='utf-8') as file:
                 file.write(new_content)
+    except UnicodeDecodeError:
+        raise OSError(f"File {filepath} is not valid UTF-8")
+    except OSError as e:
+        raise OSError(f"Error processing file {filepath}: {e}")
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

def process_file(filepath):
    """
    Process a single Markdown file for MDX compatibility.

    Args:
        filepath: The path to the Markdown file to process.

    Returns:
        None, writes the processed content back to the file only if there are changes.

    Raises:
        FileNotFoundError: If the file doesn't exist
        PermissionError: If the file can't be accessed
        OSError: For other file operation errors
    """
    if not os.path.exists(filepath):
        raise FileNotFoundError(f"File not found: {filepath}")

    if not os.access(filepath, os.R_OK | os.W_OK):
        raise PermissionError(f"Insufficient permissions for file: {filepath}")

    try:
        with open(filepath, 'r', encoding='utf-8') as file:
            content = file.read()

        # Escape MDX characters
        new_content = escape_mdx_characters(content)

        # Write the processed content back to the file only if there is a change
        if new_content != content:
            with open(filepath, 'w', encoding='utf-8') as file:
                file.write(new_content)
    except UnicodeDecodeError:
        raise OSError(f"File {filepath} is not valid UTF-8")
    except OSError as e:
        raise OSError(f"Error processing file {filepath}: {e}")

66-94: 🛠️ Refactor suggestion

Enhance main function with validation and progress reporting

The main function needs better error handling and user feedback, especially for large directories.

 def main():
     """
     Main function to process all Markdown files in a given directory.

     Scans for all Markdown files in the specified directory and processes each
     one for MDX compatibility.

     Args:
         None

     Returns:
         None
+
+    Raises:
+        SystemExit: If the specified directory doesn't exist
     """
     parser = argparse.ArgumentParser(description="Make Markdown files MDX compatible.")
     parser.add_argument(
         "--directory",
         type=str,
         required=True,
         help="Directory containing Markdown files to process."
     )

     args = parser.parse_args()
+    
+    if not os.path.isdir(args.directory):
+        print(f"Error: Directory '{args.directory}' does not exist")
+        sys.exit(1)
+
+    processed_files = 0
+    errors = []

     # Process each Markdown file in the directory
-    for root, _, files in os.walk(args.directory):
-        for file in files:
-            if file.lower().endswith(".md"):
-                process_file(os.path.join(root, file))
+    try:
+        for root, _, files in os.walk(args.directory):
+            for file in files:
+                if file.lower().endswith(".md"):
+                    filepath = os.path.join(root, file)
+                    try:
+                        process_file(filepath)
+                        processed_files += 1
+                        print(f"Processed: {filepath}")
+                    except Exception as e:
+                        errors.append(f"Error processing {filepath}: {e}")
+
+        print(f"\nProcessed {processed_files} files")
+        if errors:
+            print("\nErrors encountered:")
+            for error in errors:
+                print(f"- {error}")
+            sys.exit(1)
+    except Exception as e:
+        print(f"Error walking directory {args.directory}: {e}")
+        sys.exit(1)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

def main():
    """
    Main function to process all Markdown files in a given directory.

    Scans for all Markdown files in the specified directory and processes each
    one for MDX compatibility.

    Args:
        None

    Returns:
        None

    Raises:
        SystemExit: If the specified directory doesn't exist
    """
    parser = argparse.ArgumentParser(description="Make Markdown files MDX compatible.")
    parser.add_argument(
        "--directory",
        type=str,
        required=True,
        help="Directory containing Markdown files to process."
    )

    args = parser.parse_args()
    
    if not os.path.isdir(args.directory):
        print(f"Error: Directory '{args.directory}' does not exist")
        sys.exit(1)

    processed_files = 0
    errors = []

    # Process each Markdown file in the directory
    try:
        for root, _, files in os.walk(args.directory):
            for file in files:
                if file.lower().endswith(".md"):
                    filepath = os.path.join(root, file)
                    try:
                        process_file(filepath)
                        processed_files += 1
                        print(f"Processed: {filepath}")
                    except Exception as e:
                        errors.append(f"Error processing {filepath}: {e}")

        print(f"\nProcessed {processed_files} files")
        if errors:
            print("\nErrors encountered:")
            for error in errors:
                print(f"- {error}")
            sys.exit(1)
    except Exception as e:
        print(f"Error walking directory {args.directory}: {e}")
        sys.exit(1)

@palisadoes palisadoes changed the title Issues/fix issue 2505 Fixes #2505 Dec 11, 2024
@palisadoes
Copy link
Contributor

This PR has too many submitted files.

Please ensure the following:

  1. Fetch the latest upstream/develop-postgres files
  2. Make your PR modifications based on the local copy of this develop-postgres branch
  3. Submit your PRs against our develop-postgres branch.
  4. Your source branch in your local repository must not be the same as the target branch

Closing

@palisadoes palisadoes closed this Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants