Skip to content
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

feat: app list from new app service #838

Merged
merged 12 commits into from
Oct 29, 2024
Merged

Conversation

Noggling
Copy link
Contributor

@Noggling Noggling commented Oct 28, 2024

Description

  • PR title and description are to the point and understandable
  • I have performed a self-review of my own code'

Please select version type the purposed change:

  • major
  • minor
  • patch
  • none

External Relations

  • database migration

Changeset

  • Menu is filtered with portal configuration form new endpoint
  • New portal class enabling hot-swapping of portal for development.
  • New portal app module for listing apps in portal landeplages.
  • Refactor of portal configuration.

This commit refactors the PortalConfig types in the 'portal-config/types/index.ts' file. It updates the 'Portal' type to 'PortalConfig' and renames the 'client' property to 'IPortalClient'. Additionally, it adds the 'IPortalClient' interface import from the 'portal-client' module.
- The appsToAppCategory function in the portal-config/utils/appsToAppCategory.ts file has been updated to handle the case when the apps array is empty. Previously, it would throw an error if the apps array was not provided. Now, it returns an empty array when no apps are passed as an argument.

refactor: Update getColumnCount function to import filter from rxjs

- The getColumnCount function in the portal-config/utils/utils.ts file has been updated to import the filter operator from the rxjs library. This operator is used in the function to filter out null and undefined values.

feat: Update createPortalFramework function to use current.portalConfig$

- The createPortalFramework function in the portal-client/src/lib/portal-framework-config.tsx file has been updated to use the current.portalConfig$ observable instead of the portalConfig.portal$ observable. This change ensures that the document title is updated with the correct portal name when the portal configuration changes.

feat: Add fetchApps action to fetch all apps

- The fetchApps action has been added to the portal-config/state/actions.ts file. This action is used to fetch all apps from the server. It takes an optional update parameter to indicate whether the fetched apps should replace the existing apps in the state.

chore: Update createState function to include handleFetchApps flow

- The createState function in the portal-config/state/create-state.ts file has been updated to include the handleFetchApps flow. This flow is responsible for fetching all apps and updating the state accordingly.

refactor: Update createReducer function to use PortalConfig type

- The createReducer function in the portal-config/state/create-reducer.ts file has been updated to use the PortalConfig type instead of the Portal type. This change ensures that the reducer correctly handles the portal configuration.

feat: Add usePortal hook to retrieve portal configuration

- The usePortal hook has been added to the portal-config/hooks/use-portal-config.ts file. This hook is used to retrieve the portal configuration from the framework's modules.

feat: Add usePortalAppsConfig hook to retrieve portal apps configuration

- The usePortalAppsConfig hook has been added to the portal-config/hooks/use-portal-config.ts file. This hook is used to retrieve the portal apps configuration from the framework's modules.

feat: Add usePortalRouter hook to retrieve portal router configuration

- The usePortalRouter hook has been added to the portal-config/hooks/use-portal-config.ts file. This hook is used to retrieve the portal router configuration from the framework's modules.
Copy link

changeset-bot bot commented Oct 28, 2024

🦋 Changeset detected

Latest commit: fe5e770

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
fusion-project-portal Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added frontend Frontend specific size-xl labels Oct 28, 2024
@Noggling Noggling self-assigned this Oct 28, 2024
@Noggling Noggling linked an issue Oct 28, 2024 that may be closed by this pull request
@Noggling Noggling marked this pull request as ready for review October 28, 2024 13:07
@Noggling Noggling requested a review from a team as a code owner October 28, 2024 13:07
Noggling and others added 5 commits October 28, 2024 13:07
…eval

The usePortalApps hook in the portal-apps module has been updated to handle the retrieval of apps based on the current context. Previously, it only retrieved all apps, but now it checks if the portal is a context portal and subscribes to changes in the current context. If it is a context portal, it retrieves the app keys specific to that context. This change improves the functionality and flexibility of the hook.
@Noggling Noggling merged commit 7c7715e into main Oct 29, 2024
7 checks passed
@Noggling Noggling deleted the feat/app-list-from-new-app-service branch October 29, 2024 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Frontend specific size-xl
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use new endpoints for apps by portal id and context id
2 participants