collactionteam / collaction_cms Goto Github PK
View Code? Open in Web Editor NEWThis is the UI interface for the CMS API
This is the UI interface for the CMS API
The state of this bloc should be a List<Commitments>
and its initial state should be empty.
Should implement the following events:
Consider that the state of the bloc should be immutable so instead of calling the following method to add commitments List.add()
is better to add a commitment like this: [...state.commitments, event.commitment]
And to update a commitment:
var newCommitments = commitments.map((commitment) {
if(commitment.id == event.commitment.id) {
return event.commitment;
} else {
return commitment;
}
}).toList();
Reference: Figma - CMS project inside CollAction App - CrowdActions view Screen
Should be implemented on create_credentials.dart
card and link_auth_page.dart
You can find the reference in Figma - CMS project inside CollAction App. the style should be the same (Text color, padding, TextStyle). After triggering onTap the app should navigate to logIn page or to authentication.page.dart
. So use GestureDectector
or other method to achieve this. Because the navigation Bloc depends on Auth Bloc, one way to achieve this is to emit AuthEvent.authCheckRequested()
When adding the specific route to the base url collaction-development.web.app
like collaction-development.web.app/verification
a "Page not found" display is returned.
AuthBloc
user stream.Invite admin modal should be closed without triggering a new application event. If complications appear when taking this approach a new bloc is needed to handle invitation that doesn't trigger navigation events.
Ported from Jira
App throws this error, everytime the "Add crowdAction" modal is closed. The app keeps working fine though
Create and implement controllers to manage the fields of the Info and Image forms.
Refer to feat/commitments-form for an example.
The current CMS only allows for admin invitation, but it needs to be replaced with a system that allows admins to invite moderators and promote them to admin. After the update, admins will have two options available: inviting moderators and promoting them to admin.
AuthApiRepository
AuthBloc
TextFormField
.
CollActionInputField
widget, should be something similarValueFailures
in Domain that can be used, can be found in value_validators.dart
and value_failures.dart
. Also there is a logic to map the values from domain to presentation "displayable" values. Check MapValidationOutput
class.syncfusion_flutter_calendar
, extra customization it's needed in order to follow CollAction styles.This should be created in Domain. And also have an extension method to get the value for presentation layer and a JsonValue
annotation. We use properCase
for the presentation and upperCase
for sending the request to the api
Check Status
enum
Admins should be able to invite moderators and promote moderators to admin. The Invitation modal should have both options.
The modal should contain the following:
Check Figma for a reference "Invite an admin modal"
Ported from Jira
Implement Atomic design. Create components with auto-layout. If possible, implement CollAction style or expand the global style. Standardize the styles used.
This card or content will be displayed on create_credentials.dart screen
when the state is AuthState.adminCreationCompleted()
, so once the user adds their password and is successfully updated, the content of the card changes.
Also, the button "Go to log in" should trigger the bloc event AuthEvent.signOut()
The design will be on Figma - CollAction App/CMS page. Under the name of "You are all set card" on the canvas
Check Figma CrowdAction View in Final screens for reference.
GestureDetetor
or a similar widget so that clicking it triggers a navigation to crowdAction view.GoRouter
to support this. Would be a dynamic routing.SelectedCrowdActionBloc
or something like that.SelectedCrowdActionBloc
". And the widget that manages the presentation can consume the state.Depends on #15
Should include pagination support and filters actions, you can find the UI reference in Figma - CMS project inside CollAction App on CrowdActions view screen. Also for the application, infrastructure and domain, you can find a reference in collaction_app, crowdactions_getter_bloc.dart
and inside infrastructure/crowdactions
.
Maybe we should breakdown this issue in multiple ones. Any Suggestions?
Split AuthBloc in two blocs. The first bloc is going to handle Authentication state, authenticated
or unauthenticated
and related events such as AuthEvent.authCheckRequested()
and AuthEvent.signedOut()
. The second bloc will handle authentication events such as: invite moderators, promote admins, verify user, etc.
Ported from Jira
The table is not displaying any crowdAction.
Description:
On the CrowdActions page, we will have a button to add a new crowdaction. The button will open a modal asking for the information needed to create a draft.
There will be two submit buttons:
Create: Creates the CrowdAction and refreshes the CrowdActions page
Create and Follow: Creates the CrowdAction and open the newly added CrowdAction
Ported from Jira
When triggering pagination events, the following error is produced
Expected a value of type 'String', but got one of type 'Null'
Check package flutter_dropzone
and/ or file_picker
getting this when using freezed :-
../../../../../.pub-cache/hosted/pub.dev/file-6.1.2/lib/src/interface/file.dart:15:16: Error: The method 'File.create' has fewer named arguments than those of overridden method 'File.create'. Future<File> create({bool recursive = false}); ^ ../../../../../DevSDK/flutter/bin/cache/dart-sdk/lib/io/file.dart:232:16: Context: This is the overridden method ('create'). Future<File> create({bool recursive = false, bool exclusive = false}); ^ ../../../../../.pub-cache/hosted/pub.dev/file-6.1.2/lib/src/interface/file.dart:15:16: Error: The method 'File.create' doesn't have the named parameter 'exclusive' of overridden method 'File.create'. Future<File> create({bool recursive = false}); ^ ../../../../../DevSDK/flutter/bin/cache/dart-sdk/lib/io/file.dart:232:16: Context: This is the overridden method ('create'). Future<File> create({bool recursive = false, bool exclusive = false}); ^ ../../../../../.pub-cache/hosted/pub.dev/file-6.1.2/lib/src/forwarding/forwarding_file.dart:22:8: Error: The method 'ForwardingFile.createSync' has fewer named arguments than those of overridden method 'File.createSync'. void createSync({bool recursive = false}) => ^ ../../../../../DevSDK/flutter/bin/cache/dart-sdk/lib/io/file.dart:248:8: Context: This is the overridden method ('createSync'). void createSync({bool recursive = false, bool exclusive = false}); ^ ../../../../../.pub-cache/hosted/pub.dev/file-6.1.2/lib/src/forwarding/forwarding_file.dart:22:8: Error: The method 'ForwardingFile.createSync' doesn't have the named parameter 'exclusive' of overridden method 'File.createSync'. void createSync({bool recursive = false}) => ^ ../../../../../DevSDK/flutter/bin/cache/dart-sdk/lib/io/file.dart:248:8: Context: This is the overridden method ('createSync'). void createSync({bool recursive = false, bool exclusive = false}); ^ ../../../../../.pub-cache/hosted/pub.dev/file-6.1.2/lib/src/backends/memory/memory_file.dart:57:8: Error: The method 'MemoryFile.createSync' has fewer named arguments than those of overridden method 'File.createSync'. void createSync({bool recursive = false}) { ^ ../../../../../DevSDK/flutter/bin/cache/dart-sdk/lib/io/file.dart:248:8: Context: This is the overridden method ('createSync'). void createSync({bool recursive = false, bool exclusive = false}); ^ ../../../../../.pub-cache/hosted/pub.dev/file-6.1.2/lib/src/backends/memory/memory_file.dart:57:8: Error: The method 'MemoryFile.createSync' doesn't have the named parameter 'exclusive' of overridden method 'File.createSync'. void createSync({bool recursive = false}) { ^ ../../../../../DevSDK/flutter/bin/cache/dart-sdk/lib/io/file.dart:248:8: Context: This is the overridden method ('createSync'). void createSync({bool recursive = false, bool exclusive = false}); ^ ../../../../../.pub-cache/hosted/pub.dev/pub_semver-2.1.0/lib/src/version_constraint.dart:96:13: Error: Method not found: 'FallThroughError'. throw FallThroughError(); ^^^^^^^^^^^^^^^^ ../../../../../.pub-cache/hosted/pub.dev/build_runner-2.1.7/lib/src/build_script_generate/bootstrap.dart:76:40: Error: Method not found: 'NullThrownError'. final error = e[0] as Object? ?? NullThrownError();
Ported from Jira
Provisional steps to tackle this issue:
Check Figma for the UI reference of CrowdAction Info, Images, Assign Commitments and Assigned Commitments
Architecture
To separate and encapsulate the logic of the form, One approach is to create a bloc for each section and a "high order bloc" that is going to be subscribed to all the other blocs. So everytime there is a state change in one of the "sub-blocs", it going to trigger a state update in the main bloc.
Could be blocs or cubits depending on the situation.
Ported from Jira
Check Figma for reference
Ported from Jira
The files should be uploaded to the bloc as Uint8List
. flutter_dropzone
and file_picker
provide a callback / and method to read the file as bytes. This is important because when the POST
multipart request is executed the images are going to be sent as bytes? (I think that is the best method but I'm no 100% sure) http.MultipartFile.fromBytes
The event is going to be emitted everytime a file is uploaded
Ported from Jira
Reference: Figma - CMS project inside CollAction App - CrowdActions view Screen
Ported from Jira
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.