-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Categorized Sub-spaces and Sub-chats #2168
Open
kumarpalsinh25
wants to merge
61
commits into
main
Choose a base branch
from
kumar/categorised-spaces
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,401
−518
Open
Changes from all commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
983348f
Setup sub-space screen and routing
kumarpalsinh25 2fed2fe
Setup AppBar Component
kumarpalsinh25 10927ee
Setup Categories Data Providers
kumarpalsinh25 1ccd46d
Merge branch 'main' into kumar/categorised-spaces
kumarpalsinh25 7cd3c32
Added dummy data for testing
kumarpalsinh25 b11e15e
Implemented ExpandedList List to view dummy categories data
kumarpalsinh25 24581e5
Added category icon and color data in dummy list
kumarpalsinh25 ae2ee1b
Optimised dummy data function
kumarpalsinh25 419e84d
Setup Categories List with Dummy Data
kumarpalsinh25 48342cf
Merge remote-tracking branch 'origin/kumar/categorised-spaces' into k…
kumarpalsinh25 54ef622
entries are a vec
gnunicorn e3ba54e
Minor usage pattern fix to ensure consistentency and improved memory …
gnunicorn 11742d0
Added space card UI for categories entries data
kumarpalsinh25 81b81b9
Added https://pub.dev/packages/drag_and_drop_lists
kumarpalsinh25 aa4ab11
Manage Organised view toggle
kumarpalsinh25 9850b66
Added action buttons in Organised view
kumarpalsinh25 6b33414
Code Refactoring to manage categories in generic way
kumarpalsinh25 fe12753
Save updated categories data
kumarpalsinh25 5a01b6c
Minor UI Fix
kumarpalsinh25 66efc97
Save categories order
kumarpalsinh25 ec58103
Updated dummy categories data
kumarpalsinh25 febaec4
Fixes the bug related to category order management
kumarpalsinh25 44fa3d9
Improve code structure by using LocalCategory Model class to manage c…
kumarpalsinh25 04045cf
Manage actual space list with categories and un-categories data
kumarpalsinh25 f64e905
Fixed lint error
kumarpalsinh25 85617e2
Add category flow
kumarpalsinh25 cb70089
Menu options to category and general structure changes in space listing
kumarpalsinh25 ef0c960
Minor UI Change
kumarpalsinh25 f5a27d4
Manage add and delete category with local state
kumarpalsinh25 ed06801
Moved Organized category as separate screen
kumarpalsinh25 14bc624
Added relevant title
kumarpalsinh25 07e5af2
Edit category draft work
kumarpalsinh25 808749c
Edit category draft work
kumarpalsinh25 61d0663
Edit category
kumarpalsinh25 bb86ef2
Minor wording corrections
kumarpalsinh25 0da2c35
Don't show category which don't have any entries
kumarpalsinh25 cb3d15c
Minor fixes
kumarpalsinh25 7e30d60
Manage local category list with provider
kumarpalsinh25 a89e61e
General code improvement
kumarpalsinh25 7d40b78
General code improvement
kumarpalsinh25 802f2fe
General code improvement
kumarpalsinh25 8fd2784
General code improvement
kumarpalsinh25 d9f5c26
Save organize categories on back and manage delete categories entries
kumarpalsinh25 b746951
Minor fixes
kumarpalsinh25 aa49437
Wording correction
kumarpalsinh25 d9d5952
Dummy category validation code improvement
kumarpalsinh25 1b65cc3
Wording improvement
kumarpalsinh25 969e39d
Fixed last category item view cut issue
kumarpalsinh25 7b718ed
Merge branch 'main' into kumar/categorised-spaces
kumarpalsinh25 c0bb187
Changes related to merge with main
kumarpalsinh25 dbb070f
Remove older sub-spaces page
kumarpalsinh25 4e9be4a
Added RoomCard menu options
kumarpalsinh25 6fcf12d
Added entries at begin which are came from delete category item
kumarpalsinh25 84653d6
Make sub-chats with categories options
kumarpalsinh25 946368c
Minor fixes
kumarpalsinh25 2331239
Change related to providers updates
kumarpalsinh25 6286083
Added skeleton loading UI
kumarpalsinh25 28959d2
Minor fixes
kumarpalsinh25 e36e3fa
Updated change log data
kumarpalsinh25 c4d5dd4
Merge branch 'main' into kumar/categorised-spaces
kumarpalsinh25 975d558
Added missing Goto chat call on tap of Chat Room Card
kumarpalsinh25 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- [New] : All new categorize management for sub-spaces and sub-chats | ||
- [New] : You can now create custom categories and manage all the sub-space and sub-chat base on the your requirements |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
app/lib/common/skeletons/general_list_skeleton_widget.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import 'package:atlas_icons/atlas_icons.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:skeletonizer/skeletonizer.dart'; | ||
import 'package:flutter_gen/gen_l10n/l10n.dart'; | ||
|
||
class GeneralListSkeletonWidget extends StatelessWidget { | ||
const GeneralListSkeletonWidget({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Skeletonizer(child: _buildSkeletonUI(context)); | ||
} | ||
|
||
Widget _buildSkeletonUI(BuildContext context) { | ||
return Column( | ||
children: [ | ||
_buildListItemSkeletonUI(context), | ||
_buildListItemSkeletonUI(context), | ||
_buildListItemSkeletonUI(context), | ||
_buildListItemSkeletonUI(context), | ||
_buildListItemSkeletonUI(context), | ||
], | ||
); | ||
} | ||
|
||
Widget _buildListItemSkeletonUI(BuildContext context) { | ||
return Padding( | ||
padding: const EdgeInsets.all(16), | ||
child: Row( | ||
children: [ | ||
Container( | ||
height: 50, | ||
width: 50, | ||
color: Colors.white, | ||
), | ||
const SizedBox(width: 10), | ||
Expanded( | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
Text(L10n.of(context).title + L10n.of(context).title), | ||
Text( | ||
L10n.of(context).description + L10n.of(context).description, | ||
), | ||
], | ||
), | ||
), | ||
const SizedBox(width: 20), | ||
const Icon(Atlas.crown_winner_thin), | ||
const SizedBox(width: 10), | ||
const Icon(Atlas.dots_vertical), | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import 'package:acter/common/providers/sdk_provider.dart'; | ||
import 'package:acter/common/providers/space_providers.dart'; | ||
import 'package:acter/features/categories/model/CategoryModelLocal.dart'; | ||
import 'package:acter/features/categories/providers/categories_providers.dart'; | ||
import 'package:acter/features/categories/utils/category_utils.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_easyloading/flutter_easyloading.dart'; | ||
import 'package:flutter_riverpod/flutter_riverpod.dart'; | ||
import 'package:flutter_gen/gen_l10n/l10n.dart'; | ||
import 'package:logging/logging.dart'; | ||
|
||
final _log = Logger('a3::save_categories'); | ||
|
||
Future<void> saveCategories( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One function to save all categories related changes from Local Category List. |
||
BuildContext context, | ||
WidgetRef ref, | ||
String spaceId, | ||
CategoriesFor categoriesFor, | ||
List<CategoryModelLocal> categoryList, | ||
) async { | ||
// Show loading message | ||
EasyLoading.show(status: L10n.of(context).updatingCategories); | ||
try { | ||
//Get category manager | ||
final categoriesManager = await ref.read( | ||
categoryManagerProvider( | ||
(spaceId: spaceId, categoriesFor: categoriesFor), | ||
).future, | ||
); | ||
final sdk = await ref.watch(sdkProvider.future); | ||
final displayBuilder = sdk.api.newDisplayBuilder(); | ||
|
||
//Get category builder | ||
final categoriesBuilder = categoriesManager.updateBuilder(); | ||
|
||
//Clear category builder data and Add new | ||
categoriesBuilder.clear(); | ||
for (int i = 0; i < categoryList.length; i++) { | ||
bool isValidCategory = CategoryUtils().isValidCategory(categoryList[i]); | ||
if (isValidCategory) { | ||
final newCategoryItem = categoriesManager.newCategoryBuilder(); | ||
//ADD TITLE | ||
newCategoryItem.title(categoryList[i].title); | ||
|
||
//ADD COLOR AND ICON | ||
displayBuilder.color(categoryList[i].color!.value); | ||
displayBuilder.icon('acter-icon', categoryList[i].icon!.name); | ||
newCategoryItem.display(displayBuilder.build()); | ||
|
||
//ADD ENTRIES | ||
for (int j = 0; j < categoryList[i].entries.length; j++) { | ||
newCategoryItem.addEntry(categoryList[i].entries[j]); | ||
} | ||
categoriesBuilder.add(newCategoryItem.build()); | ||
} | ||
} | ||
|
||
//Save category builder | ||
final space = await ref.read(spaceProvider(spaceId).future); | ||
space.setCategories(categoriesFor.name, categoriesBuilder); | ||
|
||
EasyLoading.dismiss(); | ||
} catch (e, s) { | ||
_log.severe('Failed to save categories', e, s); | ||
if (!context.mounted) { | ||
EasyLoading.dismiss(); | ||
return; | ||
} | ||
EasyLoading.showError( | ||
L10n.of(context).updatingCategoriesFailed(e), | ||
duration: const Duration(seconds: 3), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import 'package:acter/common/widgets/acter_icon_picker/model/acter_icons.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class CategoryModelLocal { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is to better manage category operation from flutter side. |
||
final String title; | ||
final Color? color; | ||
final ActerIcon? icon; | ||
final List<String> entries; | ||
|
||
const CategoryModelLocal({ | ||
required this.title, | ||
this.color, | ||
this.icon, | ||
required this.entries, | ||
}); | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This changes are for providing option to added dynamic
leading
widget. Earlier dynamictrailing
widget option was there.