inclusive terms
Signed-off-by: aaronbraundmeier@gmail.com <aaronbraundmeier@gmail.com> Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
committed by
Fredrik Adelöw
parent
30f860ce6e
commit
8015ff1258
@@ -912,7 +912,7 @@
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 5aa4ceea6: Make sure to provide dummy routes for all external routes of plugins given to DevApp
|
||||
- 5aa4ceea6: Make sure to provide sample routes for all external routes of plugins given to DevApp
|
||||
- Updated dependencies [3a58084b6]
|
||||
- Updated dependencies [e799e74d4]
|
||||
- Updated dependencies [dc12852c9]
|
||||
|
||||
@@ -165,9 +165,9 @@ export class DevAppBuilder {
|
||||
* Build a DevApp component using the resources registered so far
|
||||
*/
|
||||
build(): ComponentType<{}> {
|
||||
const dummyRouteRef = createRouteRef({ id: 'dummy' });
|
||||
const DummyPage = () => <Box p={3}>Page belonging to another plugin.</Box>;
|
||||
attachComponentData(DummyPage, 'core.mountPoint', dummyRouteRef);
|
||||
const fakeRouteRef = createRouteRef({ id: 'fake' });
|
||||
const FakePage = () => <Box p={3}>Page belonging to another plugin.</Box>;
|
||||
attachComponentData(FakePage, 'core.mountPoint', fakeRouteRef);
|
||||
|
||||
const apis = [...this.apis];
|
||||
if (!apis.some(api => api.api.id === scmIntegrationsApiRef.id)) {
|
||||
@@ -188,7 +188,7 @@ export class DevAppBuilder {
|
||||
for (const plugin of this.plugins ?? []) {
|
||||
const targets: Record<string, RouteRef<any>> = {};
|
||||
for (const routeKey of Object.keys(plugin.externalRoutes)) {
|
||||
targets[routeKey] = dummyRouteRef;
|
||||
targets[routeKey] = fakeRouteRef;
|
||||
}
|
||||
bind(plugin.externalRoutes, targets);
|
||||
}
|
||||
@@ -215,7 +215,7 @@ export class DevAppBuilder {
|
||||
</Sidebar>
|
||||
<FlatRoutes>
|
||||
{this.routes}
|
||||
<Route path="/_external_route" element={<DummyPage />} />
|
||||
<Route path="/_external_route" element={<FakePage />} />
|
||||
</FlatRoutes>
|
||||
</SidebarPage>
|
||||
</AppRouter>
|
||||
|
||||
Reference in New Issue
Block a user