Repository navigation
Products overview to standard overview page - #38
Merged
Merged
Conversation
This commit introduces a new widget `ProductsOverviewSync` which is a stateful widget that wraps the `OverviewPage` widget. It initializes `IdSetNotifier` for managing selected IDs and `VisibleColumnsNotifier` for managing visible columns.
This commit introduces the `ProductsOverview` widget, which fetches and displays product data from the `/api/v1/products/overview` endpoint. Key changes: - Created `ProductsOverview` stateful widget to manage product data fetching and display. - Integrated `ProductsOverviewSync` to handle the presentation logic. - Modified `/catalog/product` route to use `ProductsOverview`. - Updated `IdSetNotifier` to allow `allIds` to be mutable. - Adjusted `ProductsOverviewSync` to accept `visibleColumns` as a parameter. - Added error handling for `selectedIds.addId` in `OverviewPageRow`. - Removed mock data generation in `Product` widget, now fetching from API.
…get) and move ProductsOverview widget The `ProductsOverview` widget has been moved from `lib/pages/catalog/product/home/widgets/products_overview.dart` to `lib/pages/catalog/product/home/products_overview.dart`. Additionally, this commit removes a number of unused widgets related to product filtering and display: - `BottomFilterMenu` - `ColumnList` - `DropdownButtonColumns` - `DropdownButtonFilters` - `DropdownButtonIcon` - `FilterList` - `IdFilter` - `PriceFilter` - `Product` - `ProductHomeSynchronous` - `ProductInfoWidget` - `ProductItem` - `ProductList` - `ProductMiddleBar` - `ProductSearch` - `ProductTopBar` - `ProductViewSize` - `RemoveFilterButton` The router configuration in `lib/router/routes/catalog.dart` has been updated to reflect the new location of `ProductsOverview`.
This commit renames the `VisibleColumnsNotifier` class to `ColumnsNotifier` for brevity and clarity. The following files and classes have been updated to reflect this change: - `lib/pages/catalog/product/home/products_overview.dart` - `lib/pages/catalog/product/home/products_overview_sync.dart` - `lib/widgets/overview_page/content/overview_page_content_header.dart` - `lib/widgets/overview_page/content/overview_page_content.dart` - `lib/pages/content/pages/pages_overview.dart` - `lib/widgets/overview_page/visible_columns_selection/visible_columns_selection.dart` - `lib/widgets/overview_page/visible_columns_selection/visible_column_selection.dart` - `lib/widgets/overview_page/overview_page_header.dart` - `lib/widgets/overview_page/overview_page.dart` - `lib/widgets/overview_page/content/row/overview_page_row.dart` The file `lib/widgets/overview_page/visible_columns_selection/visible_columns_notifier.dart` has been renamed to `lib/widgets/overview_page/visible_columns_selection/columns_notifier.dart`.
This commit refactors several widgets to use `ColumnsNotifier` instead of `List<OverviewPageColumnData>` for managing column data. This change allows for better state management and reactivity when columns are updated. Key changes: - Modified `ProductsOverviewSync`, `OverviewPageHeader`, `OverviewPage`, `VisibleColumnsSelection`, and `RetrieveOverviewPagePages` to accept `ColumnsNotifier` for their `columns` parameter. - Updated `PagesOverview` to initialize `visibleColumns` with `ColumnsNotifier(columns: [])` and to pass `ColumnsNotifier` to `OverviewPage` and `getPagesRows`. - Adjusted `getPagesRows` in `PagesOverview` and `getRows` in `ProductsOverview` to accept `ColumnsNotifier` and a new boolean parameter `updateColumns`. This boolean indicates if the column definitions should be fetched/updated. - In `ProductsOverview`, the `getRows` method now fetches column definitions from the `/api/v1/products/overview?columns=1` endpoint when `updateColumns` is true and populates the `columns.value`. The product data is now extracted from the `products` key in the JSON response. - `ColumnsNotifier` constructor parameter renamed from `visibleColumns` to `columns` for clarity.
…Info` This commit updates the `ProductInfo` widget to accept `productId` as a `String` instead of an `int?`. This change aligns with the product ID format used in the API and simplifies the routing logic. Key changes: - Modified `ProductInfo` widget to require a non-nullable `String` for `productId`. - Updated `getJsonProductData` method in `_ProductInfoState` to accept `String` for `productId`. - Removed unnecessary type parsing for `productId` in the `/catalog/product/:selectedProduct` route in `lib/router/routes/catalog.dart`. The `productId` is now directly passed as a string from `state.pathParameters`.
This commit updates the `ProductsOverview` widget to navigate to the product details page when a row is clicked.
The `onSelect` callback in `OverviewPageRow` is now used to trigger navigation using `context.push('/catalog/product/$id')`.
This commit introduces a `getFilters` method to the `ProductsOverview` widget. This asynchronous method is intended to fetch filter configurations from the backend. Additionally, the `ProductsOverviewSync` widget has been updated to accept a `getFilters` parameter, which will be passed down from `ProductsOverview`. Currently, `getFilters` in `ProductsOverview` returns an empty list as a placeholder.
Moltensnor
self-requested a review
September 26, 2025 10:12
Moltensnor
approved these changes
Sep 26, 2025
Moltensnor
left a comment
Contributor
There was a problem hiding this comment.
This all looks good to me. Awaiting the PR on the engine before merging this one
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a basic implementation of the products overview page.
Depends on: