-
-
Notifications
You must be signed in to change notification settings - Fork 496
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
[GSoC][Feature Request #1346 ]: Enabling Plugins , Donation as a Plugin, Refractor for TalawaPluginProvider Widget #1355
[GSoC][Feature Request #1346 ]: Enabling Plugins , Donation as a Plugin, Refractor for TalawaPluginProvider Widget #1355
Conversation
gives sample demo for `TalawaPluginProvider `
…ibility in navbar
61ed069
to
4dbe824
Compare
4f5bd70
to
3f24eec
Compare
Codecov Report
@@ Coverage Diff @@
## develop #1355 +/- ##
===========================================
- Coverage 71.10% 68.08% -3.03%
===========================================
Files 127 143 +16
Lines 6379 7159 +780
===========================================
+ Hits 4536 4874 +338
- Misses 1843 2285 +442
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@SiddheshKukade Please fix the failing tests. |
@palisadoes Sir the now current CI/CD is not passing due to the code coverage. But I've added tests for the entire you can check them here Test for
|
I'm wondering if this could be caused by the extra comments we have been adding in the code as part of our documentation project |
You can see the files that are not covered here. Click on the |
@palisadoes Sir I just checked out that the Current code coverage of And in the workflow file I think the expected coverage (workflow file) should be less than the current coverage (codecov). What is your opinion about this? |
OK. I'll adjust it. |
This Pull Request is associated with Google Summer of Code 2022 Project link
Details will be added soon
What kind of change does this PR introduce?
Feature Request : for Enabling Plugins in Navbar, Implementing Donation as a Plugin, Refractor for TalawaPluginProvider Widget
Issue Number:
Fixes #1346
Did you add tests for your changes?
Will be added soon.
Snapshots/Videos:
Will be added soon
If relevant, did you update the documentation?
Not needed for now but will be added later if required
Summary
Problems and their solutions are described below
1. Donation feature as a plugin (c75a482)
Problem :
Currently the donation feature in the talawa app is not functional and also not implemented as a plugin so that the admins can't control it's visibility
Solution :
Donation UI must be implemented as a plugin in order control it's visibility across the organization in the talwa app by the talawa-admin panel. Donations feature should be implemented by using payment pacakges like
flutter_braintree
etc.Approach :
TalawaPluginProvider
Widget (to enable as plugin)flutter_braintree
package (https://pub.dev/packages/flutter_braintree)More on braintree : https://www.braintreepayments.com/about-braintree
2. Plugin architecture in the Navbar : (7709191)
Video :
Talwa.Demo.Admin.and.App.mp4
Problem : The main features of the talawa app are Events, Posts , etc. These features are not implemented as plugins which means that admin can't control whether to enable these features in the org or not.
We need some solution to implement it as a plugin
Solution :
Implement a mechanism to control visibility of those main features
Approach :
The main feature of the talawa app are only accessible from the navbar of the app So, to implement them as plugin we have to :
TalwaPluginProviderNav
that will be used for wrapping around theses navbar items.TalwaPluginProvider
will make sure to only show those components that are installed for that org onlyPlugin
has installed in the Organization by the admin then some of it's property should be likea. The
TalawaPluginProviderNav
will make sure that these properties are valid and then and only then it will insert that items in the flutter UI tree for that navbarb. Specific Icons for specific features are need to be specified already in a Object called as
insert-here
and then the Icons would also be dynamically rendered according to visibility of those features as pluginsc. The
visible
property of the navbar items can be set totrue
for development purposes . If true the features will be visible and accessible in the organization even if they are not installed for that organization (use this for development only)3. Fixing how the components are rendered using
TalawaPluginProvider
(20fc546)Problem :
TalawaPluginProvider
widget is used for implementing features as plugins. It usesVisiblity
widget to control the visibility of the UI that It is wrapped over.Visiblity
widget have some a issue that it does not remove that component from the Flutter UI tree . This can create some bugs in the future and needs to be resolvedSolution :
We should directly return the componet instead of wrapping it in
Visiblity
ComponentApproach :
Replace the
Visibility
widget by an empty Container() widget.Does this PR introduce a breaking change?
No
Other information
Not needed.
Have you read the contributing guide?
Yes