Skip to content

Commit

Permalink
Small name refactoring and improvement to dev
Browse files Browse the repository at this point in the history
Signed-off-by: Karan Shah <karan.shah@simplybusiness.co.uk>
  • Loading branch information
moltenice committed Dec 29, 2021
1 parent 4ec1d27 commit b44a324
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions plugins/airbrake/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
import { BackstagePlugin } from '@backstage/core-plugin-api';
import { RouteRef } from '@backstage/core-plugin-api';

// Warning: (ae-missing-release-tag) "AirbrakePage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
// Warning: (ae-missing-release-tag) "AirbrakeWidget" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const AirbrakePage: () => JSX.Element;
export const AirbrakeWidget: () => JSX.Element;

// Warning: (ae-missing-release-tag) "airbrakePlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
Expand Down
9 changes: 6 additions & 3 deletions plugins/airbrake/dev/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
import React from 'react';
import { createDevApp } from '@backstage/dev-utils';
import { AirbrakePage, airbrakePlugin } from '../src/plugin';
import { AirbrakeWidget, airbrakePlugin } from '../src/plugin';
import {
Content,
ContentHeader,
Expand All @@ -30,7 +30,10 @@ createDevApp()
.addPage({
element: (
<Page themeId="tool">
<Header title="Airbrake" subtitle="Errors in your application">
<Header
title="Airbrake demo application"
subtitle="Test the widget below"
>
<HeaderLabel label="Owner" value="Owner" />
<HeaderLabel label="Lifecycle" value="Alpha" />
</Header>
Expand All @@ -40,7 +43,7 @@ createDevApp()
A description of your plugin goes here.
</SupportButton>
</ContentHeader>
<AirbrakePage />
<AirbrakeWidget />
</Content>
</Page>
),
Expand Down
4 changes: 2 additions & 2 deletions plugins/airbrake/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { AirbrakePage, airbrakePlugin } from './index';
import { AirbrakeWidget, airbrakePlugin } from './index';

describe('The Airbrake plugin index file', () => {
it('exports the plugin and page', async () => {
expect(AirbrakePage).toBeTruthy();
expect(AirbrakeWidget).toBeTruthy();
expect(airbrakePlugin).toBeTruthy();
});
});
2 changes: 1 addition & 1 deletion plugins/airbrake/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { airbrakePlugin, AirbrakePage } from './plugin';
export { airbrakePlugin, AirbrakeWidget } from './plugin';
4 changes: 2 additions & 2 deletions plugins/airbrake/src/plugin.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/
import React from 'react';
import { AirbrakePage, airbrakePlugin } from './plugin';
import { AirbrakeWidget, airbrakePlugin } from './plugin';
import { renderWithEffects } from '@backstage/test-utils';
import { createApp } from '@backstage/app-defaults';
import { Route } from 'react-router';
Expand Down Expand Up @@ -48,7 +48,7 @@ describe('Airbrake', () => {
const rendered = await renderWithEffects(
<AppProvider>
<AppRouter>
<Route path="/airbrake" element={<AirbrakePage />} />
<Route path="/airbrake" element={<AirbrakeWidget />} />
</AppRouter>
</AppProvider>,
);
Expand Down
2 changes: 1 addition & 1 deletion plugins/airbrake/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const airbrakePlugin = createPlugin({
},
});

export const AirbrakePage = airbrakePlugin.provide(
export const AirbrakeWidget = airbrakePlugin.provide(
createRoutableExtension({
name: 'AirbrakePage',
component: () =>
Expand Down

0 comments on commit b44a324

Please sign in to comment.