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

Router, Screen state management enhancement and performance improvement #38

Merged
merged 53 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
d6f62ee
feat: add go_router implementation
cevheri Dec 10, 2024
0959234
feat: add go_router first implementation
cevheri Dec 10, 2024
0430d8b
fix: flutter analyze issues
cevheri Dec 11, 2024
a71f6a9
feat: implement Custom app router
cevheri Dec 11, 2024
3e6da6d
feat: implement Custom app router
cevheri Dec 12, 2024
ab69481
feat: implement Custom app router
cevheri Dec 13, 2024
cb8b3d3
fix: menu leaf and authorities
cevheri Dec 13, 2024
f0f9424
fix: app-bar back button
cevheri Dec 13, 2024
88a7f6a
fix: menu.json with authorities
cevheri Dec 13, 2024
2745171
security: add hasAuthority check for user.roles and menu.roles check
cevheri Dec 13, 2024
e30a8b5
test: fix drawer menu tests
cevheri Dec 14, 2024
bafe6be
fix: go_router redirect to login when account is failure(invalid TOKEN)
cevheri Dec 14, 2024
4ab7da5
test: add TODO for router in tests
cevheri Dec 14, 2024
b578f72
fix: go_router redirect problem in production(API call waiting)
cevheri Dec 14, 2024
f0b261c
fix: check jwt token for production and mock data
cevheri Dec 14, 2024
cd13921
logs: add log tracer
cevheri Dec 14, 2024
daf82ff
feat: change languageSWitch button to stateless
cevheri Dec 15, 2024
9f42d68
fix: switch-language button fixed
cevheri Dec 15, 2024
244f279
fix: theme-mode button fixed
cevheri Dec 15, 2024
d7e44b4
docs: add flutter stream guide
cevheri Dec 17, 2024
3409e44
docs: update flutter stream guide, more use-case
cevheri Dec 18, 2024
7e6b9a7
feat: account screen structure changed. formBuilder state management …
cevheri Dec 18, 2024
2c4728c
feat: user-screen structure changed(create, update, view screen remov…
cevheri Dec 18, 2024
dffd75e
feat: user-screen structure changed(create, update, view screen remov…
cevheri Dec 18, 2024
ae85aaf
chore: user and account state main data renamed
cevheri Dec 18, 2024
419e0a5
fix: user-list action buttons size and routing fixed
cevheri Dec 18, 2024
169d58f
fix: header and data layout
cevheri Dec 18, 2024
f3cd9fb
feat: user list screen refactored
cevheri Dec 18, 2024
cd2a3ad
fix: user list screen filter rows layout fixed
cevheri Dec 18, 2024
7b5480a
refactor: change http utils get methods and mock json structure with …
cevheri Dec 18, 2024
e527a50
refactor: add new authority dropdown widget
cevheri Dec 18, 2024
16db4c1
refactor: new user structure completed. user_list, user_editor(create…
cevheri Dec 18, 2024
320dc9d
refactor: reformat code, organize import
cevheri Dec 18, 2024
a989cec
feat: add back button in list-screen
cevheri Dec 18, 2024
a05e655
fix: Add common confirmation_dialog and go_router and bloc provider e…
cevheri Dec 24, 2024
1e10fbb
refactor: user-routes can work default bloc and repository or initial…
cevheri Dec 24, 2024
7de90c0
test: add initial user_editor_screen_test
cevheri Dec 24, 2024
b63c619
test: complete user_editor_screen_test
cevheri Dec 25, 2024
6d3bb89
test: complete settings_screen_test
cevheri Dec 25, 2024
c3816eb
test: complete account_screen_test
cevheri Dec 25, 2024
7fad6dd
test: complete forgot_password_screen_test.dart and main_app_test
cevheri Dec 25, 2024
3dbc454
test: fix login_screen_test.dart
cevheri Dec 25, 2024
3119330
test: add initial user_bloc test
cevheri Dec 25, 2024
4db0152
test: complete user_bloc test
cevheri Dec 25, 2024
1964752
test: complete user_bloc test
cevheri Dec 25, 2024
612bbec
build: enable sonar
cevheri Dec 25, 2024
4869c2e
bump: flutter version upgrade to 3.27.1
cevheri Dec 26, 2024
7753d12
test: add unittest coverage
cevheri Dec 26, 2024
97455f4
test: add unittest coverage - router and security utils
cevheri Dec 26, 2024
c5617c6
test: add unittest coverage - account screen
cevheri Dec 26, 2024
bfe66e2
test: add unittest coverage - account screen
cevheri Dec 26, 2024
9d3b4c0
test: add unittest coverage - account screen
cevheri Dec 26, 2024
e6fd97d
test: add unittest coverage - login screen
cevheri Dec 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
run: flutter analyze
# - name: Run tests
# run: flutter test --concurrency=1 --test-randomize-ordering-seed=random
- name: Run tests
run: flutter test
# - name: Run tests
# run: flutter test
- name: Build APK
run: flutter build apk --release --target lib/main/main_prod.dart
- name: Build Android App Bundle
Expand Down
66 changes: 66 additions & 0 deletions assets/mock/GET_admin_users_queryParams.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[
{
"id": "user-1",
"login": "admin",
"email": "[email protected]",
"firstName": "Admin",
"lastName": "User",
"activated": true,
"langKey": "en",
"createdBy": "system",
"createdDate": "2024-01-04T06:02:47.757Z",
"lastModifiedBy": "admin",
"lastModifiedDate": "2024-01-04T06:02:47.757Z",
"authorities": [
"ROLE_ADMIN", "ROLE_USER"
]
},
{
"id": "user-2",
"login": "new_user-2",
"firstName": "Mock new user First Name",
"lastName": "Mock new user Last Name",
"email": "[email protected]",
"activated": true,
"langKey": null,
"createdBy": "system",
"createdDate": null,
"lastModifiedBy": "admin",
"lastModifiedDate": "2024-01-04T06:02:47.757Z",
"authorities": [
"ROLE_ADMIN"
]
},
{
"id": "user-3",
"login": "new_user-3",
"firstName": "Mock new user First Name",
"lastName": "Mock new user Last Name",
"email": "[email protected]",
"activated": true,
"langKey": null,
"createdBy": "system",
"createdDate": null,
"lastModifiedBy": "admin",
"lastModifiedDate": "2024-01-04T06:02:47.757Z",
"authorities": [
"ROLE_ADMIN"
]
},
{
"id": "user-4",
"login": "new_user-4",
"firstName": "Mock new user First Name",
"lastName": "Mock new user Last Name",
"email": "[email protected]",
"activated": true,
"langKey": null,
"createdBy": "system",
"createdDate": null,
"lastModifiedBy": "admin",
"lastModifiedDate": "2024-01-04T06:02:47.757Z",
"authorities": [
"ROLE_ADMIN"
]
}
]
16 changes: 0 additions & 16 deletions assets/mock/GET_admin_users_username.json

This file was deleted.

8 changes: 8 additions & 0 deletions assets/mock/GET_authorities_queryParams.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"name": "ROLE_USER"
},
{
"name": "ROLE_ADMIN"
}
]
File renamed without changes.
119 changes: 77 additions & 42 deletions assets/mock/menus.json
Original file line number Diff line number Diff line change
@@ -1,113 +1,148 @@
[
{
"id": "1",
"id": "menu-000",
"name": "home",
"description": "home",
"url": "/",
"icon": "icon",
"icon": "home",
"orderPriority": 0,
"active": true,
"parent": null,
"level": 0
"level": 0,
"leaf": false,
"authorities": [
"ROLE_USER",
"ROLE_ADMIN"
],
"parent": null
},
{
"id": "2",
"id": "menu-001",
"name": "account",
"description": "account",
"url": "/account",
"icon": "account",
"orderPriority": 10,
"active": true,
"level": 1,
"leaf": true,
"authorities": [
"ROLE_USER",
"ROLE_ADMIN"
],
"parent": {
"id": "1",
"id": "menu-000",
"name": "home",
"description": "home",
"url": "/",
"icon": "icon",
"icon": "home",
"orderPriority": 0,
"active": true,
"level": 0
},
"level": 1
"level": 0,
"leaf": false
}
},
{
"id": "3",
"id": "menu-002",
"name": "userManagement",
"description": "userManagement",
"url": "/admin",
"url": "",
"icon": "account-tie",
"orderPriority": 11,
"active": true,
"level": 1,
"leaf": false,
"authorities": [
"ROLE_USER",
"ROLE_ADMIN"
],
"parent": {
"id": "1",
"id": "menu-000",
"name": "home",
"description": "home",
"url": "/",
"icon": "icon",
"icon": "home",
"orderPriority": 0,
"active": true,
"level": 0
},
"level": 1
"level": 0,
"leaf": false
}
},
{
"id": "9",
"name": "create",
"description": "createOffer",
"url": "/admin/new-user",
"id": "menu-020",
"name": "new_user",
"description": "userNew",
"url": "/user/new",
"icon": "account-multiple-plus-outline",
"orderPriority": 1,
"active": true,
"level": 2,
"leaf": true,
"authorities": [
"ROLE_USER",
"ROLE_ADMIN"
],
"parent": {
"id": "3",
"id": "menu-002",
"name": "userManagement",
"description": "userManagement",
"url": "/admin",
"url": "",
"icon": "account-tie",
"orderPriority": 11,
"active": true,
"level": 1
},
"level": 2
"level": 1,
"leaf": false
}
},
{
"id": "10",
"name": "list",
"description": "listOffer",
"url": "/admin/list-users",
"id": "menu-021",
"name": "list_user",
"description": "userList",
"url": "/user",
"icon": "account-edit-outline",
"orderPriority": 2,
"active": true,
"level": 2,
"leaf": true,
"authorities": [
"ROLE_USER",
"ROLE_ADMIN"
],
"parent": {
"id": "3",
"id": "menu-002",
"name": "userManagement",
"description": "userManagement",
"url": "/admin",
"url": "",
"icon": "account-tie",
"orderPriority": 11,
"active": true,
"level": 1
},
"level": 2
"level": 1,
"leaf": false
}
},
{
"id": "5",
"id": "menu-003",
"name": "settings",
"description": "settings",
"url": "/settings",
"icon": "cog-outline",
"orderPriority": 60,
"active": true,
"level": 1,
"leaf": true,
"authorities": [
"ROLE_USER",
"ROLE_ADMIN"
],
"parent": {
"id": "1",
"id": "menu-000",
"name": "home",
"description": "home",
"url": "/",
"icon": "icon",
"icon": "home",
"orderPriority": 0,
"active": true,
"level": 0
},
"level": 1
"level": 0,
"leaf": false
}
}
]
]
Loading
Loading