NonConfiguredComponent
Finsemble expects to find configuration for every app a user wants to open. However, sometimes that configuration is missing. If this is the case, we provide a special built-in component called `NonConfiguredComponent`. Finsemble displays this component when it can't find the configuration for an app that a user is trying to open, or if it expects an app service that didn't launch.For example, the NonConfiguredComponent
appears if an app that was previously available now is no longer in the workspace, or if the app is still in the workspace but the user no longer has access to it. Another possibility is a mistake or typo, such as if custom code on the smart desktop mistakenly tries to launch the "Yield Curve X" app instead of the correct "Yield Curve Y" app.
Customizing the non-configured component
The built-in non-configured component that Finsemble provides is generic and therefore it might not be very helpful to your users. To provide better help for your users, you need to customize it to provide a useful, actionable message. Because this component is a React page, you can design it to show a personalized message to your users, informing them that the requested app could not be found. This usage is similar to the custom HTTP 404 pages on the web.
As you create the content for your non-configured component, keep in mind that there is only one such component. As a result, the user will see the same message no matter which app or app service is missing. Therefore, make sure your component displays a message that is applicable in all cases.
The one exception is that you can display the component type or appID
of the missing app. See the next section for details.
There are 2 ways to customize a non-configured component. One way is to run yarn template NonConfiguredComponent
.
This creates 2 files:
- a new component in your project under src/NonConfiguredComponent;
- a nonConfiguredComponent.css.
You can then add whatever content and style you want.
Alternatively, you can configure Finsemble to launch a different component or app in place of the NonConfiguredComponent
. To do this, you set config finsemble.servicesConfig.launcher.unknownComponent to the type name or appId
of the component or app that you want to launch.
Retrieving info about the missing app
It might be helpful to display the appId
or the component type of the app that was not found in the user config. You might also want to populate a log message or query to a support team to help them resolve the issue. You can retrieve this info from the Finsemble WindowClient
by adding this code to the NonConfiguredComponent
:
const appType = (window as any).FSBL.Clients.WindowClient.options.customData?.component?.type ?? "Unknown app";