Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feat/content management filter and UI overhaul #91

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

Merged
fulleni merged 85 commits into main from feat/content-management-filter-and-UI-overhaul
Sep 25, 2025
Merged
Changes from 1 commit
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
c79ee4e
build(dependencies): add collection package and update lock file
fulleni Sep 25, 2025
937fecd
ci: ignore avoid_positional_boolean_parameters lint rule
fulleni Sep 25, 2025
3b14e4e
chore: delete absolete files
fulleni Sep 25, 2025
653dcc5
feat(l10n): add filtering and searching localization strings
fulleni Sep 25, 2025
a0b0fbe
feat(content_management): add new content management events
fulleni Sep 25, 2025
9054ee3
feat(content_management): enhance ContentManagementState with deletio...
fulleni Sep 25, 2025
4a9d048
feat(content_management): implement content lifecycle management
fulleni Sep 25, 2025
02dc9e3
feat(content_management): implement headlines filter events
fulleni Sep 25, 2025
9266184
feat(content_management): add HeadlinesFilterState class
fulleni Sep 25, 2025
04b6778
feat(content_management): implement headlines filter BLoC
fulleni Sep 25, 2025
e5e0357
feat(content_management): add state class for sources filter UI
fulleni Sep 25, 2025
6156f00
feat(content_management): implement sources filter events
fulleni Sep 25, 2025
cc403d9
feat(content_management): implement sources filter bloc
fulleni Sep 25, 2025
ddf5419
feat(content_management): implement topics filter BLoC
fulleni Sep 25, 2025
a0afc83
feat(content_management): implement topics filter events
fulleni Sep 25, 2025
20e35b2
feat(content_management): add TopicsFilterState for content filtering
fulleni Sep 25, 2025
856449b
feat(content_management): implement filtering functionality
fulleni Sep 25, 2025
9b16993
refactor(content_management): enhance headlines table for responsive ...
fulleni Sep 25, 2025
a35c8ef
refactor(content_management): improve sources page layout and functio...
fulleni Sep 25, 2025
a1b8eae
feat(content_management): improve topics page layout and functionality
fulleni Sep 25, 2025
ece6ad0
feat(content_management): add filter dialog widget
fulleni Sep 25, 2025
0794981
refactor(router): update content management routing and remove unused...
fulleni Sep 25, 2025
e4329b0
style: format
fulleni Sep 25, 2025
44590b4
refactor(router): remove unused MultiBlocProvider from content-manage...
fulleni Sep 25, 2025
ec65267
fix(content_management): wrap FilterDialog in Builder for proper context
fulleni Sep 25, 2025
e9c4054
feat(content_management): add filter bloc providers for headlines, to...
fulleni Sep 25, 2025
2ba7fdd
feat(localization): add tooltip for edit button in multiple languages
fulleni Sep 25, 2025
0be0ebf
refactor(content_management): replace action buttons with ContentActi...
fulleni Sep 25, 2025
1bc5567
refactor(content_management): replace action buttons with ContentActi...
fulleni Sep 25, 2025
6d154a6
refactor(content): replace topic actions with ContentActionButtons wi...
fulleni Sep 25, 2025
15426ce
feat(content_management): add ContentActionButtons widget
fulleni Sep 25, 2025
e24eee8
refactor(router): remove unused imports
fulleni Sep 25, 2025
45e761d
feat(l10n): add filter and selection strings
fulleni Sep 25, 2025
58f69b2
feat(content_management): enhance headlines filter functionality
fulleni Sep 25, 2025
a1a3f70
refactor(content_management): update HeadlinesFilterState for expande...
fulleni Sep 25, 2025
de00eb2
feat(content_management): enhance headlines filter functionality
fulleni Sep 25, 2025
88ac71d
feat(content_management): implement comprehensive sources filter events
fulleni Sep 25, 2025
405cc4e
refactor(content_management): expand sources filter state
fulleni Sep 25, 2025
65b175d
feat(content_management): enhance sources filter functionality
fulleni Sep 25, 2025
c686161
feat(content_management): enhance topics filter functionality
fulleni Sep 25, 2025
d146aad
refactor(content_management): simplify TopicsFilterState status selec...
fulleni Sep 25, 2025
b02f627
feat(content_management): implement filter application and reset
fulleni Sep 25, 2025
72142b2
feat(content_management): implement filter dialog events
fulleni Sep 25, 2025
59d8c10
feat(content_management): implement filter dialog state
fulleni Sep 25, 2025
58cf144
feat(content_management): implement FilterDialogBloc
fulleni Sep 25, 2025
37a8977
refactor(content_management): expand filter dialog with additional fi...
fulleni Sep 25, 2025
4143be3
feat(content_management): enhance filtering functionality in content ...
fulleni Sep 25, 2025
b3b06bf
feat(content_management): implement filtering for headlines, topics, ...
fulleni Sep 25, 2025
80b97ba
feat(SearchableSelectionInput): enhance widget functionality
fulleni Sep 25, 2025
a360a45
feat(SelectionPage): enhance selection functionality with multi-selec...
fulleni Sep 25, 2025
6c199fc
feat(SearchableSelectionPage): implement multi-select functionality
fulleni Sep 25, 2025
d7c6668
feat(SearchableSelectionState): support multiple selected items
fulleni Sep 25, 2025
533b044
feat(selection_page): enhance selection events for multi-select funct...
fulleni Sep 25, 2025
6a2ecdd
feat(SelectionPage): upgrade SearchableSelectionBloc to support multi...
fulleni Sep 25, 2025
bae4b28
feat(shared): add pagination and API request constants
fulleni Sep 25, 2025
4805a5a
style(content_management): adjust indentation in content_action_buttons
fulleni Sep 25, 2025
5827a80
feat(content_management): add headlines filter functionality
fulleni Sep 25, 2025
8da1989
feat(content_management): implement sources filtering functionality
fulleni Sep 25, 2025
51e1a99
feat(content): implement topics filter functionality
fulleni Sep 25, 2025
78f92ab
fix(content_management): update SearchableSelectionInput to use selec...
fulleni Sep 25, 2025
e643a05
fix(content_management): update SearchableSelectionInput to use selec...
fulleni Sep 25, 2025
39515a3
fix(content_management): update SearchableSelectionInput to use selec...
fulleni Sep 25, 2025
c3e0357
fix(content_management): update SearchableSelectionInput to use selec...
fulleni Sep 25, 2025
7696008
refactor(bloc): reorganize bloc provider order and injection
fulleni Sep 25, 2025
97e9c57
refactor(content_management): implement BLoC pattern in filter dialog
fulleni Sep 25, 2025
1296124
refactor(content_management): improve FilterDialogBloc usage and init...
fulleni Sep 25, 2025
ff2319c
feat(router): add filter dialog routes
fulleni Sep 25, 2025
47fc990
feat(router): add filter dialog route and dependencies
fulleni Sep 25, 2025
f466049
refactor(content_management): update comments in filter dialog
fulleni Sep 25, 2025
f0320f9
refactor(content): replace dialog show with route push for filter dialog
fulleni Sep 25, 2025
9730652
feat(constants): add snackbar duration constant
fulleni Sep 25, 2025
3ffaa25
feat(content_management): add DeletionEventReceived event
fulleni Sep 25, 2025
c96a838
feat(content_management): implement pending deletions with undo using...
fulleni Sep 25, 2025
7c9e6e0
feat(content_management): implement undo functionality for deleted items
fulleni Sep 25, 2025
9d17c72
refactor(content_management): move headlines filter map builder to bloc
fulleni Sep 25, 2025
d72639e
refactor(content_management): improve sources page layout and functio...
fulleni Sep 25, 2025
6ffb820
refactor(content_management): move topics filter map builder to bloc
fulleni Sep 25, 2025
2b0535e
feat: Add pending deletions service to app providers
fulleni Sep 25, 2025
1ec9079
feat(localization): add Arabic and English translations for filter UI...
fulleni Sep 25, 2025
c076256
feat(content_management): add event to reset filter dialog selections
fulleni Sep 25, 2025
345c5bb
feat(content_management): implement reset filter functionality
fulleni Sep 25, 2025
5bc48d0
feat(filter-dialog): add reset filters functionality
fulleni Sep 25, 2025
d5d08d4
feat(content_management): add no results UI when filters are active
fulleni Sep 25, 2025
fa9f56c
feat(content_management): add no results UI when filters are active
fulleni Sep 25, 2025
8ed93f0
feat(content_management): add no results UI and filter reset function...
fulleni Sep 25, 2025
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
Prev Previous commit
Next Next commit
refactor(content_management): improve FilterDialogBloc usage and init...
...ialization
- Remove BlocProvider from FilterDialog and handle it in the parent widget
- Simplify FilterDialogBloc initialization using context.read
- Update comments to reflect new implementation details
  • Loading branch information
fulleni committed Sep 25, 2025
commit 12961248f4dda1f36d621ceb9a91c7fe0847b883
125 changes: 62 additions & 63 deletions lib/content_management/widgets/filter_dialog/filter_dialog.dart
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,24 @@ class _FilterDialogState extends State<FilterDialog> {
void initState() {
super.initState();
_searchController = TextEditingController();
// Initialize the FilterDialogBloc with current filter states
// Initialize the FilterDialogBloc with current filter states.
// The FilterDialogBloc is now provided by a parent widget, so we can
// safely access it here.
_loadInitialFilterState();
}

/// Loads the initial filter state from the appropriate BLoC and dispatches
/// it to the FilterDialogBloc.
void _loadInitialFilterState() {
// Access the FilterDialogBloc directly from the context, as it's now
// provided higher up in the widget tree.
final filterDialogBloc = context.read<FilterDialogBloc>();

final headlinesState = context.read<HeadlinesFilterBloc>().state;
final topicsState = context.read<TopicsFilterBloc>().state;
final sourcesState = context.read<SourcesFilterBloc>().state;

context.read<FilterDialogBloc>().add(
filterDialogBloc.add(
FilterDialogInitialized(
activeTab: widget.activeTab,
headlinesFilterState: headlinesState,
Expand All @@ -93,71 +99,64 @@ class _FilterDialogState extends State<FilterDialog> {
final l10n = AppLocalizationsX(context).l10n;
final theme = Theme.of(context);

return BlocProvider(
create: (context) => FilterDialogBloc(
sourcesRepository: widget.sourcesRepository,
topicsRepository: widget.topicsRepository,
countriesRepository: widget.countriesRepository,
languagesRepository: widget.languagesRepository,
activeTab: widget.activeTab,
),
child: BlocBuilder<FilterDialogBloc, FilterDialogState>(
builder: (context, filterDialogState) {
_searchController.text = filterDialogState.searchQuery;
return Scaffold(
appBar: AppBar(
title: Text(_getDialogTitle(l10n)),
leading: IconButton(
icon: const Icon(Icons.close),
onPressed: () => Navigator.of(context).pop(),
),
actions: [
IconButton(
icon: const Icon(Icons.check),
tooltip: l10n.applyFilters,
onPressed: () {
_dispatchFilterApplied(filterDialogState);
Navigator.of(context).pop();
},
),
],
// The BlocProvider for FilterDialogBloc is now handled by the parent
// ContentManagementPage, so we can directly use BlocBuilder here.
return BlocBuilder<FilterDialogBloc, FilterDialogState>(
builder: (context, filterDialogState) {
_searchController.text = filterDialogState.searchQuery;
return Scaffold(
appBar: AppBar(
title: Text(_getDialogTitle(l10n)),
leading: IconButton(
icon: const Icon(Icons.close),
onPressed: () => Navigator.of(context).pop(),
),
body: Padding(
padding: const EdgeInsets.all(AppSpacing.lg),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextField(
controller: _searchController,
decoration: InputDecoration(
labelText: l10n.search,
hintText: _getSearchHint(l10n),
prefixIcon: const Icon(Icons.search),
border: const OutlineInputBorder(),
),
onChanged: (query) {
context.read<FilterDialogBloc>().add(
FilterDialogSearchQueryChanged(query),
);
},
),
const SizedBox(height: AppSpacing.lg),
Text(
l10n.status,
style: theme.textTheme.titleMedium,
actions: [
IconButton(
icon: const Icon(Icons.check),
tooltip: l10n.applyFilters,
onPressed: () {
_dispatchFilterApplied(filterDialogState);
Navigator.of(context).pop();
},
),
],
),
body: Padding(
padding: const EdgeInsets.all(AppSpacing.lg),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextField(
controller: _searchController,
decoration: InputDecoration(
labelText: l10n.search,
hintText: _getSearchHint(l10n),
prefixIcon: const Icon(Icons.search),
border: const OutlineInputBorder(),
),
const SizedBox(height: AppSpacing.sm),
_buildStatusFilterChips(l10n, theme, filterDialogState),
const SizedBox(height: AppSpacing.lg),
_buildAdditionalFilters(l10n, filterDialogState),
],
),
onChanged: (query) {
context.read<FilterDialogBloc>().add(
FilterDialogSearchQueryChanged(query),
);
},
),
const SizedBox(height: AppSpacing.lg),
Text(
l10n.status,
style: theme.textTheme.titleMedium,
),
const SizedBox(height: AppSpacing.sm),
_buildStatusFilterChips(l10n, theme, filterDialogState),
const SizedBox(height: AppSpacing.lg),
_buildAdditionalFilters(l10n, filterDialogState),
],
),
),
);
},
),
),
);
},
);
}

Expand Down

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /