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

manage button fixed #2460

Conversation

utkarshpra78
Copy link

@utkarshpra78 utkarshpra78 commented Nov 21, 2024

changing the height of the div and now the manage button does not overlap with address

Issue Number:

Fixes #2438

Did you add tests for your changes?

Snapshots/Videos:
Screenshot 2024-11h-21 220912

If relevant, did you update the documentation?

Summary

Does this PR introduce a breaking change?

Other information

Have you read the contributing guide?

Summary by CodeRabbit

  • New Features

    • Introduced a new configuration file for YAML language server settings.
    • Added a template for environment variables to assist in setting up the Talawa-admin application.
    • Implemented a new workflow for automatic dependency updates using Dependabot.
    • Enhanced pull request and issue templates to improve clarity and usability.
    • Added a comprehensive code style guide and installation instructions for developers.
    • Introduced localization support with new JSON files for multiple languages (English, French, Hindi, Spanish, Chinese).
  • Bug Fixes

    • Updated various error messages for better clarity and user experience.
  • Documentation

    • Added and improved documentation files, including installation and contribution guidelines.
  • Chores

    • Cleaned up and organized various configuration and setup files for better maintainability.
    • Removed outdated files related to previous CI/CD processes.
  • Tests

    • Added mock functions and test cases for better coverage of the new features.

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 4 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 Nov 21, 2024

Walkthrough

The pull request introduces significant changes across multiple files, primarily focusing on configuration, localization, and workflow enhancements for the Talawa Admin project. Key additions include a new .coderabbit.yaml for YAML language server settings, a .env.example for environment variable templates, and various localization files for multiple languages. Additionally, several workflow files are created or modified to improve CI/CD processes, including new scripts for checking local storage usage and updating documentation. The changes aim to streamline development and enhance user experience through better localization and automated processes.

Changes

File Path Change Summary
.coderabbit.yaml New configuration file for YAML language server settings.
.env.example New template for environment variables required for Talawa-admin application setup.
.eslintignore Added exclusion for src/components/CheckIn/tagTemplate.ts from linting.
.eslintrc.json Updated ESLint configuration to include new plugins, rules, and environment settings.
.github/ISSUE_TEMPLATE/bug-report.md Updated bug report template with new sections and improved metadata.
.github/ISSUE_TEMPLATE/feature-request.md Modified feature request template for consistency and added new sections.
.github/dependabot.yaml New configuration file for automated dependency updates.
.github/pull_request_template.md Enhanced pull request template with a detailed branching strategy and placeholders for tests.
.github/workflows/README.md New guidelines for contributing to GitHub workflows.
.github/workflows/codeql-codescan.yml New workflow for automating CodeQL code analysis.
.github/workflows/check-tsdoc.js New script for validating TypeScript files for TSDoc comments.
.github/workflows/pull-request.yml New comprehensive workflow for managing pull requests with multiple jobs for code quality checks.
public/locales/en/common.json New localization file for English UI strings.
public/locales/fr/common.json New localization file for French UI strings.
public/locales/hi/common.json New localization file for Hindi UI strings.
public/locales/sp/common.json New localization file for Spanish UI strings.
public/locales/zh/common.json New localization file for Chinese UI strings.
schema.graphql Comprehensive updates to the GraphQL schema with new types, inputs, and directives.
package.json Major updates including renaming the application, version changes, and dependency updates.
README.md Updated with new community links, a table of contents, and references to the new installation guide.
INSTALLATION.md New document providing setup instructions for the Talawa-admin application.

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 .env file
    alt .env file exists
        Setup Script->>Env File: Validate contents
    else .env file does not exist
        Setup Script->>Env File: Create .env from .env.example
    end
    Setup Script->>User: Prompt for custom port
    User->>Setup Script: Provide port
    Setup Script->>Env File: Update .env with port
    Setup Script->>User: Prompt for Talawa API URL
    User->>Setup Script: Provide API URL
    Setup Script->>API: Validate URL
    Setup Script->>Env File: Update .env with API URL
    Setup Script->>User: Prompt for reCAPTCHA
    User->>Setup Script: Provide reCAPTCHA site key
    Setup Script->>Env File: Update .env with reCAPTCHA key
    Setup Script->>User: Prompt for logging settings
    User->>Setup Script: Provide logging preference
    Setup Script->>Env File: Update .env with logging settings
    Setup Script->>User: Setup complete
Loading

Assessment against linked issues

Objective Addressed Explanation
Ensure PRs are submitted against develop branch (#2438)
Update documentation related to new features Documentation has been updated to reflect new changes.
Fix layout issues with UI components No specific changes addressing the manage button layout were made.

Possibly related PRs

Suggested reviewers

  • varshith257
  • pranshugupta54

Poem

🐇 In the meadow where changes bloom,
New config files dispel the gloom.
With each line, a clearer path,
For Talawa's growth, we share a laugh!
From languages rich to workflows bright,
Together we code, our future in sight! 🌼


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

We have these basic policies to make the approval process smoother for our volunteer team.

Testing Your Code

Please make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:

  1. The overall code coverage drops below the target threshold of the repository
  2. Any file in the pull request has code coverage levels below the repository threshold
  3. Merge conflicts

The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing.

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.

Actionable comments posted: 64

🧹 Outside diff range and nitpick comments (75)
.husky/post-merge (1)

4-4: Consider enhancing the robustness of the package.json check.

While the current implementation works, it could be made more robust with better error handling and absolute path resolution.

Consider this enhanced version:

-git diff HEAD^ HEAD --exit-code -- ./package.json || npm install
+# Get repository root directory
+REPO_ROOT="$(git rev-parse --show-toplevel)"
+
+# Check if package.json changed
+if ! git diff HEAD^ HEAD --exit-code -- "$REPO_ROOT/package.json"; then
+  echo "📦 package.json changed. Running npm install..."
+  if ! npm install; then
+    echo "❌ npm install failed. Please run it manually and check for errors."
+    exit 1
+  fi
+  echo "✅ Dependencies updated successfully!"
+fi

This version:

  1. Uses absolute path resolution for package.json
  2. Adds error handling for npm install
  3. Provides better feedback through echo statements
scripts/githooks/update-toc.js (2)

14-14: Enhance logging for better debugging

The current success message doesn't provide enough information about the operation's results.

Consider adding more detailed logging:

-console.log('Table of contents updated successfully.');
+const results = {
+  processed: [],
+  skipped: [],
+  failed: []
+};
+
+console.log('\nTable of contents update completed:');
+console.log(`✓ Successfully processed: ${results.processed.length} files`);
+if (results.skipped.length > 0) {
+  console.log(`⚠ Skipped: ${results.skipped.length} files`);
+}
+if (results.failed.length > 0) {
+  console.log(`✗ Failed: ${results.failed.length} files`);
+  process.exit(1);
+}

1-14: Consider adding configuration options

The script would benefit from being more configurable to handle different project needs:

  1. Allow specifying files/directories to ignore
  2. Support custom TOC options
  3. Enable configuration through package.json or a separate config file

Consider creating a configuration file (e.g., toc-config.json):

{
  "ignore": ["CHANGELOG.md", "node_modules/**/*.md"],
  "maxSize": 1048576,
  "tocOptions": {
    "bullets": "-",
    "maxDepth": 3
  }
}

This would make the script more flexible and reusable across different projects.

scripts/custom-test-env.js (2)

4-7: Consider enhancing the JSDoc documentation.

While the current documentation is good, it could be more comprehensive by:

  1. Adding @extends tag to document inheritance
  2. Explaining why these polyfills are specifically needed for PDF generation
 /**
  * A custom environment to set the TextEncoder and TextDecoder variables, that is required by @pdfme during testing.
  * Providing a polyfill to the environment for the same
+ * @extends {Environment}
+ * @description TextEncoder/TextDecoder are required for PDF binary data handling during testing,
+ * as JSDOM doesn't include these APIs by default.
  */

8-16: Consider adding error handling to the setup method.

The implementation is solid, but could benefit from try-catch error handling for the async setup.

 async setup() {
+  try {
     await super.setup();
     if (typeof this.global.TextEncoder === 'undefined') {
       this.global.TextEncoder = TextEncoder;
       this.global.TextDecoder = TextDecoder;
     }
+  } catch (error) {
+    console.error('Failed to setup custom test environment:', error);
+    throw error;
+  }
 }
scripts/__mocks__/@pdfme/generator.ts (3)

1-9: Add JSDoc documentation for the mock implementation.

Since this is a mock implementation, it would be helpful to add JSDoc documentation explaining its purpose, parameters, and return value. This helps other developers understand that this is a test mock and not the actual implementation.

 import type { Template } from '@pdfme/common';

+/**
+ * Mock implementation of PDF generator for testing purposes.
+ * Generates a mock PDF byte array with a valid PDF header followed by random content.
+ * 
+ * @param template - The PDF template configuration
+ * @param inputs - Array of key-value pairs for PDF content
+ * @returns Promise resolving to a Uint8Array containing mock PDF data
+ */
 export const generate = async ({
   template,
   inputs,

10-13: Clean up validation logic and improve error messaging.

The validation logic is good, but there are two improvements to consider:

  1. Remove the commented console.log as it's not needed and could cause confusion
  2. Make the error message more specific about which input was empty
   if (template.schemas.length === 0 || inputs.length === 0) {
-    // console.log('pdf error: length : ', template, inputs, inputs.length);
-    throw new Error('Template or inputs cannot be empty.');
+    throw new Error(
+      template.schemas.length === 0
+        ? 'Template schemas array cannot be empty'
+        : 'Inputs array cannot be empty'
+    );
   }

14-22: Optimize mock content generation using TypedArrays.

The current implementation is correct, but we can make it more efficient by using TypedArrays directly instead of creating an intermediate array.

   const pdfHeader = [0x25, 0x50, 0x44, 0x46]; // %PDF
   // Add some random content based on input size
   const contentSize = Math.min(template.schemas.length, inputs.length) * 10;
-  const mockContent = Array.from({ length: contentSize }, () =>
-    Math.floor(Math.random() * 256),
-  );
-  return Promise.resolve(new Uint8Array([...pdfHeader, ...mockContent]));
+  const result = new Uint8Array(pdfHeader.length + contentSize);
+  result.set(pdfHeader);
+  crypto.getRandomValues(result.subarray(pdfHeader.length));
+  return Promise.resolve(result);

This approach:

  1. Allocates the final buffer once
  2. Uses crypto.getRandomValues for better random number generation
  3. Avoids intermediate array creation
.github/workflows/codeql-codescan.yml (4)

14-20: Consider optimizing workflow triggers for better resource utilization

The current configuration runs on all branches which could be resource-intensive. Consider:

  1. Limiting to specific branches (e.g., main, develop) for push events
  2. Adding scheduled runs (e.g., weekly) to ensure regular security checks
 on:
   pull_request:
     branches:
-      - '**'  
+      - 'main'
+      - 'develop'
   push:
     branches:
-      - '**'   
+      - 'main'
+      - 'develop'
+  schedule:
+    - cron: '0 0 * * 0'  # Run weekly on Sunday
🧰 Tools
🪛 yamllint (1.29.0-1)

[error] 17-17: trailing spaces

(trailing-spaces)


[error] 20-20: trailing spaces

(trailing-spaces)


22-30: Enhance scanning coverage with additional languages

The current matrix only includes JavaScript. Consider adding TypeScript if your project uses it, as it's common in modern web applications.

       matrix:
-        language: [ 'javascript' ]
+        language: [ 'javascript', 'typescript' ]

31-44: Consider pinning action versions for better stability

Currently using major versions (v2, v4) which could lead to unexpected behavior if actions are updated. Consider pinning to specific versions.

-         uses: actions/checkout@v4
+         uses: actions/checkout@v4.1.1

-         uses: github/codeql-action/init@v2
+         uses: github/codeql-action/init@v2.22.5

-         uses: github/codeql-action/autobuild@v2
+         uses: github/codeql-action/autobuild@v2.22.5

-         uses: github/codeql-action/analyze@v2
+         uses: github/codeql-action/analyze@v2.22.5
🧰 Tools
🪛 yamllint (1.29.0-1)

[warning] 31-31: wrong indentation: expected 6 but found 7

(indentation)


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

(indentation)


1-44: Fix YAML formatting issues

The YAML file has some formatting inconsistencies:

  • Trailing spaces on lines 6, 17, and 20
  • Inconsistent indentation in steps section

Please run yamllint locally and fix these formatting issues.

🧰 Tools
🪛 yamllint (1.29.0-1)

[error] 6-6: trailing spaces

(trailing-spaces)


[error] 17-17: trailing spaces

(trailing-spaces)


[error] 20-20: trailing spaces

(trailing-spaces)


[warning] 31-31: wrong indentation: expected 6 but found 7

(indentation)


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

(indentation)

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

21-47: Consider expanding error handling test coverage.

The current error handling tests are good but could be more comprehensive. Consider adding:

  1. Tests for null/undefined values
  2. Verification of error type (not just message)
  3. Tests for invalid template schema

Here's an example of additional test cases:

  it('should throw an error when template is null', async () => {
    await expect(
      generate({ template: null as unknown as Template, inputs: [{ field1: 'value1' }] }),
    ).rejects.toThrow();
  });

  it('should throw an error when template schema is invalid', async () => {
    const invalidTemplate = { schemas: [{ invalid: 'schema' }] } as Template;
    await expect(
      generate({ template: invalidTemplate, inputs: [{ field1: 'value1' }] }),
    ).rejects.toThrow();
  });

  it('should throw a specific error type for validation failures', async () => {
    const emptyTemplate = { schemas: [] } as Template;
    await expect(
      generate({ template: emptyTemplate, inputs: [] }),
    ).rejects.toBeInstanceOf(Error);
  });
.github/pull_request_template.md (2)

1-12: Consider refining the branching strategy section presentation.

While the content is informative, consider these improvements for better professionalism:

  1. Remove "This section can be deleted after reading" as it might confuse contributors
  2. Rephrase the warning using a more professional tone while maintaining its importance
-<!--
-This section can be deleted after reading.
-
-We employ the following branching strategy to simplify the development process and to ensure that only stable code is pushed to the `master` branch:
-
-NOTE!!!
-
-ONLY SUBMIT PRS AGAINST OUR `DEVELOP` BRANCH. THE DEFAULT IS `MAIN`, SO YOU WILL HAVE TO MODIFY THIS BEFORE SUBMITTING YOUR PR FOR REVIEW. PRS MADE AGAINST `MAIN` WILL BE CLOSED.
--->
+<!--
+# Important: Branching Strategy
+
+We employ the following branching strategy to ensure code stability:
+
+- `develop`: For unstable code: New features and bug fixes.
+- `master`: Where the stable production ready code lies. Only security related bugs.
+
+⚠️ Important: Please submit PRs only against the `develop` branch. Note that the default branch is `main` - you must change this before submitting your PR. Pull requests against `main` will be closed.
+-->

48-53: Structure the remaining sections for better clarity.

The final sections could benefit from more structure and explicit requirements.

-**Other information**
-
-<!--Add extra information about this PR here-->
+**Other Information:** (Optional)
+
+<!--
+Examples:
+- Performance impact
+- Additional context
+- Related PRs
+-->
 
-**Have you read the [contributing guide](https://github.com/PalisadoesFoundation/talawa-admin/blob/master/CONTRIBUTING.md)?**
+**Contributing Guidelines:**
-<!--Yes or No-->
+<!-- Please check the box to confirm -->
+- [ ] I have read and agree to follow the [contributing guide](https://github.com/PalisadoesFoundation/talawa-admin/blob/master/CONTRIBUTING.md)
.github/workflows/stale.yml (2)

18-21: Remove trailing spaces

Clean up the trailing spaces in the permissions section for better YAML formatting.

 permissions:
   issues: write
-  pull-requests: write  
-  
+  pull-requests: write
🧰 Tools
🪛 yamllint (1.29.0-1)

[error] 20-20: trailing spaces

(trailing-spaces)


[error] 21-21: trailing spaces

(trailing-spaces)


27-43: Consider adjusting stale timeframes based on project activity

The configuration is well-structured with good defaults, but consider:

  1. The 10-day stale period might be too short for an active project
  2. The 180-day close period is quite generous and could lead to cluttered issues/PRs
  3. The operations-per-run limit of 30 is good for preventing API abuse

Recommendation: Monitor the effectiveness of these timeframes and adjust based on:

  • Average time to first response on issues/PRs
  • Team capacity and response patterns
  • Project release cycle
.github/workflows/check-tsdoc.js (2)

1-1: Remove redundant comment

The comment // Import fs.promises for async operations is redundant as the import statement is self-explanatory.

-import fs from 'fs/promises'; // Import fs.promises for async operations
+import fs from 'fs/promises';

4-11: Consider moving skip list to configuration file

The hard-coded list of files to skip would be better maintained in a separate configuration file. Additionally, add documentation explaining why these specific files are excluded from TSDoc validation.

Consider creating a tsdoc-config.json:

{
  "skipFiles": {
    "index.tsx": "Reason for exclusion",
    "EventActionItems.tsx": "Reason for exclusion",
    // ... other files with reasons
  }
}
.github/workflows/push.yml (4)

1-11: Add comprehensive workflow documentation

The header comment refers to a README but doesn't provide essential information about the workflow itself. Consider adding documentation that covers:

  • Purpose and objectives of this workflow
  • Trigger conditions and timing
  • Required secrets (e.g., CODECOV_TOKEN)
  • Expected outcomes and artifacts
 ##############################################################################
 ##############################################################################
 #
 # NOTE!
 #
-# Please read the README.md file in this directory that defines what should 
-# be placed in this file
+# Purpose: This workflow runs tests and reports code coverage to Codecov on every push
+#
+# Triggers: On push to any branch
+#
+# Required Secrets:
+# - CODECOV_TOKEN: Token for uploading coverage reports to Codecov
+#
+# Outputs:
+# - Test results and coverage reports uploaded to Codecov
 #
 ##############################################################################
 ##############################################################################
🧰 Tools
🪛 yamllint (1.29.0-1)

[error] 6-6: trailing spaces

(trailing-spaces)


14-18: Optimize workflow triggers

The current configuration runs on every push to any branch. Consider adding path filters to run only when relevant files change:

 on:
   push:
     branches:
-      - '**'   
+      - '**'
+    paths:
+      - '**.js'
+      - '**.jsx'
+      - '**.ts'
+      - '**.tsx'
+      - 'package.json'
+      - 'package-lock.json'
🧰 Tools
🪛 yamllint (1.29.0-1)

[error] 17-17: trailing spaces

(trailing-spaces)


[error] 18-18: trailing spaces

(trailing-spaces)


19-21: Fix environment variable indentation

The environment variable section has incorrect indentation.

 env:
-    CODECOV_UNIQUE_NAME: CODECOV_UNIQUE_NAME-${{ github.run_id }}-${{ github.run_number }}
+  CODECOV_UNIQUE_NAME: CODECOV_UNIQUE_NAME-${{ github.run_id }}-${{ github.run_number }}
🧰 Tools
🪛 yamllint (1.29.0-1)

[warning] 20-20: wrong indentation: expected 2 but found 4

(indentation)


[error] 21-21: trailing spaces

(trailing-spaces)


31-34: Use specific versions for GitHub Actions

Using the latest versions (@v4) of actions could lead to unexpected breaking changes. Consider pinning to specific versions for better stability.

-      - uses: actions/checkout@v4
-      - uses: actions/setup-node@v4
+      - uses: actions/checkout@v4.1.1
+      - uses: actions/setup-node@v4.0.1
jest.config.js (2)

4-4: Remove commented code if no longer needed

If react-app-polyfill/jsdom is not required, the commented line should be removed to maintain clean configuration.


60-65: Consider increasing test coverage thresholds

The current coverage thresholds are set quite low at 20% for lines and statements. This might not provide adequate test coverage for critical functionality. Consider:

  1. Gradually increasing the thresholds (e.g., to 70-80%)
  2. Adding thresholds for branches and functions
  3. Setting different thresholds for critical vs non-critical code paths

Example of improved coverage configuration:

coverageThreshold: {
  global: {
    branches: 70,
    functions: 70,
    lines: 70,
    statements: 70
  },
  // Stricter thresholds for critical paths
  'src/core/**/*.{ts,tsx}': {
    branches: 80,
    functions: 80,
    lines: 80,
    statements: 80
  }
}
scripts/githooks/check-localstorage-usage.js (2)

1-9: Add file extension validation and environment checks

Consider the following improvements:

  1. Either rename the file to .mjs or add "type": "module" to package.json for ES modules support
  2. Add validation for the execution environment to ensure it's run within a Git repository
 #!/usr/bin/env node

 import { readFileSync, existsSync } from 'fs';
 import path from 'path';
 import { execSync } from 'child_process';

+// Validate Git repository
+try {
+  execSync('git rev-parse --is-inside-work-tree', { stdio: 'ignore' });
+} catch (error) {
+  console.error('Error: Not a Git repository');
+  process.exit(1);
+}
+
 const args = process.argv.slice(2);
 const scanEntireRepo = args.includes('--scan-entire-repo');

82-96: Enhance error reporting with more context

Consider adding:

  1. Summary statistics (e.g., total files checked, number of issues found)
  2. Code examples showing correct usage of the custom hook
 if (filesWithLocalStorage.length > 0) {
+  console.info('\nSummary:');
+  console.info(`Total files checked: ${files.length}`);
+  console.info(`Files with issues: ${filesWithLocalStorage.length}`);
+
   console.error('\x1b[31m%s\x1b[0m', '\nError: Found usage of localStorage');
   console.error('\nFiles with localStorage usage:');
   filesWithLocalStorage.forEach((file) => console.error(file));

   console.info(
     '\x1b[34m%s\x1b[0m',
     '\nInfo: Consider using custom hook functions.'
   );
   console.info(
-    'Please use the getItem, setItem, and removeItem functions provided by the custom hook useLocalStorage.\n'
+    'Please use the custom hook useLocalStorage:\n' +
+    '\nExample:\n' +
+    'import { useLocalStorage } from \'./hooks/useLocalStorage\';\n' +
+    'const [value, setValue] = useLocalStorage(\'key\', defaultValue);\n'
   );

   process.exit(1);
 }
.github/workflows/issue.yml (4)

1-11: Consider enhancing the header documentation

The header references a README but doesn't provide the actual path to it. Consider adding the specific path to the README file for better developer experience.

- # Please read the README.md file in this directory that defines what should 
+ # Please read .github/workflows/README.md that defines what should 
🧰 Tools
🪛 yamllint (1.29.0-1)

[error] 6-6: trailing spaces

(trailing-spaces)


21-25: Consider removing unnecessary sparse checkout

The sparse checkout for a single file adds complexity without clear benefits. The auto-label.json5 could be included directly in the workflow file or referenced differently.


42-55: Simplify label logic for better maintainability

The current implementation using reduce for array checking could be simplified using more readable array methods.

-            if(labels.data.reduce((a, c)=>a||["dependencies"].includes(c.name), false))
+            const labelNames = labels.data.map(label => label.name);
+            if (labelNames.includes("dependencies")) {
               await github.rest.issues.addLabels({
                 owner: context.repo.owner,
                 repo: context.repo.repo,
                 issue_number: context.issue.number,
                 labels: ["good first issue", "security"]
               });
-            else if(labels.data.reduce((a, c)=>a||["security", "ui/ux"].includes(c.name), false))
+            } else if (labelNames.some(name => ["security", "ui/ux"].includes(name))) {
               await github.rest.issues.addLabels({
                 owner: context.repo.owner,
                 repo: context.repo.repo,
                 issue_number: context.issue.number,
                 labels: ["good first issue"]
               });
+            }

66-66: Fix formatting: Remove extra blank line

Remove the extra blank line at the end of the file to comply with YAML formatting standards.

🧰 Tools
🪛 yamllint (1.29.0-1)

[warning] 66-66: too many blank lines

(1 > 0) (empty-lines)

.github/workflows/talawa_admin_md_mdx_format_adjuster.py (1)

19-44: Consider performance and robustness improvements.

While the function works correctly, consider these enhancements:

  1. Move and compile regex patterns at module level
  2. Add input validation
  3. Define patterns as module constants

Here's the suggested implementation:

+# Compile patterns once at module level
+MDX_PATTERNS = {
+    "<": re.compile(r"(?<!\\)<"),
+    ">": re.compile(r"(?<!\\)>"),
+    "{": re.compile(r"(?<!\\){"),
+    "}": re.compile(r"(?<!\\)}")
+}

 def escape_mdx_characters(text):
+    if not isinstance(text, str):
+        raise TypeError("Input must be a string")
+
     # Regular expressions to find unescaped special characters
-    patterns = {
-        "<": r"(?<!\\)<",
-        ">": r"(?<!\\)>",
-        "{": r"(?<!\\){",
-        "}": r"(?<!\\)}"
-    }
-
     # Replace unescaped special characters
-    for char, pattern in patterns.items():
-        text = re.sub(pattern, f"\\{char}", text)
+    for char, pattern in MDX_PATTERNS.items():
+        text = pattern.sub(f"\\{char}", text)

     return text
ISSUE_GUIDELINES.md (3)

41-44: Fix formatting and capitalization in the Existing Issues section

The section needs consistent formatting and proper capitalization.

-   1. Ask for the issue to be assigned to you in the issue comments
-   2. Ask our contributors to assign it to you in `#talawa` slack channel.
+   1. Ask for the issue to be assigned to you in the issue comments.
+   2. Ask our contributors to assign it to you in the `#talawa` Slack channel.
🧰 Tools
🪛 LanguageTool

[grammar] ~44-~44: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...butors to assign it to you in #talawa slack channel. Working on these types of exi...

(ON_SKYPE)


52-54: Fix capitalization in the Monitoring section

Ensure proper capitalization of "Slack" for consistency.

-1. Join our `#talawa-github` slack channel for automatic issue and pull request updates.
+1. Join our `#talawa-github` Slack channel for automatic issue and pull request updates.
🧰 Tools
🪛 LanguageTool

[grammar] ~53-~53: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...ew Issues 1. Join our #talawa-github slack channel for automatic issue and pull re...

(ON_SKYPE)


57-59: Improve formatting and clarity in the General Guidelines section

The guidelines need consistent formatting and more specific guidance.

-1. Discuss issues in our various slack channels when necessary
-2. Please do not derail or troll issues. 
-3. Keep the discussion on topic and respect the opinions of others.
+1. Discuss issues in our various Slack channels when necessary.
+2. Keep discussions focused on the issue at hand.
+3. Be respectful and constructive in all interactions.
+4. Follow up on your issues and update them when needed.
🧰 Tools
🪛 LanguageTool

[grammar] ~57-~57: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...lines 1. Discuss issues in our various slack channels when necessary 2. Please do no...

(ON_SKYPE)


[typographical] ~57-~57: Consider adding a comma here.
Context: ...ur various slack channels when necessary 2. Please do not derail or troll issues. 3. Keep...

(PLEASE_COMMA)

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

45-46: Fix list item numbering

The numbered list uses duplicate numbers (1. and 1.) which may cause confusion.

Apply this diff to fix the numbering:

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

6-6: Remove trailing spaces

Multiple lines contain trailing spaces which should be removed for consistency.

Remove trailing spaces from lines 6, 13, 15, 36, 42, and 67.

Also applies to: 13-13, 15-15, 36-36, 42-42, 67-67

🧰 Tools
🪛 yamllint (1.29.0-1)

[error] 6-6: trailing spaces

(trailing-spaces)

README.md (1)

53-56: Fix markdown formatting

Remove the extra spaces after the hash in the heading for consistency with markdown style guidelines.

-#  Videos
+# Videos
🧰 Tools
🪛 Markdownlint (0.35.0)

53-53: null
Multiple spaces after hash on atx style heading

(MD019, no-multiple-space-atx)

🪛 LanguageTool

[uncategorized] ~56-~56: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...)" videos are extremely helpful for new open source contributors.

(EN_COMPOUND_ADJECTIVE_INTERNAL)

.github/workflows/eslint_disable_check.py (4)

29-48: Consider enhancing the eslint-disable detection pattern.

While the current implementation works, consider these improvements:

  1. The regex pattern could be more precise to catch additional variations
  2. The error handling could be more specific to different types of exceptions

Consider this enhanced implementation:

-    eslint_disable_pattern = re.compile(r'//\s*eslint-disable(?:-next-line|-line)?', re.IGNORECASE)
+    eslint_disable_pattern = re.compile(r'(?://|/\*)\s*eslint-disable(?:-next-line|-line)?(?:\s.*)?(?:\*/)?', re.IGNORECASE)

-    except Exception as e:
+    except (IOError, OSError) as e:
         print(f"Error reading file {file_path}: {e}")
         return False
+    except UnicodeDecodeError as e:
+        print(f"Error decoding file {file_path}: {e}")
+        return False

This change:

  • Catches both single-line and multi-line eslint-disable comments
  • Handles specific file operation exceptions separately

61-61: Rename unused loop variable.

The loop control variable dirs is not used within the loop body.

-    for root, dirs, files in os.walk(os.path.join(directory, 'src')):
+    for root, _dirs, files in os.walk(os.path.join(directory, 'src')):
🧰 Tools
🪛 Ruff (0.7.0)

61-61: Loop control variable dirs not used within loop body

Rename unused dirs to _dirs

(B007)


76-90: Consider adding directory path validation.

While the function works correctly, consider adding path validation to ensure the directory argument is an absolute path or converting it to one.

     parser.add_argument(
         "--directory",
         type=str,
         default=os.getcwd(),
-        help="Path to the directory to check (default: current directory)"
+        help="Path to the directory to check (default: current directory)",
+        type=lambda x: os.path.abspath(x)
     )

91-120: Consider enhancing error handling in main function.

While the current implementation handles basic errors, consider adding more comprehensive error handling.

     try:
         args = arg_parser_resolver()
+    except argparse.ArgumentError as e:
+        print(f"Error parsing arguments: {e}")
+        sys.exit(1)

-    if not os.path.exists(args.directory):
-        print(f"Error: The specified directory '{args.directory}' does not exist.")
+    if not os.path.isdir(args.directory):
+        print(f"Error: '{args.directory}' is not a valid directory.")
         sys.exit(1)

+    try:
         # Check eslint in the specified directory
         eslint_found = check_eslint(args.directory)
+    except Exception as e:
+        print(f"Error during eslint check: {e}")
+        sys.exit(1)
.eslintrc.json (2)

32-39: LGTM! Consider documenting plugin choices.

The plugin configuration is well-structured and includes essential tools for TypeScript, documentation, and code formatting. Consider adding a comment block explaining the purpose of each plugin for future maintainers.


Line range hint 1-142: Recommend separating ESLint changes into a dedicated PR.

While these ESLint configuration changes are valuable improvements, they appear to be unrelated to the PR's stated objective of fixing the "manage" button overlap issue (#2438). To maintain clear change history and facilitate review:

  1. Create a separate PR for these ESLint configuration changes
  2. Keep the current PR focused on the UI fix
  3. Include appropriate documentation for the tooling changes in the new PR

This separation will help maintain the single responsibility principle at the PR level.

PR_GUIDELINES.md (3)

1-6: Enhance readability of the introduction

Consider these refinements to improve clarity and professionalism:

# Pull Request Guidelines

-:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
+:+1: :tada: First off, thanks for taking the time to contribute! :tada: :+1:

-In order to give everyone a chance to submit a pull request and contribute to the Talawa project, we have put restrictions in place. This section outlines the guidelines that should be imposed upon pull requests in the Talawa project.
+To ensure fair contribution opportunities, we have established guidelines for pull requests in the Talawa project. This section outlines these requirements.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~2-~2: Loose punctuation mark.
Context: # Pull Request Guidelines 👍🎉 First off, thanks for taking t...

(UNLIKELY_OPENING_PUNCTUATION)


[style] ~4-~4: Consider a shorter alternative to avoid wordiness.
Context: ...ing the time to contribute! 🎉👍 In order to give everyone a chance to submit a pull...

(IN_ORDER_TO_PREMIUM)


31-42: Add language specifiers to code blocks

Add language specifiers to the code blocks for proper syntax highlighting:

-```
+```bash
npm run lint:fix
npm run format:fix

- +bash
npm run lint:check
npm run format:check


<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint (0.35.0)</summary>

31-31: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

39-39: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

---

`52-69`: **Improve document structure and reduce redundancy**

The guidelines contain some redundant information and could benefit from better organization:

1. Consolidate the information about the `develop` branch:
   - Remove the heading at line 52 and include it as part of the main guidelines
   - Combine points at lines 54 and 58 about PR requirements

2. Consider grouping related guidelines:
   - PR Quality (lines 60-62)
   - Communication Guidelines (lines 64, 69)
   - Process Requirements (lines 55-57)
   - Code Management (lines 65-68)

Example restructuring:
```markdown
## Pull Request Processing

### Requirements
- Submit PRs only against the `develop` branch (not `main`)
- Ensure all tests are passing
- Include complete test coverage
- Link to relevant issues

### Quality Guidelines
- Follow the PR template
- Keep PRs atomic and focused
- Maintain code quality standards
- Disclose borrowed code

### Process
- No draft PRs
- One PR per contributor at a time
- Keep assigned reviewers
- Resolve conflicts promptly

### Communication
- Respond within 48 hours
- Avoid @mentioning contributors
- Add new commits instead of force pushing
🧰 Tools
🪛 LanguageTool

[style] ~56-~56: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...o be closed. The quality of our code is very important to us. Therefore we make experienced ma...

(EN_WEAK_ADJECTIVE)


[uncategorized] ~56-~56: A comma may be missing after the conjunctive/linking adverb ‘Therefore’.
Context: ...ty of our code is very important to us. Therefore we make experienced maintainers of our ...

(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)


[style] ~59-~59: Consider using a different verb for a more formal wording.
Context: ...check if all tests are passing; if not, fix the issues and then create a pull reque...

(FIX_RESOLVE)


[style] ~64-~64: This expression is wordy and overused. Consider replacing it with a more concise and formal alternative.
Context: ...wer your questions, but we'll get to it sooner or later. @mentioning someone just adds to the p...

(SOONER_OR_LATER)


[uncategorized] ~64-~64: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...adds to the pile of notifications we get and it won't make us look at your issue fas...

(COMMA_COMPOUND_SENTENCE)


[style] ~65-~65: Consider shortening or rephrasing this to strengthen your wording.
Context: ...ue faster. 1. Do not force push. If you make changes to your pull request, please simply add a ...

(MAKE_CHANGES)

package.json (1)

Line range hint 1-167: PR scope exceeds stated objectives

This PR's changes to package.json introduce significant architectural changes:

  1. Migration to ES modules
  2. Switch to Vite from react-scripts
  3. Major version bump
  4. Multiple new dependencies

These changes far exceed the stated objective of fixing a UI button overlap issue. Consider:

  1. Splitting these changes into separate PRs
  2. Documenting the architectural changes
  3. Adding migration guides

Please create separate PRs for:

  1. UI fix (original scope)
  2. Build system migration
  3. Dependency updates
  4. TypeScript/testing updates
.github/workflows/countline.py (4)

1-26: Enhance documentation with usage examples and exit codes.

The documentation is well-structured, but consider adding:

  • Example usage with common command-line arguments
  • Description of exit codes (0 for success, 1 for violations)
  • Expected output format for violations
 """Script to encourage more efficient coding practices.

 Methodology:

     Analyses the `lib` and `test` directories to find files that exceed a
     pre-defined number of lines of code.

     This script was created to help improve code quality by encouraging
     contributors to create reusable code.

 NOTE:

     This script complies with our python3 coding and documentation standards
     and should be used as a reference guide. It complies with:

         1) Pylint
         2) Pydocstyle
         3) Pycodestyle
         4) Flake8

     Run these commands from the CLI to ensure the code is compliant for all
     your pull requests.

+Example Usage:
+    python3 countline.py --lines 300 --directory ./src
+    python3 countline.py --exclude_files file1.py file2.py
+    python3 countline.py --exclude_directories tests/fixtures docs
+
+Exit Codes:
+    0: No violations found
+    1: Files exceeding line count limit found
+
+Output Format:
+    When violations are found, outputs:
+    - Header indicating line count errors
+    - List of files with their line counts
+    - Summary with total number of violations
 """

35-56: Simplify validation logic for better readability.

The current implementation uses double negation which makes the logic harder to follow.

 def _valid_filename(filepath):
-    # Initialize key variables
     invalid_filenames = [".test.", ".spec."]
-    result = True
-
-    # Test
-    for invalid_filename in invalid_filenames:
-        if invalid_filename.lower() not in filepath.lower():
-            continue
-        result = False
-
-    return result
+    return not any(
+        invalid.lower() in filepath.lower()
+        for invalid in invalid_filenames
+    )

58-79: Simplify extension validation logic.

Similar to the filename validation, this can be simplified using any().

 def _valid_extension(filepath):
-    # Initialize key variables
     invalid_extensions = [".css", ".jpg", ".png", ".jpeg"]
-    result = True
-
-    # Test
-    for invalid_extension in invalid_extensions:
-        if filepath.lower().endswith(invalid_extension.lower()) is False:
-            continue
-        result = False
-
-    return result
+    return not any(
+        filepath.lower().endswith(ext.lower())
+        for ext in invalid_extensions
+    )

145-195: Extract default values as constants.

Move default values to module-level constants for better maintainability.

+DEFAULT_MAX_LINES = 300
+DEFAULT_DIRECTORY = os.getcwd()
+
 def _arg_parser_resolver():
     parser = argparse.ArgumentParser()
     parser.add_argument(
         "--lines",
         type=int,
         required=False,
-        default=300,
+        default=DEFAULT_MAX_LINES,
         help="The maximum number of lines of code to accept.",
     )
CODE_STYLE.md (5)

5-7: Remove redundant statement about code style enforcement

Lines 5 and 7 convey the same message about code style adherence. Consider removing line 7 to maintain document conciseness.

 The code style must be strictly adhered to, to ensure that there is consistency throughout the contributions made to Talawa-Admin
-code style should not be changed and must be followed.

26-38: Add TypeScript-specific coding standards

While TypeScript is listed in the tech stack, the document lacks TypeScript-specific guidelines. Consider adding a section that covers:

  • Type annotations and interfaces
  • Generic types usage
  • Type assertions
  • Null checking

Would you like me to help draft the TypeScript guidelines section?


162-167: Enhance import sorting guidelines

While the import grouping is well-defined, consider adding guidelines for sorting imports within each group (alphabetically or by path length) to maintain consistency across the codebase.

🧰 Tools
🪛 Markdownlint (0.35.0)

164-164: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


165-165: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


166-166: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)

🪛 LanguageTool

[uncategorized] ~165-~165: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...following order: - React imports - Third party imports - Local imports If there is...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


187-189: Add Bootstrap theme customization guidelines

While the SCSS compilation instructions are clear, consider adding guidelines for:

  • Bootstrap theme variable customization
  • Color scheme overrides
  • Component-specific theme modifications
  • Responsive breakpoint customization

1-253: Fix markdown formatting issues

Several markdown formatting issues need attention:

  1. Specify language for all code blocks (e.g., jsx, scss)
  2. Use proper heading syntax instead of emphasis (e.g., ## Wrong way ❌ instead of **Wrong way ❌**)
  3. Fix list indentation to be consistent throughout the document
🧰 Tools
🪛 Markdownlint (0.35.0)

128-128: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


129-129: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


130-130: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


131-131: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


132-132: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


133-133: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


134-134: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


135-135: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


136-136: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


137-137: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


164-164: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


165-165: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


166-166: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


57-57: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


73-73: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


75-75: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


92-92: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


190-190: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


230-230: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


58-58: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


65-65: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


78-78: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


95-95: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


158-158: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


173-173: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


181-181: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


239-239: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


245-245: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


251-251: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🪛 LanguageTool

[style] ~127-~127: Consider removing “of” to be more concise
Context: ...tories of src assets - This houses all of the static assets used in the project - `...

(ALL_OF_THE)


[style] ~128-~128: Consider removing “of” to be more concise
Context: ... in the project - css - This houses all of the css files used in the project - `imag...

(ALL_OF_THE)


[style] ~129-~129: Consider removing “of” to be more concise
Context: ... the project - images - This houses all of the images used in the project - scss -...

(ALL_OF_THE)


[style] ~130-~130: Consider removing “of” to be more concise
Context: ...in the project - scss - This houses all of the scss files used in the project - `c...

(ALL_OF_THE)


[grammar] ~134-~134: The singular proper name ‘Sass’ must be used with a third-person or a past tense verb.
Context: ...rms - _talawa.scss - Partial Sass file for Talawa - _utilities.scss - Pa...

(HE_VERB_AGR)


[grammar] ~135-~135: The singular proper name ‘Sass’ must be used with a third-person or a past tense verb.
Context: ... - _utilities.scss - Partial Sass file for utilities - _variables.scss -...

(HE_VERB_AGR)


[grammar] ~136-~136: The singular proper name ‘Sass’ must be used with a third-person or a past tense verb.
Context: ... - _variables.scss - Partial Sass file for variables - app.scss - Main S...

(HE_VERB_AGR)


[style] ~141-~141: Consider removing “of” to be more concise
Context: ...views/screens Constant - This houses all of the constants used in the project `GraphQl...

(ALL_OF_THE)


[style] ~143-~143: Consider removing “of” to be more concise
Context: ...in the project GraphQl - This houses all of the GraphQL queries and mutations used in t...

(ALL_OF_THE)


[style] ~145-~145: Consider removing “of” to be more concise
Context: ...in the project screens - This houses all of the views/screens to be navigated through i...

(ALL_OF_THE)


[style] ~147-~147: Consider removing “of” to be more concise
Context: ... in Talawa-Admin state - This houses all of the state management code for the project ...

(ALL_OF_THE)


[uncategorized] ~165-~165: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...following order: - React imports - Third party imports - Local imports If there is...

(EN_COMPOUND_ADJECTIVE_INTERNAL)

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

22-24: Consider workflow optimizations

While the job structure is good, consider these optimizations:

  1. Add job timeouts to prevent hung jobs
  2. Use composite actions for repeated steps
  3. Add concurrency limits for resource management
jobs:
+ # Add concurrency control
+ concurrency:
+   group: ${{ github.workflow }}-${{ github.ref }}
+   cancel-in-progress: true
+
  Code-Quality-Checks:
    name: Performs linting, formatting, type-checking, checking for different source and target branch
    runs-on: ubuntu-latest
+   timeout-minutes: 15
CONTRIBUTING.md (6)

27-27: Consider adding "please" to maintain a polite tone

Consider revising to: "Please let us know immediately if you have unacceptable experiences in this area."

🧰 Tools
🪛 LanguageTool

[style] ~27-~27: This expression usually appears with a “please” in front of it.
Context: ...DUCT.md) to understand what this means. Let us know immediately if you have unacceptable ex...

(INSERT_PLEASE)


34-34: Add hyphen in compound adjective

Change "open source contributors" to "open-source contributors" as it's used as a compound adjective.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~34-~34: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...)" videos are extremely helpful for new open source contributors. ## Ways to Contribute I...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


40-42: Maintain consistent capitalization for proper nouns

Capitalize "Slack" throughout the document as it's a proper noun:

  • Line 40: "Join our Slack"
  • Line 75: "in the Slack channel"
  • Line 77: "in Slack channel"

Also applies to: 75-75, 77-77


62-62: Fix grammatical issues for better clarity

Several grammatical improvements needed:

  1. Line 62: Change to "is the best resource"
  2. Line 73: Add comma after "Usually"
  3. Line 77: Change "Last but not the least" to "Finally"
  4. Line 78: Add comma after "last resort"

Also applies to: 73-73, 77-78

🧰 Tools
🪛 LanguageTool

[grammar] ~62-~62: A determiner may be missing.
Context: ...l Request guidelines](PR_GUIDELINES.md) is best resource to follow to start working on ...

(THE_SUPERLATIVE)


104-145: Add language specifications to code blocks

Add language specifications to all fenced code blocks for proper syntax highlighting. For example:

- ```
+ ```bash
npm install
🧰 Tools
🪛 Markdownlint (0.35.0)

104-104: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


113-113: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


128-128: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


139-139: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


143-143: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🪛 LanguageTool

[grammar] ~135-~135: The operating system from Apple is written “macOS”.
Context: ...r packages can be found for Windows and MacOS. 6. The currently acceptable c...

(MAC_OS)


135-135: Fix technical terminology and punctuation

  1. Line 135: Change "MacOS" to "macOS"
  2. Line 167: Add comma after "CI" in "on CI once a PR"

Also applies to: 167-167

🧰 Tools
🪛 LanguageTool

[grammar] ~135-~135: The operating system from Apple is written “macOS”.
Context: ...r packages can be found for Windows and MacOS. 6. The currently acceptable c...

(MAC_OS)

INSTALLATION.md (7)

142-315: Add language specifiers to code blocks

Several code blocks are missing language specifiers, which affects syntax highlighting and readability.

Add appropriate language specifiers to code blocks. For example:

-```
+```bash
npm install

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint (0.35.0)</summary>

142-142: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

154-154: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

164-164: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

188-188: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

194-194: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

200-200: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

208-208: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

214-214: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

220-220: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

240-240: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

256-256: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

264-264: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

270-270: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

292-292: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

300-300: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

313-313: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

178-178: Expected: #setting-up-react_app_talawa_url-in-env-file; Actual: #setting-up-REACT_APP_TALAWA_URL-in-env-file
Link fragments should be valid

(MD051, link-fragments)

---

178-178: Expected: #setting-up-react_app_recaptcha_site_key-in-env-file; Actual: #setting-up-REACT_APP_RECAPTCHA_SITE_KEY-in-env-file
Link fragments should be valid

(MD051, link-fragments)

</details>
<details>
<summary>🪛 LanguageTool</summary>

[uncategorized] ~158-~158: Possible missing comma found.
Context: ...ions in "setup" can be done manually as well and here's how to do it. - [Creating .e...

(AI_HYDRA_LEO_MISSING_COMMA)

---

[uncategorized] ~162-~162: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...at runtime. It is not a part of the repo and you will have to create it. For a sampl...

(COMMA_COMPOUND_SENTENCE)

---

[uncategorized] ~162-~162: Possible missing comma found.
Context: ...ve to create it. For a sample of `.env` file there is a file named `.env.example` in...

(AI_HYDRA_LEO_MISSING_COMMA)

---

[uncategorized] ~224-~224: Possible missing preposition found.
Context: ...`  For additional details, please refer the `How to Access the Talawa-API URL` sect...

(AI_HYDRA_LEO_MISSING_TO)

---

[grammar] ~228-~228: The word “setup” is a noun. The verb is spelled with a space.
Context: ...E_KEY in .env file  You may not want to setup reCAPTCHA since the project will still ...

(NOUN_VERB_CONFUSION)

---

[grammar] ~232-~232: The word “setup” is a noun. The verb is spelled with a space.
Context: ...ad the following steps.  If you want to setup Google reCAPTCHA now, you may refer to ...

(NOUN_VERB_CONFUSION)

---

[typographical] ~246-~246: Except for inverted sentences, ‘need them’ requires a question mark at the end of the sentence.
Context: ...t need them or want to keep the console clean  # Post Configuration Steps  It's now t...

(MD_PRP_QUESTION_MARK)

---

[uncategorized] ~261-~261: Did you mean: “By default,”?
Context: ...n serve ```  ## Accessing Talawa-Admin  By default `talawa-admin` runs on port `4321` on y...

(BY_DEFAULT_COMMA)

---

[uncategorized] ~278-~278: Possible missing comma found.
Context: ... navigate to the running talawa-admin's website you'll land at talawa-admin registratio...

(AI_HYDRA_LEO_MISSING_COMMA)

---

[grammar] ~311-~311: The word ‘lint’ is a noun or an adjective. A verb or adverb is missing or misspelled here, or maybe a comma is missing.
Context: ...w.webp)  ## Linting code files  You can lint your code files using this command:  ``...

(PRP_MD_NN)

</details>

</details>

---

`188-202`: **Standardize URL formats in code examples**

The API URL examples should follow a consistent format and include proper placeholders.

```diff
-REACT_APP_TALAWA_URL="http://API-IP-ADRESS:4000/graphql/"
+REACT_APP_TALAWA_URL="http://<API_IP_ADDRESS>:4000/graphql/"

-REACT_APP_TALAWA_URL="http://YOUR-REMOTE-ADDRESS:4000/graphql/"
+REACT_APP_TALAWA_URL="http://<YOUR_REMOTE_ADDRESS>:4000/graphql/"

Also applies to: 208-222

🧰 Tools
🪛 Markdownlint (0.35.0)

188-188: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


194-194: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


200-200: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


246-247: Improve clarity of environment variable description

The description of the ALLOW_LOGS environment variable needs better formatting and punctuation.

-Set the `ALLOW_LOGS` to "YES" if you want warnings , info and error messages in your console or leave it blank if you dont need them or want to keep the console clean
+Set the `ALLOW_LOGS` environment variable to "YES" if you want warnings, info, and error messages in your console. Leave it blank if you don't need them or want to keep the console clean.
🧰 Tools
🪛 LanguageTool

[typographical] ~246-~246: Except for inverted sentences, ‘need them’ requires a question mark at the end of the sentence.
Context: ...t need them or want to keep the console clean # Post Configuration Steps It's now t...

(MD_PRP_QUESTION_MARK)


67-67: Fix "setup" vs "set up" usage

The word "setup" is incorrectly used as a verb in several places. It should be "set up" when used as a verb.

-navigate to the folder where you want to setup the repository
+navigate to the folder where you want to set up the repository

-commands to setup your node environment
+commands to set up your node environment

-You may not want to setup reCAPTCHA
+You may not want to set up reCAPTCHA

-If you want to setup Google reCAPTCHA
+If you want to set up Google reCAPTCHA

Also applies to: 123-123, 228-228, 232-232

🧰 Tools
🪛 LanguageTool

[grammar] ~67-~67: The word “setup” is a noun. The verb is spelled with a space.
Context: ...avigate to the folder where you want to setup the repository. 2. Open a cmd (Window...

(NOUN_VERB_CONFUSION)


68-68: Fix macOS capitalization

The operating system name "MacOS" should be written as "macOS".

-`terminal` (Linux or MacOS)
+`terminal` (Linux or macOS)

-packages in Windows, Linux and MacOS
+packages in Windows, Linux and macOS

-For Linux and MacOS, use the
+For Linux and macOS, use the

Also applies to: 102-102, 119-119

🧰 Tools
🪛 LanguageTool

[grammar] ~68-~68: The operating system from Apple is written “macOS”.
Context: ...cmd (Windows) or terminal (Linux or MacOS) session in this folder. 1. An easy ...

(MAC_OS)


224-224: Fix missing preposition in documentation reference

The sentence is missing the preposition "to" when referring to documentation.

-For additional details, please refer the `How to Access the Talawa-API URL`
+For additional details, please refer to the `How to Access the Talawa-API URL`
🧰 Tools
🪛 LanguageTool

[uncategorized] ~224-~224: Possible missing preposition found.
Context: ... For additional details, please refer theHow to Access the Talawa-API URL` sect...

(AI_HYDRA_LEO_MISSING_TO)


298-298: Fix typo in "browser" word

There's a typo in the word "browser".

-You can see the output of failing tests in broswer by running
+You can see the output of failing tests in browser by running
setup.ts (1)

81-96: Refactor repetitive code by creating a helper function

The code for reading, modifying, and writing the .env file is repeated multiple times. Consider creating a helper function to reduce duplication and improve maintainability.

Create a helper function like this:

async function updateEnvVariable(key: string, value: string): Promise<void> {
  const envPath = '.env';
  try {
    const data = await fs.promises.readFile(envPath, 'utf8');
    const envVars = dotenv.parse(data);
    envVars[key] = value;
    const updatedEnvContent = Object.entries(envVars)
      .map(([k, v]) => `${k}=${v}`)
      .join('\n');
    await fs.promises.writeFile(envPath, updatedEnvContent, 'utf8');
  } catch (err) {
    console.error(`Error updating ${key} in .env file:`, err);
  }
}

Then, replace the repetitive code with calls to updateEnvVariable:

await updateEnvVariable('PORT', customPort);
await updateEnvVariable('REACT_APP_TALAWA_URL', endpoint);
await updateEnvVariable('REACT_APP_BACKEND_WEBSOCKET_URL', websocketUrl);
await updateEnvVariable('REACT_APP_USE_RECAPTCHA', 'yes');
// And so on for other variables

Also applies to: 153-159, 174-177

.github/workflows/compare_translations.py (1)

1-49: Simplify the module docstring to adhere to PEP 257 standards.

The module docstring is excessively verbose and includes redundant information. According to PEP 257, module docstrings should be concise and provide a brief overview of the module's purpose without detailing every function and attribute. Consider condensing the docstring to focus on the script's high-level functionality.

schema.graphql (2)

271-273: Interface Name Inconsistency: Error vs. FieldError

Both interfaces Error (lines 271-273) and FieldError (lines 420-423) include a message field. To maintain consistency and avoid confusion, consider unifying or clearly distinguishing these interfaces.

Evaluate whether these interfaces can be combined or renamed to better reflect their purposes.

Also applies to: 420-423


373-398: Field Names in EventWhereInput Should Follow Naming Conventions

In the EventWhereInput input type (lines 373-398), the field organization_id (line 391) uses an underscore, whereas other fields use camelCase.

For consistency, rename organization_id to organizationId.

- organization_id: ID
+ organizationId: ID
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between e9531ff and 5806db0.

⛔ Files ignored due to path filters (75)
  • package-lock.json is excluded by !**/package-lock.json
  • public/favicon.ico is excluded by !**/*.ico
  • public/favicon_palisadoes.ico is excluded by !**/*.ico
  • public/images/logo512.png is excluded by !**/*.png
  • public/images/svg/angleDown.svg is excluded by !**/*.svg
  • public/images/svg/arrow-left.svg is excluded by !**/*.svg
  • public/images/svg/arrow-right.svg is excluded by !**/*.svg
  • public/images/svg/attendees.svg is excluded by !**/*.svg
  • public/images/svg/feedback.svg is excluded by !**/*.svg
  • public/images/svg/profiledefault.svg is excluded by !**/*.svg
  • public/images/svg/up-down.svg is excluded by !**/*.svg
  • public/logo192.png is excluded by !**/*.png
  • public/markdown/images/install1.png is excluded by !**/*.png
  • public/markdown/images/install2.png is excluded by !**/*.png
  • src/assets/css/app.css.map is excluded by !**/*.map
  • src/assets/images/blank.png is excluded by !**/*.png
  • src/assets/images/bronze.png is excluded by !**/*.png
  • src/assets/images/defaultImg.png is excluded by !**/*.png
  • src/assets/images/gold.png is excluded by !**/*.png
  • src/assets/images/palisadoes_logo.png is excluded by !**/*.png
  • src/assets/images/silver.png is excluded by !**/*.png
  • src/assets/images/talawa-logo-600x600.png is excluded by !**/*.png
  • src/assets/images/talawa-logo-dark-200x200.png is excluded by !**/*.png
  • src/assets/images/talawa-logo-lite-200x200.png is excluded by !**/*.png
  • src/assets/svgs/Attendance.svg is excluded by !**/*.svg
  • src/assets/svgs/actionItem.svg is excluded by !**/*.svg
  • src/assets/svgs/admin.svg is excluded by !**/*.svg
  • src/assets/svgs/agenda-category-icon.svg is excluded by !**/*.svg
  • src/assets/svgs/agenda-items.svg is excluded by !**/*.svg
  • src/assets/svgs/angleRight.svg is excluded by !**/*.svg
  • src/assets/svgs/article.svg is excluded by !**/*.svg
  • src/assets/svgs/blockUser.svg is excluded by !**/*.svg
  • src/assets/svgs/blockedUser.svg is excluded by !**/*.svg
  • src/assets/svgs/cardItemDate.svg is excluded by !**/*.svg
  • src/assets/svgs/cardItemEvent.svg is excluded by !**/*.svg
  • src/assets/svgs/cardItemLocation.svg is excluded by !**/*.svg
  • src/assets/svgs/chat.svg is excluded by !**/*.svg
  • src/assets/svgs/checkInRegistrants.svg is excluded by !**/*.svg
  • src/assets/svgs/dashboard.svg is excluded by !**/*.svg
  • src/assets/svgs/date.svg is excluded by !**/*.svg
  • src/assets/svgs/event.svg is excluded by !**/*.svg
  • src/assets/svgs/events.svg is excluded by !**/*.svg
  • src/assets/svgs/flask.svg is excluded by !**/*.svg
  • src/assets/svgs/funds.svg is excluded by !**/*.svg
  • src/assets/svgs/key.svg is excluded by !**/*.svg
  • src/assets/svgs/listEventRegistrants.svg is excluded by !**/*.svg
  • src/assets/svgs/location.svg is excluded by !**/*.svg
  • src/assets/svgs/logout.svg is excluded by !**/*.svg
  • src/assets/svgs/media.svg is excluded by !**/*.svg
  • src/assets/svgs/newChat.svg is excluded by !**/*.svg
  • src/assets/svgs/organizations.svg is excluded by !**/*.svg
  • src/assets/svgs/palisadoes.svg is excluded by !**/*.svg
  • src/assets/svgs/people.svg is excluded by !**/*.svg
  • src/assets/svgs/plugins.svg is excluded by !**/*.svg
  • src/assets/svgs/post.svg is excluded by !**/*.svg
  • src/assets/svgs/posts.svg is excluded by !**/*.svg
  • src/assets/svgs/requests.svg is excluded by !**/*.svg
  • src/assets/svgs/roles.svg is excluded by !**/*.svg
  • src/assets/svgs/settings.svg is excluded by !**/*.svg
  • src/assets/svgs/social-icons/Facebook-Logo.svg is excluded by !**/*.svg
  • src/assets/svgs/social-icons/Github-Logo.svg is excluded by !**/*.svg
  • src/assets/svgs/social-icons/Instagram-Logo.svg is excluded by !**/*.svg
  • src/assets/svgs/social-icons/Linkedin-Logo.svg is excluded by !**/*.svg
  • src/assets/svgs/social-icons/Reddit-Logo.svg is excluded by !**/*.svg
  • src/assets/svgs/social-icons/Slack-Logo.svg is excluded by !**/*.svg
  • src/assets/svgs/social-icons/X-Logo.svg is excluded by !**/*.svg
  • src/assets/svgs/social-icons/Youtube-Logo.svg is excluded by !**/*.svg
  • src/assets/svgs/tag.svg is excluded by !**/*.svg
  • src/assets/svgs/tags.svg is excluded by !**/*.svg
  • src/assets/svgs/talawa.svg is excluded by !**/*.svg
  • src/assets/svgs/user.svg is excluded by !**/*.svg
  • src/assets/svgs/userEvent.svg is excluded by !**/*.svg
  • src/assets/svgs/users.svg is excluded by !**/*.svg
  • src/assets/svgs/venues.svg is excluded by !**/*.svg
  • src/assets/talawa-logo-lite-200x200.png is excluded by !**/*.png
📒 Files selected for processing (82)
  • .coderabbit.yaml (1 hunks)
  • .env.example (1 hunks)
  • .eslintignore (1 hunks)
  • .eslintrc.json (4 hunks)
  • .github/ISSUE_TEMPLATE/bug-report.md (2 hunks)
  • .github/ISSUE_TEMPLATE/feature-request.md (2 hunks)
  • .github/dependabot.yaml (1 hunks)
  • .github/pull_request_template.md (2 hunks)
  • .github/workflows/README.md (1 hunks)
  • .github/workflows/auto-label.json5 (1 hunks)
  • .github/workflows/check-tsdoc.js (1 hunks)
  • .github/workflows/ci.yml (0 hunks)
  • .github/workflows/codeql-analysis.yml (0 hunks)
  • .github/workflows/codeql-codescan.yml (1 hunks)
  • .github/workflows/compare_translations.py (1 hunks)
  • .github/workflows/countline.py (1 hunks)
  • .github/workflows/eslint_disable_check.py (1 hunks)
  • .github/workflows/issue.yml (1 hunks)
  • .github/workflows/linter.yml (0 hunks)
  • .github/workflows/npm-publish.yml (0 hunks)
  • .github/workflows/pull-request-target.yml (1 hunks)
  • .github/workflows/pull-request.yml (1 hunks)
  • .github/workflows/push.yml (1 hunks)
  • .github/workflows/stale.yml (1 hunks)
  • .github/workflows/talawa_admin_md_mdx_format_adjuster.py (1 hunks)
  • .gitignore (2 hunks)
  • .husky/post-merge (1 hunks)
  • .husky/pre-commit (1 hunks)
  • .lintstagedrc.json (1 hunks)
  • .node-version (1 hunks)
  • .prettierignore (1 hunks)
  • .prettierrc (1 hunks)
  • CODEOWNERS (1 hunks)
  • CODE_OF_CONDUCT.md (1 hunks)
  • CODE_STYLE.md (1 hunks)
  • CONTRIBUTING.md (2 hunks)
  • DOCUMENTATION.md (1 hunks)
  • Docker_Container/.dockerignore (0 hunks)
  • Docker_Container/README.md (0 hunks)
  • Docker_Container/docker-compose.yml (0 hunks)
  • Docker_Container/dockerfile (0 hunks)
  • INSTALLATION.md (1 hunks)
  • ISSUE_GUIDELINES.md (1 hunks)
  • ISSUE_TEMPLATE.md (0 hunks)
  • PR-guidelines.md (0 hunks)
  • PR_GUIDELINES.md (1 hunks)
  • PULL_REQUEST_TEMPLATE.md (0 hunks)
  • README.md (3 hunks)
  • config/babel.config.cjs (1 hunks)
  • config/vite.config.ts (1 hunks)
  • index.html (1 hunks)
  • issue-guidelines.md (0 hunks)
  • jest-preview.config.ts (1 hunks)
  • jest.config.js (1 hunks)
  • package.json (2 hunks)
  • public/index.html (0 hunks)
  • public/locales/en/common.json (1 hunks)
  • public/locales/en/errors.json (1 hunks)
  • public/locales/en/translation.json (1 hunks)
  • public/locales/fr/common.json (1 hunks)
  • public/locales/fr/errors.json (1 hunks)
  • public/locales/fr/translation.json (1 hunks)
  • public/locales/hi/common.json (1 hunks)
  • public/locales/hi/errors.json (1 hunks)
  • public/locales/hi/translation.json (1 hunks)
  • public/locales/sp/common.json (1 hunks)
  • public/locales/sp/errors.json (1 hunks)
  • public/locales/sp/translation.json (1 hunks)
  • public/locales/zh/common.json (1 hunks)
  • public/locales/zh/errors.json (1 hunks)
  • public/locales/zh/translation.json (1 hunks)
  • public/manifest.json (1 hunks)
  • schema.graphql (1 hunks)
  • scripts/__mocks__/@dicebear/collection.ts (1 hunks)
  • scripts/__mocks__/@dicebear/core.ts (1 hunks)
  • scripts/__mocks__/@pdfme/generator.test.ts (1 hunks)
  • scripts/__mocks__/@pdfme/generator.ts (1 hunks)
  • scripts/__mocks__/fileMock.js (1 hunks)
  • scripts/custom-test-env.js (1 hunks)
  • scripts/githooks/check-localstorage-usage.js (1 hunks)
  • scripts/githooks/update-toc.js (1 hunks)
  • setup.ts (1 hunks)
⛔ Files not processed due to max files limit (28)
  • src/App.test.tsx
  • src/App.tsx
  • src/Constant/constant.spec.ts
  • src/Constant/constant.ts
  • src/GraphQl/Mutations/ActionItemCategoryMutations.ts
  • src/GraphQl/Mutations/ActionItemMutations.ts
  • src/GraphQl/Mutations/AgendaCategoryMutations.ts
  • src/GraphQl/Mutations/AgendaItemMutations.ts
  • src/GraphQl/Mutations/CampaignMutation.ts
  • src/GraphQl/Mutations/CommentMutations.ts
  • src/GraphQl/Mutations/EventAttendeeMutations.ts
  • src/GraphQl/Mutations/EventVolunteerMutation.ts
  • src/GraphQl/Mutations/FundMutation.ts
  • src/GraphQl/Mutations/OrganizationMutations.ts
  • src/GraphQl/Mutations/PledgeMutation.ts
  • src/GraphQl/Mutations/TagMutations.ts
  • src/GraphQl/Mutations/VenueMutations.ts
  • src/GraphQl/Mutations/mutations.ts
  • src/GraphQl/Queries/ActionItemCategoryQueries.ts
  • src/GraphQl/Queries/ActionItemQueries.ts
  • src/GraphQl/Queries/AgendaCategoryQueries.ts
  • src/GraphQl/Queries/AgendaItemQueries.ts
  • src/GraphQl/Queries/EventVolunteerQueries.ts
  • src/GraphQl/Queries/OrganizationQueries.ts
  • src/GraphQl/Queries/PlugInQueries.ts
  • src/GraphQl/Queries/Queries.ts
  • src/GraphQl/Queries/fundQueries.ts
  • src/GraphQl/Queries/userTagQueries.ts
💤 Files with no reviewable changes (13)
  • .github/workflows/ci.yml
  • .github/workflows/codeql-analysis.yml
  • .github/workflows/linter.yml
  • .github/workflows/npm-publish.yml
  • Docker_Container/.dockerignore
  • Docker_Container/README.md
  • Docker_Container/docker-compose.yml
  • Docker_Container/dockerfile
  • ISSUE_TEMPLATE.md
  • PR-guidelines.md
  • PULL_REQUEST_TEMPLATE.md
  • issue-guidelines.md
  • public/index.html
✅ Files skipped from review due to trivial changes (30)
  • .coderabbit.yaml
  • .env.example
  • .eslintignore
  • .github/dependabot.yaml
  • .github/workflows/auto-label.json5
  • .node-version
  • .prettierignore
  • .prettierrc
  • CODEOWNERS
  • config/babel.config.cjs
  • config/vite.config.ts
  • index.html
  • jest-preview.config.ts
  • public/locales/en/common.json
  • public/locales/en/errors.json
  • public/locales/en/translation.json
  • public/locales/fr/common.json
  • public/locales/fr/errors.json
  • public/locales/fr/translation.json
  • public/locales/hi/common.json
  • public/locales/hi/errors.json
  • public/locales/hi/translation.json
  • public/locales/sp/common.json
  • public/locales/sp/errors.json
  • public/locales/sp/translation.json
  • public/locales/zh/common.json
  • public/locales/zh/errors.json
  • public/locales/zh/translation.json
  • scripts/mocks/@dicebear/collection.ts
  • scripts/mocks/fileMock.js
🧰 Additional context used
🪛 Markdownlint (0.35.0)
.github/ISSUE_TEMPLATE/bug-report.md

36-36: null
Bare URL used

(MD034, no-bare-urls)


33-33: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

.github/ISSUE_TEMPLATE/feature-request.md

28-28: null
Bare URL used

(MD034, no-bare-urls)


25-25: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

CODE_STYLE.md

128-128: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


129-129: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


130-130: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


131-131: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


132-132: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


133-133: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


134-134: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


135-135: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


136-136: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


137-137: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


164-164: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


165-165: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


166-166: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


57-57: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


73-73: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


75-75: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


92-92: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


190-190: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


230-230: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


58-58: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


65-65: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


78-78: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


95-95: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


158-158: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


173-173: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


181-181: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


239-239: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


245-245: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


251-251: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

CONTRIBUTING.md

104-104: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


113-113: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


128-128: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


139-139: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


143-143: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


158-158: null
No empty links

(MD042, no-empty-links)


159-159: null
No empty links

(MD042, no-empty-links)


161-161: null
No empty links

(MD042, no-empty-links)

DOCUMENTATION.md

25-25: null
Bare URL used

(MD034, no-bare-urls)

INSTALLATION.md

321-321: Expected: h3; Actual: h4
Heading levels should only increment by one level at a time

(MD001, heading-increment)


33-33: Expected: 4; Actual: 6
Unordered list indentation

(MD007, ul-indent)


34-34: Expected: 4; Actual: 6
Unordered list indentation

(MD007, ul-indent)


95-95: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


105-105: null
Bare URL used

(MD034, no-bare-urls)


142-142: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


154-154: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


164-164: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


188-188: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


194-194: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


200-200: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


208-208: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


214-214: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


220-220: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


240-240: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


256-256: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


264-264: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


270-270: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


292-292: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


300-300: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


313-313: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


327-327: Expected: fenced; Actual: indented
Code block style

(MD046, code-block-style)


335-335: Expected: fenced; Actual: indented
Code block style

(MD046, code-block-style)


178-178: Expected: #setting-up-react_app_talawa_url-in-env-file; Actual: #setting-up-REACT_APP_TALAWA_URL-in-env-file
Link fragments should be valid

(MD051, link-fragments)


178-178: Expected: #setting-up-react_app_recaptcha_site_key-in-env-file; Actual: #setting-up-REACT_APP_RECAPTCHA_SITE_KEY-in-env-file
Link fragments should be valid

(MD051, link-fragments)

PR_GUIDELINES.md

31-31: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


39-39: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

README.md

53-53: null
Multiple spaces after hash on atx style heading

(MD019, no-multiple-space-atx)

🪛 LanguageTool
.github/workflows/README.md

[uncategorized] ~13-~13: Possible missing comma found.
Context: ...ding on the type of workflow. Whenever possible you must ensure that: 1. The file roles...

(AI_HYDRA_LEO_MISSING_COMMA)


[duplication] ~24-~24: Possible typo: you repeated a word
Context: ...ors: 1. Place all actions related to to this in the pull-request-target.yml f...

(ENGLISH_WORD_REPEAT_RULE)


[uncategorized] ~35-~35: The abbreviation “e.g.” (= for example) requires two periods.
Context: ...orrectly if they have a dedicated file (eg. CodeQL) ## Scripts Follow these gui...

(E_G)

CODE_OF_CONDUCT.md

[duplication] ~11-~11: Possible typo: you repeated a word
Context: ...-responsibilities) - Scope - Enforcement - Enforcement Guidelines ...

(ENGLISH_WORD_REPEAT_RULE)

CODE_STYLE.md

[style] ~127-~127: Consider removing “of” to be more concise
Context: ...tories of src assets - This houses all of the static assets used in the project - `...

(ALL_OF_THE)


[style] ~128-~128: Consider removing “of” to be more concise
Context: ... in the project - css - This houses all of the css files used in the project - `imag...

(ALL_OF_THE)


[style] ~129-~129: Consider removing “of” to be more concise
Context: ... the project - images - This houses all of the images used in the project - scss -...

(ALL_OF_THE)


[style] ~130-~130: Consider removing “of” to be more concise
Context: ...in the project - scss - This houses all of the scss files used in the project - `c...

(ALL_OF_THE)


[grammar] ~134-~134: The singular proper name ‘Sass’ must be used with a third-person or a past tense verb.
Context: ...rms - _talawa.scss - Partial Sass file for Talawa - _utilities.scss - Pa...

(HE_VERB_AGR)


[grammar] ~135-~135: The singular proper name ‘Sass’ must be used with a third-person or a past tense verb.
Context: ... - _utilities.scss - Partial Sass file for utilities - _variables.scss -...

(HE_VERB_AGR)


[grammar] ~136-~136: The singular proper name ‘Sass’ must be used with a third-person or a past tense verb.
Context: ... - _variables.scss - Partial Sass file for variables - app.scss - Main S...

(HE_VERB_AGR)


[style] ~141-~141: Consider removing “of” to be more concise
Context: ...views/screens Constant - This houses all of the constants used in the project `GraphQl...

(ALL_OF_THE)


[style] ~143-~143: Consider removing “of” to be more concise
Context: ...in the project GraphQl - This houses all of the GraphQL queries and mutations used in t...

(ALL_OF_THE)


[style] ~145-~145: Consider removing “of” to be more concise
Context: ...in the project screens - This houses all of the views/screens to be navigated through i...

(ALL_OF_THE)


[style] ~147-~147: Consider removing “of” to be more concise
Context: ... in Talawa-Admin state - This houses all of the state management code for the project ...

(ALL_OF_THE)


[uncategorized] ~165-~165: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...following order: - React imports - Third party imports - Local imports If there is...

(EN_COMPOUND_ADJECTIVE_INTERNAL)

CONTRIBUTING.md

[style] ~27-~27: This expression usually appears with a “please” in front of it.
Context: ...DUCT.md) to understand what this means. Let us know immediately if you have unacceptable ex...

(INSERT_PLEASE)


[uncategorized] ~34-~34: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...)" videos are extremely helpful for new open source contributors. ## Ways to Contribute I...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


[grammar] ~62-~62: A determiner may be missing.
Context: ...l Request guidelines](PR_GUIDELINES.md) is best resource to follow to start working on ...

(THE_SUPERLATIVE)


[uncategorized] ~68-~68: Loose punctuation mark.
Context: ...ushed to the main branch: - develop: For unstable code and bug fixing - `mai...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~69-~69: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...d bug fixing - main: Where the stable production ready code lies. This is our default branch. ...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


[typographical] ~73-~73: Consider adding a comma.
Context: ...ultiple developers are working on issues there is bound to be a conflict of interest (...

(IF_THERE_COMMA)


[typographical] ~73-~73: Consider adding a comma after ‘Usually’ for more clarity.
Context: ...licts) among issues, PRs or even ideas. Usually these conflicts are resolved in a **Fir...

(RB_LY_COMMA)


[grammar] ~73-~73: Did you mean “served” (as in the idiom ‘first come, first served’)?
Context: ...ts are resolved in a First Come First Serve basis however there are certain excep...

(FIRST_SERVED)


[grammar] ~75-~75: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...tant to ask the author of the PR in the slack channel or in their PRs or issues thems...

(ON_SKYPE)


[style] ~77-~77: ‘Last but not the least’ might be wordy. Consider a shorter alternative.
Context: ...y and test that function when needed. - Last but not the least, communication is important make sure t...

(EN_WORDINESS_PREMIUM_LAST_BUT_NOT_THE_LEAST)


[grammar] ~77-~77: It seems that “to” is missing before the verb.
Context: ...t the least, communication is important make sure to talk to other contributors, in ...

(MISSING_TO_BETWEEN_BE_AND_VB)


[grammar] ~77-~77: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ... other contributors, in these cases, in slack channel or in a issue/PR thread. - As a...

(ON_SKYPE)


[misspelling] ~77-~77: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ... in these cases, in slack channel or in a issue/PR thread. - As a last resort the...

(EN_A_VS_AN)


[typographical] ~78-~78: It appears that a comma is missing.
Context: ...el or in a issue/PR thread. - As a last resort the Admins would be responsible for dec...

(DURING_THAT_TIME_COMMA)


[grammar] ~135-~135: The operating system from Apple is written “macOS”.
Context: ...r packages can be found for Windows and MacOS. 6. The currently acceptable c...

(MAC_OS)


[grammar] ~165-~165: The past participle is required after “must be”.
Context: ...branch_name>`.(Here branch name must be name of the branch you want to push the chan...

(BE_VBP_IN)


[uncategorized] ~167-~167: Possible missing comma found.
Context: ...test suite passes, either locally or on CI once a PR has been created. 1. Review a...

(AI_HYDRA_LEO_MISSING_COMMA)


[grammar] ~178-~178: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...dation/talawa) for the link to join our slack channel. 1. We also have a technical em...

(ON_SKYPE)

DOCUMENTATION.md

[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)

INSTALLATION.md

[uncategorized] ~3-~3: Possible missing comma found.
Context: ...tructions are written to be followed in sequence so make sure to go through each of them...

(AI_HYDRA_LEO_MISSING_COMMA)


[duplication] ~25-~25: Possible typo: you repeated a word
Context: ...](#running-talawa-admin) - Accessing Talawa-Admin - [Talawa-Admin Registration](#talawa-admin-registratio...

(ENGLISH_WORD_REPEAT_RULE)


[typographical] ~55-~55: It appears that a comma is missing.
Context: ... that follow. # Prerequisites In this section we'll explain how to set up all the pre...

(DURING_THAT_TIME_COMMA)


[uncategorized] ~61-~61: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: .... Basic git knowledge is required for open source contribution so make sure you're comfor...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


[uncategorized] ~61-~61: Possible missing comma found.
Context: ...` knowledge is required for open source contribution so make sure you're comfortable with it...

(AI_HYDRA_LEO_MISSING_COMMA)


[grammar] ~67-~67: The word “setup” is a noun. The verb is spelled with a space.
Context: ...avigate to the folder where you want to setup the repository. 2. Open a cmd (Window...

(NOUN_VERB_CONFUSION)


[grammar] ~68-~68: The operating system from Apple is written “macOS”.
Context: ...cmd (Windows) or terminal (Linux or MacOS) session in this folder. 1. An easy ...

(MAC_OS)


[uncategorized] ~70-~70: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...e option based on your OS. 3. For Our Open Source Contributor Software Developers: ...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


[grammar] ~102-~102: The operating system from Apple is written “macOS”.
Context: ...node.jspackages in Windows, Linux and MacOS. 1. For Windows: 1. first install...

(MAC_OS)


[duplication] ~116-~116: Possible typo: you repeated a word
Context: ... 5. Save the document. 6. Exit notepad 7. Exit PowerShell 8. This will ensure...

(ENGLISH_WORD_REPEAT_RULE)


[uncategorized] ~118-~118: Possible missing comma found.
Context: ...ou are always using the correct version of node.js 2. For Linux and MacOS, use t...

(AI_HYDRA_LEO_MISSING_COMMA)


[grammar] ~119-~119: The operating system from Apple is written “macOS”.
Context: ...t version of node.js 2. For Linux and MacOS, use the terminal window. 1. install...

(MAC_OS)


[grammar] ~123-~123: The word “setup” is a noun. The verb is spelled with a white space.
Context: ... the respective recommended commands to setup your node environment 3. This wil...

(NOUN_VERB_CONFUSION)


[uncategorized] ~130-~130: Possible missing comma found.
Context: ...stall TypeScript, you can use the npm command which comes with node.js: ```bash np...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~158-~158: Possible missing comma found.
Context: ...ions in "setup" can be done manually as well and here's how to do it. - [Creating .e...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~162-~162: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...at runtime. It is not a part of the repo and you will have to create it. For a sampl...

(COMMA_COMPOUND_SENTENCE)


[uncategorized] ~162-~162: Possible missing comma found.
Context: ...ve to create it. For a sample of .env file there is a file named .env.example in...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~224-~224: Possible missing preposition found.
Context: ... For additional details, please refer theHow to Access the Talawa-API URL` sect...

(AI_HYDRA_LEO_MISSING_TO)


[grammar] ~228-~228: The word “setup” is a noun. The verb is spelled with a space.
Context: ...E_KEY in .env file You may not want to setup reCAPTCHA since the project will still ...

(NOUN_VERB_CONFUSION)


[grammar] ~232-~232: The word “setup” is a noun. The verb is spelled with a space.
Context: ...ad the following steps. If you want to setup Google reCAPTCHA now, you may refer to ...

(NOUN_VERB_CONFUSION)


[typographical] ~246-~246: Except for inverted sentences, ‘need them’ requires a question mark at the end of the sentence.
Context: ...t need them or want to keep the console clean # Post Configuration Steps It's now t...

(MD_PRP_QUESTION_MARK)


[uncategorized] ~261-~261: Did you mean: “By default,”?
Context: ...n serve ``` ## Accessing Talawa-Admin By default talawa-admin runs on port `4321` on y...

(BY_DEFAULT_COMMA)


[uncategorized] ~278-~278: Possible missing comma found.
Context: ... navigate to the running talawa-admin's website you'll land at talawa-admin registratio...

(AI_HYDRA_LEO_MISSING_COMMA)


[grammar] ~311-~311: The word ‘lint’ is a noun or an adjective. A verb or adverb is missing or misspelled here, or maybe a comma is missing.
Context: ...w.webp) ## Linting code files You can lint your code files using this command: ``...

(PRP_MD_NN)

ISSUE_GUIDELINES.md

[uncategorized] ~2-~2: Loose punctuation mark.
Context: # Issue Report Guidelines 👍🎉 First off, thanks for taking t...

(UNLIKELY_OPENING_PUNCTUATION)


[style] ~4-~4: Consider a shorter alternative to avoid wordiness.
Context: ...ing the time to contribute! 🎉👍 In order to give everyone a chance to submit a issu...

(IN_ORDER_TO_PREMIUM)


[misspelling] ~5-~5: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...der to give everyone a chance to submit a issues reports and contribute to the Ta...

(EN_A_VS_AN)


[typographical] ~24-~24: Consider adding a comma here.
Context: ...> ___ ## Issue Management In all cases please use the [GitHub open issue search](http...

(PLEASE_COMMA)


[uncategorized] ~27-~27: A comma might be missing here.
Context: ...reported. ### New Issues To create new issues follow these steps: 1. Your issue may ...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


[style] ~30-~30: Consider using a different verb for a more formal wording.
Context: .... 1. Verify whether the issue has been fixed by trying to reproduce it using the lat...

(FIX_RESOLVE)


[style] ~35-~35: The wording of this phrase can be improved.
Context: ...lcome contributors who find new ways to make the code better. ### Existing Issues You can also be ...

(MAKE_STYLE_BETTER)


[grammar] ~44-~44: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...butors to assign it to you in #talawa slack channel. Working on these types of exi...

(ON_SKYPE)


[grammar] ~53-~53: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...ew Issues 1. Join our #talawa-github slack channel for automatic issue and pull re...

(ON_SKYPE)


[grammar] ~57-~57: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...lines 1. Discuss issues in our various slack channels when necessary 2. Please do no...

(ON_SKYPE)


[typographical] ~57-~57: Consider adding a comma here.
Context: ...ur various slack channels when necessary 2. Please do not derail or troll issues. 3. Keep...

(PLEASE_COMMA)

PR_GUIDELINES.md

[uncategorized] ~2-~2: Loose punctuation mark.
Context: # Pull Request Guidelines 👍🎉 First off, thanks for taking t...

(UNLIKELY_OPENING_PUNCTUATION)


[style] ~4-~4: Consider a shorter alternative to avoid wordiness.
Context: ...ing the time to contribute! 🎉👍 In order to give everyone a chance to submit a pull...

(IN_ORDER_TO_PREMIUM)


[style] ~46-~46: Style-wise, it’s not ideal to insert an adverb (‘manually’) in the middle of an infinitive construction (‘to test’). Try moving the adverb to avoid split infinitives.
Context: ..., you'll need to tell us what steps you followed to manually test your changes. 1. Please read our [CONTRIBUTING.md](C...

(SPLIT_INFINITIVE)


[style] ~56-~56: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...o be closed. The quality of our code is very important to us. Therefore we make experienced ma...

(EN_WEAK_ADJECTIVE)


[uncategorized] ~56-~56: A comma may be missing after the conjunctive/linking adverb ‘Therefore’.
Context: ...ty of our code is very important to us. Therefore we make experienced maintainers of our ...

(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)


[style] ~59-~59: Consider using a different verb for a more formal wording.
Context: ...check if all tests are passing; if not, fix the issues and then create a pull reque...

(FIX_RESOLVE)


[style] ~64-~64: This expression is wordy and overused. Consider replacing it with a more concise and formal alternative.
Context: ...wer your questions, but we'll get to it sooner or later. @mentioning someone just adds to the p...

(SOONER_OR_LATER)


[uncategorized] ~64-~64: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...adds to the pile of notifications we get and it won't make us look at your issue fas...

(COMMA_COMPOUND_SENTENCE)


[style] ~65-~65: Consider shortening or rephrasing this to strengthen your wording.
Context: ...ue faster. 1. Do not force push. If you make changes to your pull request, please simply add a ...

(MAKE_CHANGES)

README.md

[uncategorized] ~56-~56: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...)" videos are extremely helpful for new open source contributors.

(EN_COMPOUND_ADJECTIVE_INTERNAL)

🪛 yamllint (1.29.0-1)
.github/workflows/codeql-codescan.yml

[error] 6-6: trailing spaces

(trailing-spaces)


[error] 17-17: trailing spaces

(trailing-spaces)


[error] 20-20: trailing spaces

(trailing-spaces)


[warning] 31-31: wrong indentation: expected 6 but found 7

(indentation)


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

(indentation)

.github/workflows/issue.yml

[error] 6-6: trailing spaces

(trailing-spaces)


[warning] 15-15: wrong indentation: expected 4 but found 6

(indentation)


[warning] 66-66: too many blank lines

(1 > 0) (empty-lines)

.github/workflows/pull-request-target.yml

[error] 6-6: trailing spaces

(trailing-spaces)


[error] 13-13: trailing spaces

(trailing-spaces)


[error] 15-15: trailing spaces

(trailing-spaces)


[error] 36-36: trailing spaces

(trailing-spaces)


[error] 42-42: trailing spaces

(trailing-spaces)


[error] 67-67: trailing spaces

(trailing-spaces)

.github/workflows/pull-request.yml

[error] 49-49: trailing spaces

(trailing-spaces)


[error] 60-60: trailing spaces

(trailing-spaces)


[error] 63-63: trailing spaces

(trailing-spaces)


[error] 92-92: trailing spaces

(trailing-spaces)


[error] 126-126: trailing spaces

(trailing-spaces)


[error] 129-129: trailing spaces

(trailing-spaces)


[error] 150-150: trailing spaces

(trailing-spaces)


[error] 157-157: trailing spaces

(trailing-spaces)


[error] 197-197: trailing spaces

(trailing-spaces)


[error] 201-201: trailing spaces

(trailing-spaces)


[error] 204-204: trailing spaces

(trailing-spaces)


[error] 205-205: trailing spaces

(trailing-spaces)


[error] 213-213: trailing spaces

(trailing-spaces)


[error] 243-243: trailing spaces

(trailing-spaces)


[error] 249-249: trailing spaces

(trailing-spaces)


[error] 251-251: trailing spaces

(trailing-spaces)

.github/workflows/push.yml

[error] 6-6: trailing spaces

(trailing-spaces)


[error] 17-17: trailing spaces

(trailing-spaces)


[error] 18-18: trailing spaces

(trailing-spaces)


[warning] 20-20: wrong indentation: expected 2 but found 4

(indentation)


[error] 21-21: trailing spaces

(trailing-spaces)


[error] 50-50: trailing spaces

(trailing-spaces)


[warning] 62-62: too many blank lines

(1 > 0) (empty-lines)

.github/workflows/stale.yml

[error] 6-6: trailing spaces

(trailing-spaces)


[error] 20-20: trailing spaces

(trailing-spaces)


[error] 21-21: trailing spaces

(trailing-spaces)

🪛 Ruff (0.7.0)
.github/workflows/compare_translations.py

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)

.github/workflows/eslint_disable_check.py

61-61: Loop control variable dirs not used within loop body

Rename unused dirs to _dirs

(B007)

🪛 actionlint (1.7.3)
.github/workflows/pull-request.yml

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-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)


207-207: shellcheck reported issue in this script: SC2043:warning:1:13: This loop will only ever run once. Bad quoting or missing glob/expansion?

(shellcheck)

🔇 Additional comments (40)
.husky/post-merge (2)

1-2: LGTM! Proper Husky hook setup.

The shebang and husky.sh sourcing are correctly implemented.


1-4: Verify script permissions and hook registration.

Ensure the script is properly set up as a Git hook.

✅ Verification successful

Git hook is properly configured and executable

The verification shows that everything is correctly set up:

  • The post-merge hook has executable permissions (-rwxr-xr-x)
  • Husky is properly configured in package.json with the prepare script
  • Husky is present in devDependencies
  • The .husky directory contains the necessary hook files
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify post-merge hook permissions and registration

# Check if the script is executable
if [[ ! -x .husky/post-merge ]]; then
  echo "❌ post-merge hook is not executable"
  ls -l .husky/post-merge
fi

# Check if husky is properly configured in package.json
if ! jq -e '.scripts.prepare == "husky install"' package.json > /dev/null; then
  echo "❌ Husky prepare script not found in package.json"
  echo "Add: \"prepare\": \"husky install\" to package.json scripts"
fi

# Check if husky is listed in devDependencies
if ! jq -e '.devDependencies.husky' package.json > /dev/null; then
  echo "❌ husky not found in devDependencies"
fi

Length of output: 133


Script:

#!/bin/bash
# Let's try a different approach to verify the setup

# Check file permissions with ls
echo "Checking file permissions:"
ls -l .husky/post-merge

# Check package.json content
echo -e "\nChecking package.json configuration:"
jq '{
  prepare: .scripts.prepare,
  husky: .devDependencies.husky
}' package.json

# Check if husky is properly installed
echo -e "\nChecking .husky directory structure:"
ls -la .husky/

Length of output: 719

.lintstagedrc.json (2)

1-5: LGTM! The lint-staged configuration follows best practices.

The command ordering is correct (ESLint before Prettier), and the file patterns are comprehensive for the specified file types.


4-4: Verify the custom script path and permissions.

Let's ensure the custom local storage check script exists and has proper execution permissions.

✅ Verification successful

Script exists and has proper execution permissions

The script scripts/githooks/check-localstorage-usage.js exists and has the correct executable permissions (755) for all users to read and execute, which is appropriate for a git hook script.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence and permissions of the custom script

# Check if the script exists
if [ -f "scripts/githooks/check-localstorage-usage.js" ]; then
    echo "✓ Script exists"
    # Check file permissions
    ls -l "scripts/githooks/check-localstorage-usage.js"
else
    echo "✗ Script not found at scripts/githooks/check-localstorage-usage.js"
fi

# Check for other potential locations of the script
fd "check-localstorage-usage.js"

Length of output: 323

.husky/pre-commit (2)

1-2: LGTM: Shell script setup is correct

The shell interpreter specification and Husky script sourcing follow best practices.


4-8: 🛠️ Refactor suggestion

Add error handling for npm commands

The script should handle failures in npm commands to prevent commits when checks fail.

Apply this diff:

-npm run format:fix
-# npm run lint:fix
-npm run lint-staged
-npm run typecheck
-npm run update:toc
+npm run format:fix || exit 1
+# npm run lint:fix
+npm run lint-staged || exit 1
+npm run typecheck || exit 1
+npm run update:toc || exit 1

Also, please clarify why lint:fix is commented out. If it's redundant with lint-staged, consider removing it entirely rather than keeping it commented.

Let's verify the npm scripts exist in package.json:

✅ Verification successful

Let me check what lint-staged and lint:fix do to understand if they are redundant:


Add error handling and remove redundant lint:fix script

The lint:fix script is indeed redundant as its functionality is already covered by lint-staged:

  • lint:fix runs eslint --fix on TS/TSX files
  • lint-staged already includes eslint --fix for TS/TSX/JSON files

Apply this diff:

-npm run format:fix
-# npm run lint:fix
-npm run lint-staged
-npm run typecheck
-npm run update:toc
+npm run format:fix || exit 1
+npm run lint-staged || exit 1
+npm run typecheck || exit 1
+npm run update:toc || exit 1
  • Remove the commented lint:fix line as it's redundant with lint-staged
  • Delete the lint:fix script from package.json as it's no longer needed
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that all referenced npm scripts are defined
jq '.scripts | keys_unsorted[] | select(. | match("(format:fix|lint:fix|lint-staged|typecheck|update:toc)"))' package.json

Length of output: 187


Script:

#!/bin/bash
# Check the lint-staged configuration and lint:fix script definition
echo "=== lint-staged config ==="
jq '.["lint-staged"]' package.json

echo -e "\n=== lint:fix script ==="
jq '.scripts["lint:fix"]' package.json

echo -e "\n=== format:fix script ==="
jq '.scripts["format:fix"]' package.json

Length of output: 509

public/manifest.json (1)

16-16: Verify the new icon path structure

The icon path has been updated to include the "images/" directory. Please ensure this directory structure exists and the file is present at the specified location to prevent 404 errors.

✅ Verification successful

Logo file exists at the specified path

The verification confirms that logo512.png exists at public/images/logo512.png, which matches the path structure specified in the manifest.json file.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence of the logo files in the correct locations
# Expected: Both logo files should exist in their respective locations

echo "Checking for logo files..."
fd -t f "logo(192|512).png" public/
fd -t f "logo(192|512).png" public/images/

Length of output: 197

.gitignore (4)

13-14: LGTM: Appropriate test-related ignores

The entries for coverage reports and Codecov are appropriate as these are build artifacts that should not be version controlled.


31-32: LGTM: Debug logs appropriately ignored

Ignoring debug logs is the correct approach as these are runtime artifacts.


34-37: LGTM: Editor-specific files properly ignored

The additions for editor-specific files (.idea, .vscode, *.swp) are appropriate as these should be managed locally by each developer.


21-21: LGTM: Environment file properly ignored

Ignoring .env is correct as it typically contains sensitive information.

Let's verify the presence of a template file:

✅ Verification successful

LGTM: Environment configuration properly set up

The .env.example template file exists and provides comprehensive documentation for all required environment variables, including:

  • Development server port
  • API URL configuration
  • Recaptcha setup
  • WebSocket backend URL
  • Logging preferences
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for the existence of .env.example
if [ -f ".env.example" ]; then
    echo "✓ .env.example exists"
    cat .env.example
else
    echo "⚠ Missing .env.example template file"
fi

Length of output: 1301

scripts/custom-test-env.js (2)

1-2: LGTM! Imports are clean and well-organized.

The imports correctly bring in the required dependencies for extending the Jest environment and providing text encoding polyfills.


8-16: Verify Jest configuration and usage.

Let's verify that this custom environment is properly configured in Jest settings and check for any other custom environments that might need similar polyfills.

✅ Verification successful

Let me check the Jest configuration to verify the custom environment setup.


Let me check the content of setupTests.ts since it's referenced in the Jest configuration.


Let me check the package.json to see how the custom environment is referenced.


Custom test environment is properly configured

The custom environment is correctly set up in the project:

  • It's properly referenced in the test script: "test": "cross-env NODE_ENV=test jest --env=./scripts/custom-test-env.js --watchAll --coverage"
  • The environment provides necessary polyfills (TextEncoder/TextDecoder) for tests
  • No other custom environments need similar polyfills as this is the only custom environment in the project
  • The setup integrates well with the project's Jest configuration and setupTests.ts
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check Jest configuration and related test setup files

# Look for Jest configuration
echo "Checking for Jest configuration files..."
fd -e json -e js -e ts -e yaml -e yml . -x grep -l "jest" {}

# Look for other custom environments
echo "Checking for other custom test environments..."
rg -l "jest-environment" 

# Look for other @pdfme related test files
echo "Checking for other @pdfme related test files..."
rg -l "@pdfme"

Length of output: 1586


Script:

#!/bin/bash
# Check Jest configuration
echo "Content of jest.config.js:"
cat jest.config.js

# Check package.json for Jest configuration
echo -e "\nJest-related entries in package.json:"
cat package.json | jq 'with_entries(select(.key | test("jest|test")))'

Length of output: 2404


Script:

#!/bin/bash
# Check setupTests.ts content
echo "Content of src/setupTests.ts:"
cat src/setupTests.ts

# Check if custom environment is referenced anywhere else
echo -e "\nFiles referencing custom-test-env.js:"
rg -l "custom-test-env"

Length of output: 1189


Script:

#!/bin/bash
# Check package.json content focusing on Jest and test environment configurations
echo "Content of package.json:"
cat package.json

Length of output: 5653

.github/ISSUE_TEMPLATE/bug-report.md (1)

2-6: LGTM! Metadata formatting improvements look good.

The consistent capitalization in title/name fields and proper label casing enhance template professionalism.

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

1-22: Overall implementation looks good!

The mock implementation is well-structured and appropriate for testing purposes. It provides a valid PDF-like output with proper input validation. The suggested improvements are optional optimizations that don't affect the core functionality.

scripts/__mocks__/@pdfme/generator.test.ts (2)

1-3: LGTM! Imports are clean and well-structured.


1-1: Verify the mock generator implementation.

Let's ensure the mock implementation exists and matches these test expectations.

✅ Verification successful

Mock generator implementation is properly implemented

The mock generator exists and provides a suitable implementation that:

  • Validates template and inputs length
  • Returns a Promise with mock PDF data (header + random content)
  • Matches the expected interface with template and inputs parameters
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence and implementation of the mock generator

# Check if the mock generator file exists
if [ -f "scripts/__mocks__/@pdfme/generator.ts" ]; then
  echo "Mock generator file exists"
  # Display the implementation
  cat "scripts/__mocks__/@pdfme/generator.ts"
else
  echo "Warning: Mock generator file not found"
fi

Length of output: 959

.github/workflows/stale.yml (2)

12-17: LGTM! Appropriate scheduling configuration

The daily schedule at midnight UTC is a reasonable frequency for stale issue management.


1-11: Verify the referenced README.md file exists and contains workflow guidelines

The header references a README.md file that should define the workflow file requirements.

✅ Verification successful

The stale.yml workflow file should be renamed to follow the documented naming convention

Based on the README.md guidelines, workflow files should be organized by their role (issues.yml, pull-request.yml, etc.) unless they meet specific exceptions. The stale workflow would fall under issue/PR management and should be integrated into the respective workflow files unless it meets the cron schedule exception.

Let's verify if this is a cron-scheduled job to determine if it qualifies for the exception:


The stale.yml workflow file follows the documented exception rules

The workflow file is correctly placed in a separate file as it meets the exception criteria defined in the README.md:

  1. It uses a unique cron schedule (daily at midnight: "0 0 * * *")
  2. It's a specialized workflow that manages both stale issues and PRs with specific timing requirements
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if the README exists and contains workflow guidelines
fd -t f "README.md" .github/workflows/ -x cat {}

Length of output: 2122


Script:

#!/bin/bash
# Check the stale.yml file content for cron schedule
cat .github/workflows/stale.yml

Length of output: 1960

🧰 Tools
🪛 yamllint (1.29.0-1)

[error] 6-6: trailing spaces

(trailing-spaces)

.github/workflows/check-tsdoc.js (1)

1-68: Verify CI environment compatibility

Since this script is part of a GitHub workflow, we should verify its compatibility with the CI environment.

✅ Verification successful

CI environment is properly configured for check-tsdoc.js

The script is properly integrated into the CI workflow:

  • It's executed via npm run check-tsdoc in the "Code-Quality-Checks" job
  • The workflow uses Node.js v22.x which supports all the ES module imports used in the script
  • The script runs in the correct context with access to the repository files
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if this script is referenced in any workflow files
echo "Checking workflow references..."
fd -e yml -e yaml . .github/workflows/ -x grep -l "check-tsdoc.js" {}

# Verify Node.js version compatibility
echo "Checking Node.js version in workflows..."
fd -e yml -e yaml . .github/workflows/ -x grep -A 5 "node-version" {}

Length of output: 1169


Script:

#!/bin/bash
# Let's check the actual workflow file that might be using this script
fd -t f -e yml -e yaml . .github/workflows/ -x cat {}

Length of output: 20314

.github/workflows/push.yml (1)

36-50: LGTM! Effective caching strategy implemented

The caching configuration is well-structured with:

  • Appropriate cache paths
  • Proper key generation using package-lock.json
  • Good fallback strategy with restore-keys
🧰 Tools
🪛 yamllint (1.29.0-1)

[error] 50-50: trailing spaces

(trailing-spaces)

jest.config.js (1)

1-71: Verify alignment with PR objectives

This new Jest configuration file appears unrelated to the PR's stated objective of fixing the "manage" button overlap issue. Please clarify:

  1. Why this configuration change is included in this PR
  2. Whether this should be in a separate PR focused on testing infrastructure
✅ Verification successful

Jest configuration changes should be in a separate PR

Based on the evidence:

  1. Multiple files contain UI-related "manage" functionality, indicating this PR should focus on UI fixes
  2. The Jest configuration file exists but shows no current changes (git status shows clean working tree)
  3. This configuration appears to be part of the testing infrastructure

The review comment is valid - testing infrastructure changes should be separated from UI fixes for clearer change management and review.

  • Recommend moving Jest configuration changes to a dedicated PR focused on testing infrastructure improvements
  • Keep the current PR focused on the manage button UI fixes
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if there are any CSS changes related to the manage button fix
rg -l "manage.*button|button.*manage" --type css

# Check commit messages to understand the context
git log --format=%B -n 1

Length of output: 50


Script:

#!/bin/bash
# Let's check the PR description and files changed
gh pr view --json title,body,files

# Let's also check if jest.config.js existed before or is newly added
git log --oneline -- jest.config.js

Length of output: 88


Script:

#!/bin/bash
# Let's check if this is a new file or modified file
git status jest.config.js

# Let's look for any UI-related changes in the current branch
fd -e css -e tsx -e jsx | xargs rg -l "manage"

# Let's also check for any existing test configuration
fd "jest.config" 

Length of output: 2997

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

23-26: Verify security implications of command execution

The script executes Git commands and reads files. Please verify:

  1. Command injection vulnerabilities in Git commands
  2. Path traversal issues when reading files

Also applies to: 29-32

✅ Verification successful

The previous attempt didn't provide conclusive results. Let's examine:

  1. The actual implementation to understand the context
  2. Similar patterns in the codebase
  3. How this script is integrated into the git hooks system

This will help us better assess the security implications and potential vulnerabilities.


Command execution is properly sanitized and secure

The implementation is safe from command injection and path traversal vulnerabilities because:

  1. The git ls-files command doesn't accept user input or variables that could be manipulated
  2. File paths are handled safely using Node.js built-in path module
  3. The script uses proper error handling and input validation
  4. File operations are performed using safe Node.js APIs (readFileSync, existsSync)

The script is used as part of the pre-commit hook through husky, running in a controlled environment with proper file permissions.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for potential security issues in file paths and command execution

# Test 1: Check if any file paths contain suspicious patterns
git ls-files | grep -E '(\.\.|;|&|\||\$\()'

# Test 2: Check for file permissions that might allow tampering
find . -type f -name "*.ts" -o -name "*.tsx" -perm /o+w -ls

Length of output: 107


Script:

#!/bin/bash
# Let's analyze the code context and usage more thoroughly

# Check the implementation of check-localstorage-usage.js
cat scripts/githooks/check-localstorage-usage.js

# Look for similar command execution patterns in the codebase
rg -l "execSync.*git ls-files"

# Check if the script is used in any git hooks configuration
cat .git/hooks/* 2>/dev/null || true
cat .husky/* 2>/dev/null || true

Length of output: 2928

.github/workflows/issue.yml (2)

12-16: LGTM! Clear and focused workflow trigger configuration.

🧰 Tools
🪛 yamllint (1.29.0-1)

[warning] 15-15: wrong indentation: expected 4 but found 6

(indentation)


58-65: LGTM! Well-crafted greeting message with helpful links.

.github/workflows/talawa_admin_md_mdx_format_adjuster.py (1)

1-18: LGTM! Well-structured script header and imports.

The script follows Python best practices with proper shebang, encoding declaration, and comprehensive docstring. The imports are secure, using only standard library modules.

README.md (2)

24-32: LGTM! Well-structured table of contents

The table of contents is properly implemented using markdown syntax and includes links to all major sections.


45-51: LGTM! Comprehensive documentation structure

The documentation section is well-organized with clear references to installation, contribution guidelines, and other important documentation.

.github/workflows/eslint_disable_check.py (2)

1-28: LGTM! Well-documented script header and appropriate imports.

The script's purpose, methodology, and compliance standards are clearly documented. The imports are appropriate for the script's functionality.


121-122: LGTM! Standard Python entry point implementation.

The script entry point follows Python best practices.

.eslintrc.json (2)

4-4: Verify the scope of these changes against PR objectives.

The addition of Node.js environment and new ESLint extensions (TypeScript, Prettier) appears to be a significant tooling change. However, this seems unrelated to the PR's stated objective of fixing the "manage" button overlap issue (#2438). Consider splitting these changes into a separate PR focused on tooling improvements.

Also applies to: 14-16


Line range hint 41-142: Consider a phased approach for strict TypeScript rules.

The TypeScript and naming convention rules are comprehensive but might be too strict to implement all at once. Consider:

  1. Phasing in strict rules gradually to allow for codebase adaptation
  2. Starting with essential rules first (e.g., no-explicit-any, consistent-type-imports)
  3. Adding stricter rules (e.g., interface prefixes, explicit return types) in subsequent phases

This would help manage the transition and reduce the immediate impact on development velocity.

Run this script to assess the impact of new rules:

package.json (1)

2-6: ⚠️ Potential issue

Version bump requires justification

The major version bump to 3.0.0 and addition of "type": "module" suggest significant breaking changes. However, the PR objectives only mention fixing a UI button overlap issue. Please clarify:

  • Why is a major version bump needed for a UI fix?
  • What breaking changes justify the bump to 3.0.0?
  • Has the impact of changing to ES modules been tested across the codebase?
.github/workflows/countline.py (2)

28-32: LGTM! Well-organized imports.

The imports are properly organized and only use standard library modules.


296-297: LGTM! Proper entry point implementation.

The entry point follows the standard Python pattern.

CODE_STYLE.md (1)

1-253: Verify relevance to PR objective

This new coding standards document, while valuable, appears unrelated to the PR's stated objective of fixing the manage button overlap issue (#2438). Please clarify:

  1. Is this file addition intentional for this PR?
  2. Should this be submitted as a separate PR focused on documentation improvements?
🧰 Tools
🪛 Markdownlint (0.35.0)

128-128: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


129-129: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


130-130: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


131-131: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


132-132: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


133-133: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


134-134: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


135-135: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


136-136: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


137-137: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


164-164: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


165-165: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


166-166: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


57-57: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


73-73: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


75-75: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


92-92: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


190-190: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


230-230: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


58-58: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


65-65: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


78-78: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


95-95: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


158-158: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


173-173: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


181-181: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


239-239: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


245-245: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


251-251: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🪛 LanguageTool

[style] ~127-~127: Consider removing “of” to be more concise
Context: ...tories of src assets - This houses all of the static assets used in the project - `...

(ALL_OF_THE)


[style] ~128-~128: Consider removing “of” to be more concise
Context: ... in the project - css - This houses all of the css files used in the project - `imag...

(ALL_OF_THE)


[style] ~129-~129: Consider removing “of” to be more concise
Context: ... the project - images - This houses all of the images used in the project - scss -...

(ALL_OF_THE)


[style] ~130-~130: Consider removing “of” to be more concise
Context: ...in the project - scss - This houses all of the scss files used in the project - `c...

(ALL_OF_THE)


[grammar] ~134-~134: The singular proper name ‘Sass’ must be used with a third-person or a past tense verb.
Context: ...rms - _talawa.scss - Partial Sass file for Talawa - _utilities.scss - Pa...

(HE_VERB_AGR)


[grammar] ~135-~135: The singular proper name ‘Sass’ must be used with a third-person or a past tense verb.
Context: ... - _utilities.scss - Partial Sass file for utilities - _variables.scss -...

(HE_VERB_AGR)


[grammar] ~136-~136: The singular proper name ‘Sass’ must be used with a third-person or a past tense verb.
Context: ... - _variables.scss - Partial Sass file for variables - app.scss - Main S...

(HE_VERB_AGR)


[style] ~141-~141: Consider removing “of” to be more concise
Context: ...views/screens Constant - This houses all of the constants used in the project `GraphQl...

(ALL_OF_THE)


[style] ~143-~143: Consider removing “of” to be more concise
Context: ...in the project GraphQl - This houses all of the GraphQL queries and mutations used in t...

(ALL_OF_THE)


[style] ~145-~145: Consider removing “of” to be more concise
Context: ...in the project screens - This houses all of the views/screens to be navigated through i...

(ALL_OF_THE)


[style] ~147-~147: Consider removing “of” to be more concise
Context: ... in Talawa-Admin state - This houses all of the state management code for the project ...

(ALL_OF_THE)


[uncategorized] ~165-~165: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...following order: - React imports - Third party imports - Local imports If there is...

(EN_COMPOUND_ADJECTIVE_INTERNAL)

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

222-226: Verify the coverage threshold requirement

A 95% coverage threshold is quite high. Ensure this aligns with the project's current coverage levels to avoid blocking PRs unnecessarily.

✅ Verification successful

Coverage threshold of 95% is appropriate for this project

The current coverage levels shown in the Codecov badge (98%) are well above the configured threshold of 95%, indicating this is an established and maintainable target for the project.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check current coverage levels
curl -s "https://codecov.io/gh/PalisadoesFoundation/talawa-admin/branch/develop/graph/badge.svg" | grep -o "[0-9]*%"

Length of output: 129

CONTRIBUTING.md (2)

7-24: LGTM! Well-structured table of contents

The new table of contents provides clear navigation through the document.


178-178: Capitalize "Slack" in community section

This is a duplicate of the earlier capitalization issue.

🧰 Tools
🪛 LanguageTool

[grammar] ~178-~178: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...dation/talawa) for the link to join our slack channel. 1. We also have a technical em...

(ON_SKYPE)

setup.ts (1)

25-38: Accessing process.env variables before they are initialized

Without calling dotenv.config();, the process.env variables like PORT, REACT_APP_TALAWA_URL, and REACT_APP_RECAPTCHA_SITE_KEY will be undefined. This affects the conditions that check if these variables exist.

Refer to the previous comment about adding dotenv.config(); to load environment variables.

Also applies to: 53-66, 119-132, 163-169

Comment on lines +1 to +5
{
"**/*.{ts,tsx,yml}": "eslint --fix",
"**/*.{ts,tsx,json,scss,css,yml}": "prettier --write",
"**/*.{ts,tsx}": "node scripts/githooks/check-localstorage-usage.js"
}
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

The lint-staged configuration changes are unrelated to the PR's scope

The PR is focused on fixing a UI issue with the manage button's overlap with the address in organization cards (#2431), but the changes to .lintstagedrc.json introduce broader code quality checks that are unrelated to this specific UI fix. While these checks are beneficial for code quality, they should be introduced in a separate PR focused on tooling improvements.

  • Consider moving the lint-staged configuration changes to a separate PR focused on development tooling improvements
  • Keep the current PR focused on the UI fix for the manage button overlap issue
🔗 Analysis chain

Verify alignment with PR objectives.

This new lint-staged configuration appears to be broader in scope than the PR's stated objective of fixing the manage button's UI issue. While these changes improve code quality, they seem unrelated to the UI fix mentioned in issue #2438.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for UI-related changes that align with the PR objectives

# Look for CSS changes related to the manage button
rg -i "manage.*button" --type css
rg -i "manage.*height" --type css

# Check for related UI component files
fd -e tsx -e ts -e css "manage"

Length of output: 547


Script:

#!/bin/bash
# Let's check the PR description and related issue to understand the context better

# Check PR description
gh pr view --json title,body

# Check the referenced issue #2438
gh issue view 2438 --json title,body

# Look for recent changes in the lint-staged config
git log -p -- .lintstagedrc.json

Length of output: 2782

npm run typecheck
npm run update:toc

git add .
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Reconsider automatic staging of all changes

Using git add . in a pre-commit hook could accidentally stage unrelated changes that weren't intended for this commit. Consider removing this line and letting developers explicitly stage their changes.

Apply this diff:

-git add .
📝 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.

Suggested change
git add .

Comment on lines +1 to +2
import fs from 'fs';
import { execSync } from 'child_process';
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Verify markdown-toc dependency

The script depends on the markdown-toc CLI tool, but there's no check for its existence. This could cause runtime errors if the dependency is not installed.

Add a dependency check at the start of the script:

 import fs from 'fs';
 import { execSync } from 'child_process';
+
+try {
+  execSync('markdown-toc --version', { stdio: 'ignore' });
+} catch (error) {
+  console.error('Error: markdown-toc is not installed. Please install it using: npm install -g markdown-toc');
+  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.

Suggested change
import fs from 'fs';
import { execSync } from 'child_process';
import fs from 'fs';
import { execSync } from 'child_process';
try {
execSync('markdown-toc --version', { stdio: 'ignore' });
} catch (error) {
console.error('Error: markdown-toc is not installed. Please install it using: npm install -g markdown-toc');
process.exit(1);
}

Comment on lines +4 to +6
const markdownFiles = fs
.readdirSync('./')
.filter((file) => file.endsWith('.md'));
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Add error handling and use absolute paths

The current implementation has several potential issues:

  1. No error handling for file system operations
  2. Synchronous file reading could block on large directories
  3. Using relative path (./) is risky in git hooks as the working directory isn't guaranteed

Consider this safer implementation:

-const markdownFiles = fs
-  .readdirSync('./')
-  .filter((file) => file.endsWith('.md'));
+const path = require('path');
+
+try {
+  const rootDir = process.cwd();
+  const markdownFiles = fs
+    .readdirSync(rootDir)
+    .filter((file) => file.endsWith('.md'))
+    .map(file => path.join(rootDir, file));
+} catch (error) {
+  console.error('Error reading directory:', error);
+  process.exit(1);
+}

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

Comment on lines +8 to +12
markdownFiles.forEach((file) => {
const command = `markdown-toc -i "${file}" --bullets "-"`;
execSync(command, { stdio: 'inherit' });

});
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix security vulnerabilities and add error handling

The current implementation has security and reliability issues:

  1. Potential command injection vulnerability with unescaped file names
  2. No error handling for markdown-toc execution
  3. No validation of file content or size

Here's a safer implementation:

-markdownFiles.forEach((file) => {
-  const command = `markdown-toc -i "${file}" --bullets "-"`;
-  execSync(command, { stdio: 'inherit' });
-  
-});
+const { promisify } = require('util');
+const stat = promisify(fs.stat);
+
+async function processFile(filePath) {
+  try {
+    // Check file size
+    const stats = await stat(filePath);
+    const MAX_SIZE = 1024 * 1024; // 1MB
+    if (stats.size > MAX_SIZE) {
+      throw new Error(`File ${filePath} is too large (max ${MAX_SIZE} bytes)`);
+    }
+
+    // Safely escape file path
+    const escapedPath = JSON.stringify(filePath);
+    const command = `markdown-toc -i ${escapedPath} --bullets "-"`;
+    execSync(command, { stdio: 'inherit' });
+  } catch (error) {
+    console.error(`Error processing ${filePath}:`, error);
+    process.exit(1);
+  }
+}
+
+// Process files sequentially
+for (const file of markdownFiles) {
+  await processFile(file);
+}
📝 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.

Suggested change
markdownFiles.forEach((file) => {
const command = `markdown-toc -i "${file}" --bullets "-"`;
execSync(command, { stdio: 'inherit' });
});
const { promisify } = require('util');
const stat = promisify(fs.stat);
async function processFile(filePath) {
try {
// Check file size
const stats = await stat(filePath);
const MAX_SIZE = 1024 * 1024; // 1MB
if (stats.size > MAX_SIZE) {
throw new Error(`File ${filePath} is too large (max ${MAX_SIZE} bytes)`);
}
// Safely escape file path
const escapedPath = JSON.stringify(filePath);
const command = `markdown-toc -i ${escapedPath} --bullets "-"`;
execSync(command, { stdio: 'inherit' });
} catch (error) {
console.error(`Error processing ${filePath}:`, error);
process.exit(1);
}
}
// Process files sequentially
for (const file of markdownFiles) {
await processFile(file);
}

Comment on lines +43 to +52
input AddressInput {
city: String
countryCode: String
dependentLocality: String
line1: String
line2: String
postalCode: String
sortingCode: String
state: String
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Duplicate Definition of AddressInput Input Type

The AddressInput input type is defined twice in the schema at lines 43-52 and 1212-1221. This duplication can lead to conflicts during schema compilation.

Remove the duplicate definition to resolve the issue.

- input AddressInput {
-   city: String
-   countryCode: String
-   dependentLocality: String
-   line1: String
-   line2: String
-   postalCode: String
-   sortingCode: String
-   state: String
- }

Also applies to: 1212-1221

Comment on lines +776 to +781
type OrganizationCustomField {
_id: ID!
name: String!
organizationId: String!
type: String!
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Duplicate Definition of OrganizationCustomField Type

The OrganizationCustomField type is declared twice at lines 776-781 and lines 783-788. Duplicate type definitions will cause errors in the schema.

Remove one of the duplicate definitions to fix the issue.

- type OrganizationCustomField {
-   _id: ID!
-   name: String!
-   organizationId: String!
-   type: String!
- }

Also applies to: 783-788

Comment on lines +1348 to +1352
type UserPhone {
home: PhoneNumber
mobile: PhoneNumber
work: PhoneNumber
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Duplicate Definition of UserPhone Type

The UserPhone type is defined twice at lines 1348-1352 and 1407-1411. This will lead to conflicts in the schema.

Delete one of the duplicate definitions to resolve the conflict.

- type UserPhone {
-   home: PhoneNumber
-   mobile: PhoneNumber
-   work: PhoneNumber
- }

Also applies to: 1407-1411

Comment on lines +1094 to +1100
enum Recurrance {
DAILY
MONTHLY
ONCE
WEEKLY
YEARLY
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Correct the Spelling of Recurrance to Recurrence

The term Recurrance is misspelled throughout the schema. The correct spelling is Recurrence. This affects the enum definition and fields in several types.

Apply this diff to correct the spelling:

- enum Recurrance {
+ enum Recurrence {
    DAILY
    MONTHLY
    ONCE
    WEEKLY
    YEARLY
  }

-   recurrance: Recurrance
+   recurrence: Recurrence

Ensure all instances of Recurrance are updated to Recurrence in the schema, including in types Event, EventInput, and UpdateEventInput.

Also applies to: 295-295, 320-320, 1190-1190

Comment on lines +655 to +656
deleteAdvertisement(id: ID!): DeletePayload!
deleteAdvertisementById(id: ID!): DeletePayload!
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Redundant Mutations: deleteAdvertisement and deleteAdvertisementById

Both deleteAdvertisement(id: ID!): DeletePayload! and deleteAdvertisementById(id: ID!): DeletePayload! are defined in the Mutation type at lines 655-656. Having two mutations that perform the same action may cause confusion.

Consider consolidating these into a single mutation to improve clarity.

- deleteAdvertisement(id: ID!): DeletePayload!
  deleteAdvertisementById(id: ID!): DeletePayload!
+ deleteAdvertisement(id: ID!): DeletePayload!

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

@utkarshpra78
Copy link
Author

mistakenly i take the code from the main branch and merged in develop-postgres

@utkarshpra78 utkarshpra78 deleted the bug/button branch November 21, 2024 16:56
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