-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor add content lifecyle management for the content management feature #18
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 40 commits into
main
from
refactor_add_content_lifecyle_management_for_the_content_management_feature
Jul 3, 2025
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
901627f
chore(dependencies): update go_router to version 16.0.0 and device_fr…
fulleni b3f2118
feat(bloc-observer): add print statements for onChange and onError lo…
fulleni 3fd6859
refactor: This first step isolates the change to the CreateCategorySt…
fulleni c0d4824
refactor: This step introduces the CreateCategoryStatusChanged event,…
fulleni be16c56
refactor: updates the CreateCategoryBloc to handle the new CreateCate…
fulleni 1ea810d
feat: adds the DropdownButtonFormField to the CreateCategoryPage UI. …
fulleni 173670f
refactor: updates the EditCategoryState to manage the ContentStatus o…
fulleni 4d158ab
feat: introduces the EditCategoryStatusChanged event. This is necessa…
fulleni f8b07a6
feat: updates the EditCategoryBloc to fully manage the ContentStatus.…
fulleni 8404bb8
feat: adds the DropdownButtonFormField to the EditCategoryPage UI. Th…
fulleni 0f0a79c
refactor: updates the CategoriesPage data table to display the most r…
fulleni e451e73
feat: modifies the existing CreateSourceState to include the contentS…
fulleni b6d327a
feature: adds the CreateSourceStatusChanged event to the create_sourc…
fulleni a080a68
feat: updates the CreateSourceBloc to handle the new CreateSourceStat…
fulleni 6ef5246
feat: adds the DropdownButtonFormField to the CreateSourcePage UI, a…
fulleni 6816216
feat: modifies the EditSourceState to include the contentStatus field…
fulleni 325b519
feat: adds the EditSourceStatusChanged event to the edit_source_event…
fulleni 2da7da7
feat: updates the EditSourceBloc to fully manage the ContentStatus. T…
fulleni 2384e50
feat: updates the EditSourceBloc to fully manage the ContentStatus. T…
fulleni 74afe79
feat: updates the SourcesPage data table to display the most relevant…
fulleni 6d9740c
feat: modifies the CreateHeadlineState to include the contentStatus f…
fulleni f78983e
feat: adds the CreateHeadlineStatusChanged event to the create_headli…
fulleni 57ede75
feat: updates the CreateHeadlineBloc to handle the new CreateHeadline…
fulleni 3d4016e
feat: adds the DropdownButtonFormField for ContentStatus to the Creat…
fulleni 75bb6de
feat: modifies the EditHeadlineState to include the contentStatus fie…
fulleni de0bbba
feat: introduces the EditHeadlineStatusChanged event, which is necess…
fulleni 73e116f
feat: updates the EditHeadlineBloc to fully manage the ContentStatus.…
fulleni 52be023
feat: adds the DropdownButtonFormField for ContentStatus to the Edit…
fulleni 834b2ac
feat: adds the DropdownButtonFormField for ContentStatus to the Edit…
fulleni ae5554a
feat: creates a new extension on the ContentStatus enum. This extensi…
fulleni 6edae50
feat: adds the required keys and their translations to the English an…
fulleni f29fae5
refactor: updates the ContentStatusL10n extension to use the actual l…
fulleni ce656a5
feat: integrates the localization extension into the CreateCategoryPa…
fulleni ef53b5e
refactor: integrates the localization extension into the EditCategory…
fulleni 7f7a37a
feat: integrates the localization extension into the CreateSourcePage…
fulleni 50a0fe3
refactor: integrates the localization extension into the EditSourcePa…
fulleni c84fb40
refactor: integrates the localization extension into the SourcesPage …
fulleni b8b00e5
refactor: integrates the localization extension into the CreateHeadli…
fulleni 7532207
refactor: integrates the localization extension into the EditHeadlin…
fulleni ae7d7ba
refactor: integrates the localization extension into the HeadlinesPag…
fulleni 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 hidden or 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 |
---|---|---|
|
@@ -9,11 +9,13 @@ class AppBlocObserver extends BlocObserver { | |
void onChange(BlocBase<dynamic> bloc, Change<dynamic> change) { | ||
super.onChange(bloc, change); | ||
log('onChange(${bloc.runtimeType}, $change)'); | ||
print('onChange(${bloc.runtimeType}, $change)'); | ||
} | ||
|
||
@override | ||
void onError(BlocBase<dynamic> bloc, Object error, StackTrace stackTrace) { | ||
log('onError(${bloc.runtimeType}, $error, $stackTrace)'); | ||
print('onError(${bloc.runtimeType}, $error, $stackTrace)'); | ||
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. |
||
super.onError(bloc, error, stackTrace); | ||
} | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
37 changes: 23 additions & 14 deletions
37
lib/content_management/bloc/create_headline/create_headline_event.dart
This file contains hidden or 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 |
---|---|---|
@@ -1,68 +1,77 @@ | ||
part of 'create_headline_bloc.dart'; | ||
|
||
/// Base class for all events related to the [CreateHeadlineBloc]. | ||
abstract class CreateHeadlineEvent extends Equatable { | ||
sealed class CreateHeadlineEvent extends Equatable { | ||
const CreateHeadlineEvent(); | ||
|
||
@override | ||
List<Object?> get props => []; | ||
} | ||
|
||
/// Event to signal that the data for dropdowns should be loaded. | ||
class CreateHeadlineDataLoaded extends CreateHeadlineEvent { | ||
final class CreateHeadlineDataLoaded extends CreateHeadlineEvent { | ||
const CreateHeadlineDataLoaded(); | ||
} | ||
|
||
/// Event for when the headline's title is changed. | ||
class CreateHeadlineTitleChanged extends CreateHeadlineEvent { | ||
final class CreateHeadlineTitleChanged extends CreateHeadlineEvent { | ||
const CreateHeadlineTitleChanged(this.title); | ||
final String title; | ||
@override | ||
List<Object> get props => [title]; | ||
List<Object?> get props => [title]; | ||
} | ||
|
||
/// Event for when the headline's description is changed. | ||
class CreateHeadlineDescriptionChanged extends CreateHeadlineEvent { | ||
final class CreateHeadlineDescriptionChanged extends CreateHeadlineEvent { | ||
const CreateHeadlineDescriptionChanged(this.description); | ||
final String description; | ||
@override | ||
List<Object> get props => [description]; | ||
List<Object?> get props => [description]; | ||
} | ||
|
||
/// Event for when the headline's URL is changed. | ||
class CreateHeadlineUrlChanged extends CreateHeadlineEvent { | ||
final class CreateHeadlineUrlChanged extends CreateHeadlineEvent { | ||
const CreateHeadlineUrlChanged(this.url); | ||
final String url; | ||
@override | ||
List<Object> get props => [url]; | ||
List<Object?> get props => [url]; | ||
} | ||
|
||
/// Event for when the headline's image URL is changed. | ||
class CreateHeadlineImageUrlChanged extends CreateHeadlineEvent { | ||
final class CreateHeadlineImageUrlChanged extends CreateHeadlineEvent { | ||
const CreateHeadlineImageUrlChanged(this.imageUrl); | ||
final String imageUrl; | ||
@override | ||
List<Object> get props => [imageUrl]; | ||
List<Object?> get props => [imageUrl]; | ||
} | ||
|
||
/// Event for when the headline's source is changed. | ||
class CreateHeadlineSourceChanged extends CreateHeadlineEvent { | ||
final class CreateHeadlineSourceChanged extends CreateHeadlineEvent { | ||
const CreateHeadlineSourceChanged(this.source); | ||
final Source? source; | ||
@override | ||
List<Object?> get props => [source]; | ||
} | ||
|
||
/// Event for when the headline's category is changed. | ||
class CreateHeadlineCategoryChanged extends CreateHeadlineEvent { | ||
final class CreateHeadlineCategoryChanged extends CreateHeadlineEvent { | ||
const CreateHeadlineCategoryChanged(this.category); | ||
final Category? category; | ||
@override | ||
List<Object?> get props => [category]; | ||
} | ||
|
||
/// Event for when the headline's status is changed. | ||
final class CreateHeadlineStatusChanged extends CreateHeadlineEvent { | ||
const CreateHeadlineStatusChanged(this.status); | ||
|
||
final ContentStatus status; | ||
|
||
@override | ||
List<Object?> get props => [status]; | ||
} | ||
|
||
/// Event to signal that the form should be submitted. | ||
class CreateHeadlineSubmitted extends CreateHeadlineEvent { | ||
final class CreateHeadlineSubmitted extends CreateHeadlineEvent { | ||
const CreateHeadlineSubmitted(); | ||
} | ||
|
This file contains hidden or 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 hidden or 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
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.
Remove this
print()
statement to avoid cluttering production logs. Thelog()
call on the previous line is sufficient.