[IMPROVEMENTS] 1.5-product-catalog improvements#586
Open
juliandevelops wants to merge 150 commits into
Open
Conversation
very basic cart view with heading and subheading
…ng-cart feat(shopping cart): add shopping cart to menu bar
…catalog-constant-login-state
Update project management files and structure
actions supported: remove, update, clear, getItemCount, getTotalPrice, isInCart Note: contains TODO part of #16
Product view is an central element for shop functionality -> shall be enabled.
footer contains sum and checkout button Note: checkout button without function
if function not available, button is disabled, reason is logged
- login button currently commented out
Added details about AAS list improvements, repository settings enhancements, product view updates, and further improvements. Signed-off-by: Nils Schäffner <nilsnils1212@gmail.com>
Signed-off-by: Nils Schäffner <nilsnils1212@gmail.com>
Signed-off-by: Nils Schäffner <nilsnils1212@gmail.com>
Signed-off-by: Nils Schäffner <nilsnils1212@gmail.com>
…0-product-catalog
handover document , improved readability with inconsistent data
Signed-off-by: Nils Schäffner <nilsnils1212@gmail.com>
Signed-off-by: Gregor Gottschewski <contact@gregors-computer-lab.com>
Signed-off-by: Felix Hennerich <fehennerich@outlook.de>
Updated user instructions and images in the manual. Signed-off-by: Felix Hennerich <fehennerich@outlook.de>
Updated team section to include roles, emails, and GitHub usernames. Signed-off-by: Felix Hennerich <fehennerich@outlook.de>
Signed-off-by: Felix Hennerich <fehennerich@outlook.de>
Update entity tree model as specified by product owner
Signed-off-by: Felix Hennerich <fehennerich@outlook.de>
Signed-off-by: Nils Schäffner <nilsnils1212@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR extends Mnestix Browser with e-shop/cart functionality, improves list browsing (sorting/filtering/pagination behavior), adds repository configuration enhancements (active toggle + preview), refactors parts of the technical data UI, and refreshes documentation and i18n strings.
Changes:
- Added shopping cart feature (context, UI components, menu entry with badge, cart page, translations, feature flag).
- Enhanced AAS listing and repository configuration UX (sorting in URL, assetKind filter, active repositories, repository preview + item counting, timeouts).
- Updated technical data/submodel rendering and expanded documentation/wiki pages.
Reviewed changes
Copilot reviewed 76 out of 90 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| wiki/Use-Mnestix.md | Adds structured headings and related documentation links. |
| wiki/Secret-Environment-Variables.md | Expands page structure and adds related docs links. |
| wiki/Role-Based-Access-Control.md | Reworks headings/structure and adds related docs links. |
| wiki/Mnestix-API-Documentation.md | Restructures sections and adds related docs links. |
| wiki/Mnestix-API-Data-Ingest.md | Improves structure and adds related docs links. |
| wiki/Maintaining.md | Adds headings/sections and related docs links. |
| wiki/Keycloak-Configuration.md | Restructures page and adds related docs links. |
| wiki/How-to-Create-Custom-Submodel-Visualizations.md | Adds prerequisites/steps and related docs links. |
| wiki/Home.md | Adds “Next Steps” section and fixes configuration link casing. |
| wiki/Getting-Started-with-Developing.md | Restructures development guide and adds related docs links. |
| wiki/Contributing.md | Expands contributing guide and adds related docs links. |
| wiki/Adding-Languages.md | Updates headings and formatting; adds related docs section. |
| tsconfig.json | Adds ignoreDeprecations option with explanatory comment. |
| src/locale/es.json | Adds cart + technical data/search strings and new component strings. |
| src/locale/en.json | Adds cart + technical data/search strings and new component strings. |
| src/locale/de.json | Adds cart + technical data/search strings and new component strings. |
| src/lib/util/timeoutWrapper.ts | Introduces promise timeout helpers and API timeout wrapper. |
| src/lib/types/CartItem.ts | Adds CartItem type. |
| src/lib/services/list-service/ListService.ts | Adds assetKind to list DTO and maps AAS assetKind to local enum. |
| src/lib/services/database/PrismaConnector.ts | Persists active flag and filters repository groups by active. |
| src/lib/env/MnestixEnv.ts | Adds CART_ENABLED_FEATURE_FLAG to env mapping. |
| src/lib/api/graphql/catalogActions.ts | Adds timeout handling and improves error wrapping/logging. |
| src/layout/menu/MenuListItem.tsx | Adds optional badge support for menu icons. |
| src/layout/menu/MainMenu.tsx | Adds cart menu entry + badge; removes BottomMenu usage. |
| src/layout/LoginButton.tsx | New login/logout button component for header. |
| src/layout/LanguageSelector.tsx | Adjusts spacing/margins for header layout. |
| src/layout/Header.tsx | Moves login button into header for mobile/desktop. |
| src/components/contexts/CartContext.tsx | Adds cart context with localStorage persistence. |
| src/components/cart/EmptyCartMessage.tsx | Adds empty-cart UI component. |
| src/components/cart/CartSummary.tsx | Adds cart total + checkout placeholder UI. |
| src/components/cart/CartItemRow.tsx | Adds responsive cart row/card with quantity controls. |
| src/components/cart/CartItemList.tsx | Adds responsive cart list/table. |
| src/components/cart/AddToCartDialog.tsx | Adds add-to-cart confirmation dialog. |
| src/components/cart/AddToCartButton.tsx | Adds add-to-cart button with disabled reasons + tooltip/dialog. |
| src/components/basics/listBasics/GenericAasList.tsx | Adds client-side sorting + virtualization for generic AAS list. |
| src/components/basics/StyledImageWithFallBack.tsx | Enables lazy-loading/async decoding for images. |
| src/components/basics/DataRow.tsx | Fixes quote style for test id attribute. |
| src/app/[locale]/viewer/_components/submodel/technical-data/test-submodel/technical-data-test.json | Adds nested technical data test fixture. |
| src/app/[locale]/viewer/_components/submodel/technical-data/TechnicalDataTreeItemUtil.ts | Adds util to collect expandable tree item IDs. |
| src/app/[locale]/viewer/_components/submodel/technical-data/TechnicalDataTreeItemUtil.test.ts | Adds unit tests for tree item ID collection util. |
| src/app/[locale]/viewer/_components/submodel/technical-data/TechnicalDataElement.tsx | Refactors technical data element rendering away from TreeView. |
| src/app/[locale]/viewer/_components/submodel/technical-data/TechnicalDataDetail.tsx | Refactors technical data detail into accordions + expand/collapse. |
| src/app/[locale]/viewer/_components/submodel/technical-data/TechnicalDataDetail.spec.tsx | Adds tests for expand/collapse/search behavior. |
| src/app/[locale]/viewer/_components/submodel/technical-data/ConceptDescriptionDataRow.tsx | Adjusts layout to grid and improves overflow handling. |
| src/app/[locale]/viewer/_components/submodel/generic-submodel/GenericSubmodelDetailComponent.tsx | Adds grouping of submodel elements by modelType for readability. |
| src/app/[locale]/viewer/_components/submodel-elements/generic-elements/entity-components/EntityTreeItem.tsx | Makes entity row click navigate (when applicable) and improves hover UI. |
| src/app/[locale]/viewer/_components/submodel-elements/generic-elements/SubmodelElementCollectionComponent.tsx | Replaces expand/collapse button with grid layout rendering. |
| src/app/[locale]/viewer/_components/submodel-elements/generic-elements/FileComponent.tsx | Adjusts file preview image sizing and styling. |
| src/app/[locale]/viewer/_components/submodel-elements/document-component/useDocumentVersionData.tsx | Avoids overriding title with empty/whitespace translation. |
| src/app/[locale]/viewer/_components/submodel-elements/document-component/DocumentComponent.tsx | Disables “open” when file URL missing and adds fallback title. |
| src/app/[locale]/viewer/_components/submodel-elements/document-component/DocumentComponent.spec.tsx | Adds tests for missing/existing digital file URL behavior. |
| src/app/[locale]/viewer/_components/submodel-elements/document-component/DocumentClassification.tsx | Makes input optional, fixes iteration, and improves keys/formatting. |
| src/app/[locale]/viewer/_components/SubmodelsOverviewCard.tsx | Adds submodel search, loading/error states, and layout refinements. |
| src/app/[locale]/settings/_components/mnestix-connections/MnestixConnectionsCard.tsx | Adds active to form mapping and removes debug logging. |
| src/app/[locale]/settings/_components/mnestix-connections/MnestixConnectionGroupForm.tsx | Adds active switch, preview dialog, item counting with timeouts. |
| src/app/[locale]/settings/_components/mnestix-connections/MnestixConnectionForm.tsx | Ensures new repositories default to active: true. |
| src/app/[locale]/product/_components/ProductOverviewCard.tsx | Passes product/cart metadata into CommercialDataBox. |
| src/app/[locale]/product/_components/CommercialDataBox.tsx | Adds AddToCartButton and parses price/currency for cart usage. |
| src/app/[locale]/product/[base64AasId]/page.tsx | Removes trailing whitespace line. |
| src/app/[locale]/marketplace/catalog/page.tsx | Makes AAS searcher loading non-blocking; adds active in fallback. |
| src/app/[locale]/marketplace/_components/manufacturerCard.tsx | Improves resultCount handling for errors and missing searcher. |
| src/app/[locale]/list/_components/filter/SelectAssetKind.tsx | Adds multi-select assetKind filter UI. |
| src/app/[locale]/list/_components/AasListTableRow.tsx | Simplifies navigation helper and local table row entry type. |
| src/app/[locale]/list/_components/AasListSorting.ts | Adds shared sorting utility for enriched AAS list. |
| src/app/[locale]/list/_components/AasListSorting.spec.ts | Adds unit tests for sorting utility. |
| src/app/[locale]/list/_components/AasListDataWrapper.tsx | Adds caching, client pagination, assetKind filtering, URL sort params, timeouts. |
| src/app/[locale]/list/_components/AasList.tsx | Uses shared sorting util; stabilizes SWR key; supports URL sort param sync. |
| src/app/[locale]/list/_components/AasList.spec.tsx | Adds sorting interaction test and mocks nameplate data. |
| src/app/[locale]/clientLayout.tsx | Adds CartContextProvider wrapper. |
| src/app/[locale]/cart/page.tsx | Adds cart page route and renders cart UI. |
| src/app/EnvProvider.tsx | Adds default env value for cart feature flag. |
| prisma/schema.prisma | Adds active boolean field to MnestixConnection model. |
| prisma/migrations/20260126193811_add_repository_active_switch/migration.sql | Adds migration for active column. |
| compose.yml | Adds GLIBC_TUNABLES for mongodb container. |
| README.md | Major rewrite describing “Browser Extension” + new feature overview sections. |
| CONTRIBUTING.md | Adds conventions for commits/issues/PRs and labeling guidance. |
| .gitignore | Normalizes cypress-artifacts entry and ignores .idea. |
| .env.local | Enables product view/cart flag and switches to remote dev endpoints. |
Comments suppressed due to low confidence (9)
src/lib/util/timeoutWrapper.ts:1
- The timeout created via
setTimeoutis never cleared. Ifpromiseresolves first, the timeout will still fire later and reject its promise, which can cause unhandled rejections and leaks timers. Track the timeout id, clear it when the main promise settles, and ensure the timeout promise rejection is always observed/cleared.
src/components/contexts/CartContext.tsx:1 JSON.parse(storedCart)can throw (e.g., if localStorage was manually edited or corrupted), which would break rendering for the whole app (provider init). Wrap the parse in try/catch and fallback to an empty cart (optionally clear the invalid key).
src/components/cart/AddToCartButton.tsx:1- MUI tooltips don't trigger on disabled buttons because disabled elements don't emit pointer events. To ensure the
disabledReasontooltip is actually accessible, wrap the button in a non-disabled element (e.g., a span) inside the Tooltip and keep the button disabled.
src/components/cart/AddToCartButton.tsx:1 - The aria-label is hard-coded in English and duplicates text that already exists in i18n (
addToCartButton.ariaLabel). Use the localized string (including{productName}) so screen readers get correct language output.
src/app/[locale]/viewer/_components/submodel/technical-data/TechnicalDataDetail.tsx:1 - This logic assumes
modelTypeis a string equal to'SubmodelElementCollection', but in@aas-core-works/aas-core3.0-typescriptmodel types are typically structured objects (and you already havegetKeyType/KeyTypesutilities elsewhere). This will fail to collect nested collections in real typed data. Prefer reusinggetKeyType(or the newly addedcollectAllTreeItemIds) to robustly detect collections/lists.
src/app/[locale]/viewer/_components/submodel/technical-data/TechnicalDataDetail.spec.tsx:1 - These assertions reference test IDs (
expanded-*) that are not present in the updatedTechnicalDataDetailimplementation, so the test will fail. Update the test to assert against the accordion state (e.g.,aria-expandedon the relevantAccordionSummary), or use the existingdata-expanded-items/a similar data attribute to validate expand/collapse behavior.
src/app/[locale]/settings/_components/mnestix-connections/MnestixConnectionGroupForm.tsx:1 - This effect only reruns when
fields.lengthchanges. If a repository URL is edited in-place (same number of fields), the item count will not refresh and may show a stale count for the new URL. Include the relevant per-field URL values in the dependency (or usewatchfrom react-hook-form) and resetrepositoryItemCounts[index]when the URL changes.
src/lib/api/graphql/catalogActions.ts:1 - Logging full GraphQL queries in production can leak sensitive filter criteria and creates noisy logs. Consider removing this log or gating it behind a debug flag (e.g., env-based) and using a structured logger if available.
wiki/Adding-Languages.md:1 - The markdown table for the Spanish translation guidelines is broken: several table rows were appended after the 'Related Documentation' links, producing malformed markdown. Move those Spanish guideline rows back into the Spanish translations table, and keep 'Related Documentation' as a separate list section.
|
|
||
| const SEARCH_PARAM_SORT_BY_NAME: string = 'sortby'; | ||
| const SEARCH_PARAM_ORDER_NAME: string = 'order'; | ||
| const FETCH_LIMIT = 100; // Bulk fetch for caching |
Comment on lines
+129
to
+133
| const response = await withTimeout( | ||
| getAasListEntities(selectedRepository!, FETCH_LIMIT), | ||
| 15000, | ||
| 'Repository request timed out after 15 seconds', | ||
| ); |
| const [limit, setLimit] = useState(10); | ||
|
|
||
| // Asset Kind Filter | ||
| const [selectedAssetKinds, setSelectedAssetKinds] = useState<AssetKind[]>(['Type']); // Default to Type only |
Comment on lines
+14
to
+20
| AAS_REPO_API_URL= "https://api.dpp.robotik-challenge-2026.dev.mnestix.xitaso.net/repo" | ||
| SUBMODEL_REPO_API_URL= "https://api.dpp.robotik-challenge-2026.dev.mnestix.xitaso.net/repo" | ||
| CONCEPT_DESCRIPTION_REPO_API_URL= "https://api.dpp.robotik-challenge-2026.dev.mnestix.xitaso.net/repo" | ||
| MNESTIX_BACKEND_API_URL= "https://api.dpp.robotik-challenge-2026.dev.mnestix.xitaso.net" | ||
| DISCOVERY_API_URL= "https://api.dpp.robotik-challenge-2026.dev.mnestix.xitaso.net/discovery" | ||
| REGISTRY_API_URL= "https://api.dpp.robotik-challenge-2026.dev.mnestix.xitaso.net" | ||
| SUBMODEL_REGISTRY_API_URL= "https://api.dpp.robotik-challenge-2026.dev.mnestix.xitaso.net" |
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.
Description
This issue is part of a project in the context of a software engineering course at DHBW by Mister Rentschler.
This is related to the following issues:
Fixes #566
Fixes #567
Fixes #568
Fixes #569
Fixes #570
Fixes #571
Fixes #572
Fixes #573
Fixes #574
Fixes #575
Fixes #576
Fixes #577
Fixes #579
Fixes #580
This PR replaces #584 and #585 as it only contains the relevant files and does not include the files only relevant for the course at DHBW.
Type of change
Please delete options that are not relevant.
Checklist:
@mrentsch65