Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 29, 2025

When deleting the last collection in Content-Type Builder, the deleted collection name persisted in the UI instead of showing the empty state.

Changes

  • Added NGRX effect clearInvalidSelectedType$ in collection.effects.ts to clear selectedType when collection types reload and the current selection is invalid
  • Fixed Angular 20 compatibility in app.config.server.ts by removing deprecated provideServerRouting

The effect reacts to loadCollectionTypesSuccess and dispatches setContentType({ selectedType: '' }) when the current selection no longer exists:

clearInvalidSelectedType$ = createEffect(() =>
  this.actions$.pipe(
    ofType(CollectionActions.loadCollectionTypesSuccess),
    withLatestFrom(this.store.pipe(select(selectSelectedType))),
    filter(
      ([action, selectedType]) =>
        selectedType !== null &&
        selectedType !== '' &&
        !action.collectionTypes.includes(selectedType)
    ),
    map(() => ContentActions.setContentType({ selectedType: '' }))
  )
);

The UI already handles empty selectedType by displaying the empty state - no component changes needed.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/dappi/dappi/CCUI.DAPPI/node_modules/.bin/ng build (dns block)
  • www.google-analytics.com
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/dappi/dappi/CCUI.DAPPI/node_modules/.bin/ng build (dns block)
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/dappi/dappi/CCUI.DAPPI/node_modules/.bin/ng build --configuration development (dns block)
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/dappi/dappi/CCUI.DAPPI/node_modules/.bin/ng build --configuration development ig.server.ts (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Show empty state in Content-Type Builder when no Collection is selected</issue_title>
<issue_description>Currently when you delete the last collection in the Content-Type Builder the name of the last collection is shown in the main view when there is no one. This is likely an NGRX issue that needs to be fixed in the reducer.</issue_description>

<agent_instructions>Make this as simply as possible and use conventions from the project. This should be changed in CCUI.DAPPI angular project. No changes in the backend should be requiired</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@fvanderflier
Copy link
Collaborator

@copilot

Copilot AI and others added 2 commits December 29, 2025 16:23
Co-authored-by: fvanderflier <177029273+fvanderflier@users.noreply.github.com>
Co-authored-by: fvanderflier <177029273+fvanderflier@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix empty state display in Content-Type Builder Clear selected collection type when deleted from Content-Type Builder Dec 29, 2025
Copilot AI requested a review from fvanderflier December 29, 2025 16:27
@fvanderflier fvanderflier changed the title Clear selected collection type when deleted from Content-Type Builder fix: Clear selected collection type when deleted from Content-Type Builder Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show empty state in Content-Type Builder when no Collection is selected

2 participants