Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fixes Organization Not Found in Left Drawer #1592

Merged
merged 31 commits into from
Mar 2, 2024
Merged

Fixes Organization Not Found in Left Drawer #1592

merged 31 commits into from
Mar 2, 2024

Conversation

GlenDsza
Copy link
Contributor

@GlenDsza GlenDsza commented Feb 16, 2024

What kind of change does this PR introduce?

bugfix

Issue Number:

Fixes #1333

Did you add tests for your changes?

Yes

Snapshots/Videos:

Fixes.No.Org.in.Left.Drawer.mp4

Summary

After Login, Opening User profile generated no organization found error, and user profile opened through 'My Organizations' page used to render 'LeftDrawerOrg' which is meant to be rendered if user profile is opened from 'organization dashboard'.

  • The issue is fixed by conditionally rendering LeftDrawerOrg Component if UserProfile is reached from organization dashboard and rendering LeftDrawer Component if UserProfile reached from 'My Organizations Page'

  • Added basic CSS to highlight User Profile Option in Left Drawer if User Profile Page is open.

  • Refactored (Simplified/Efficient) OrganizationScreen & SuperAdminScreen and their respective tests.

Does this PR introduce a breaking change?

No

Have you read the contributing guide?

Yes

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

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congratulations on making your first PR! 🎊 If you haven't already, check out our Contributing Guidelines and PR Reporting Guidelines to ensure that you are following our guidelines for contributing and creating PR.

@Cioppolo14
Copy link
Contributor

@GlenDsza Please fix the failing test application check.

Copy link

codecov bot commented Feb 17, 2024

Codecov Report

Attention: Patch coverage is 97.59036% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 97.64%. Comparing base (3601c92) to head (be9ce38).

❗ Current head be9ce38 differs from pull request most recent head 6b5aae7. Consider uploading reports for the commit 6b5aae7 to get more accurate results

Files Patch % Lines
src/screens/MemberDetail/MemberDetail.tsx 91.30% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1592      +/-   ##
===========================================
+ Coverage    97.61%   97.64%   +0.02%     
===========================================
  Files          157      157              
  Lines         3991     3954      -37     
  Branches      1201     1189      -12     
===========================================
- Hits          3896     3861      -35     
  Misses          89       89              
+ Partials         6        4       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@palisadoes
Copy link
Contributor

Please increase the code coverage of your patch so that the tests pass

@palisadoes
Copy link
Contributor

NOTE Read very carefully

  1. We just merged this PR which upgraded the prettier package.
    1. Upgraded prettier from 2.3.2 to 3.2.5 #1599
  2. It reformatted over 150 files.

This will put your PR at risk of extensive merge conflicts. Do the following IN THIS ORDER:

  1. upgrade your prettier in your local branch to the same version
  2. run prettier on your local branch
  3. update your local branch with the latest upstream

This will help to reduce the number of future merge conflicts for your PR.

@GlenDsza
Copy link
Contributor Author

GlenDsza commented Feb 19, 2024

Hello @Cioppolo14 , PR is ready for review.

@GlenDsza
Copy link
Contributor Author

GlenDsza commented Feb 22, 2024

I had a suggestion,

  • the SuperAdminScreen.tsx and OrganizationScreen.tsx both act as container component for LeftDrawer.tsx and LeftDrawerOrg.tsx respectively
  • but most lines of code are similar and serve the same purpose with minimal difference and are not being used anywhere apart.
  • Maybe, we can merge both the files in one file (maybe called leftDrawerContainer) and rest handle the difference using minimal conditional logic

Actually I have worked already on this thing, if y'all agree should I Add the changes to this PR only or should create new issue and then create PR for it

@GlenDsza
Copy link
Contributor Author

GlenDsza commented Feb 22, 2024

@palisadoes need reviews/reviewers for the suggestion and PR, so could then contribute to other issues

I had a suggestion,

  • the SuperAdminScreen.tsx and OrganizationScreen.tsx both act as container component for LeftDrawer.tsx and LeftDrawerOrg.tsx respectively
  • but most lines of code are similar and serve the same purpose with minimal difference.
  • Maybe, we can merge both the files in one file (maybe called leftDrawerContainer) and rest handle the difference using minimal conditional logic

Actually I have worked already on this thing, if y'all agree should I Add the changes to this PR only or should create new issue and then create PR for it

@palisadoes
Copy link
Contributor

Please fix the conflicting files

@GlenDsza
Copy link
Contributor Author

@rishav-jha-mech @beingnoble03 Have resolved conflicts, added tests and addressed comments, need review

@Olatade
Copy link
Contributor

Olatade commented Feb 29, 2024

@GlenDsza please can you update your branch with the latest changes.

@GlenDsza
Copy link
Contributor Author

@Olatade Updated with latest changes

beingnoble03
beingnoble03 previously approved these changes Mar 2, 2024
Copy link
Member

@beingnoble03 beingnoble03 left a comment

Choose a reason for hiding this comment

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

nice work. lgtm.

@palisadoes not sure about the readme changes tho.

@palisadoes
Copy link
Contributor

@GlenDsza

Your PR has too many unnecessary files that don’t relate to your issue.

REDAME.md

You can from the PR by running the commands below from the root directory of the repository

git add -u
git reset HEAD path/to/file
git commit

@GlenDsza GlenDsza requested a review from beingnoble03 March 2, 2024 09:10
@GlenDsza
Copy link
Contributor Author

GlenDsza commented Mar 2, 2024

@palisadoes @beingnoble03 Reverted changes made to README.md file, need approving review

@palisadoes palisadoes merged commit c284e07 into PalisadoesFoundation:develop Mar 2, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants