-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Feature Request: auto populating plugin data during the initial server setup. #1345
Feature Request: auto populating plugin data during the initial server setup. #1345
Conversation
Our Pull Request Approval ProcessWe have these basic policies to make the approval process smoother for our volunteer team. Testing Your CodePlease make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:
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. ReviewersWhen your PR has been assigned reviewers contact them to get your code reviewed and approved via:
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
Note: Currently the approaches discussed in the PR description for the PRODUCTION and DEVELOPMENT mode are not ready to be used (as the plugins are not re-added yet to mobile app). This #1345 pull request can be merged without any issues. |
Codecov Report
@@ Coverage Diff @@
## develop #1345 +/- ##
===========================================
- Coverage 99.59% 99.29% -0.30%
===========================================
Files 177 172 -5
Lines 10166 10141 -25
Branches 753 757 +4
===========================================
- Hits 10125 10070 -55
- Misses 41 61 +20
- Partials 0 10 +10
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@DMills27 please add your review. |
What kind of change does this PR introduce?
Feature for auto populating
Issue Number:
Fixes #1337
Did you add tests for your changes?
N/A
Snapshots/Videos:
Describe the solution you'd like
Some default plugin data should be automatically populated in the mongoDB collection to make sure that all plugin work smoothly
Features working for the first time (No plugin data present in the db)
![image](https://private-user-images.githubusercontent.com/65951872/246458445-58457e45-c3ea-401d-a9e0-2ab5433901be.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJ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otRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBkMmYwZjIzMzJhNDJhN2JjMWQyNWMwNDQ3ZDQzYjk3NzU2NzExMjJlNWQ1ZWQzNDRmZDIxMGE2ZmYxNWFlMjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.xp_97UuYw9FCnNBCMyh0r-jG_KEn-ioXEFIUjEH_RtY)
Take a look at the success message talawa17june is the name of collection
Available plugin data on the database for the first time
Features working if the data is already present
![image](https://private-user-images.githubusercontent.com/65951872/246458772-da971a7e-368f-4689-bcd3-c2c0b49b55c1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3MDE4MjIsIm5iZiI6MTczOTcwMTUyMiwicGF0aCI6Ii82NTk1MTg3Mi8yNDY0NTg3NzItZGE5NzFhN2UtMzY4Zi00Njg5LWJjZDMtYzJjMGI0OWI1NWMxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDEwMjUyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU5ZWNjMzkxMzBiNjQyZGNiOWRiNDM4MzdmYTVlOTMwNGU4YTQyNzZiZTExMDVlZDU1M2M3ZjIyYjhiMDU0NjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.2LjH0PDs3OyHkeEivFze84jXVNd7ojAE6vK0f1sFxRE)
Take a look at the success message talawa17june is the name of collection
Example
Here I've change the Event plugin title to Events22222222
![image](https://private-user-images.githubusercontent.com/65951872/246460243-9b8c216a-cbbe-4e7b-8e08-4d43edad8443.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3MDE4MjIsIm5iZiI6MTczOTcwMTUyMiwicGF0aCI6Ii82NTk1MTg3Mi8yNDY0NjAyNDMtOWI4YzIxNmEtY2JiZS00ZTdiLThlMDgtNGQ0M2VkYWQ4NDQzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDEwMjUyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA1MmI0NTFlM2Y3OWI2ZTQyNzAwNDlkMjg2ZjM3M2UzNDg0MjM0ZDU0MTNlNWM5NzIxMDQ3MjVhNWM3YzI0MTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.x174XQgS7CikUpt4qH4Z6FNqDchyG0j6ZNCrElZgjLg)
![image](https://private-user-images.githubusercontent.com/65951872/246460598-afcd3fb0-42cd-48b0-b791-c0270a5b65a2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3MDE4MjIsIm5iZiI6MTczOTcwMTUyMiwicGF0aCI6Ii82NTk1MTg3Mi8yNDY0NjA1OTgtYWZjZDNmYjAtNDJjZC00OGIwLWI3OTEtYzAyNzBhNWI2NWEyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDEwMjUyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVhN2EwYTIzMjczN2IyOTQ0NDNiZDIxNTIxYjcyZTYwMzM0MWI3ODZhNzQyMmFmYTczYTk4YWQzNjkwMDNiZjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ubjBHujCjmzedok--QjWjIuX8z_HyNJWMLXAtGZErQs)
![image](https://private-user-images.githubusercontent.com/65951872/246461134-7dfd75da-5731-4d55-a061-73c156c1f3d1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3MDE4MjIsIm5iZiI6MTczOTcwMTUyMiwicGF0aCI6Ii82NTk1MTg3Mi8yNDY0NjExMzQtN2RmZDc1ZGEtNTczMS00ZDU1LWEwNjEtNzNjMTU2YzFmM2QxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDEwMjUyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTljNmY0NzQ2NDBiZjA4MjNiMDI0MzAwYTllMjE1OWZlMTg5YTIxNWM1NjBiMTI1MDRjZTIyZWY5MzAzMTJkYjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.pgakKh0x4UpfLhKl7XRhQKPMgGlXjAJsEN-gjFVGfPQ)
But even after running the app it does not change the plugin data as it's already present. Hence maintaining the consistency of the plugin data afterwards.
Video Demo: Talawa API: Demos of Websocket, schema change, auto populating features
Chapters:
0:00 Auto Populating plugins demo
05:38 Discussing websockets code and change schema code
10:10 Demo of Websockets, createPlugin, updatePluginStatus
https://www.youtube.com/watch?v=MaETaxPGNxk
![IMAGE ALT TEXT HERE](https://camo.githubusercontent.com/3840b13c6953ef2dbc39acc8522789733bffb46d3b2abead0a7466f025e38308/68747470733a2f2f696d672e796f75747562652e636f6d2f76692f4d614554617850474e786b2f302e6a7067)
If relevant, did you update the documentation?
n/a
Summary
src/config/plugins/pluginData.json
is considered as primary plugins stating that they are the fundamental features of the app that's why they're there.PRODUCTION MODE
DEVELOPMENT MODE
I personally think that, as the ADMIN has to manually install the plugins for the orgs only for the first time to make them visible in the mobile app for development. So the current process will work perfect for them and there will be no need to create any new approach
Does this PR introduce a breaking change?
No breaking changes.
Other information
No
Have you read the contributing guide?
Yes