Improved naming based on feedback and a few other improvements

Signed-off-by: Andre Wanlin <awanlin@rapidrtc.com>
This commit is contained in:
Andre Wanlin
2021-11-10 07:46:29 -06:00
parent 9ae9f6cf75
commit 6d56f20ae6
9 changed files with 16 additions and 16 deletions
@@ -18,7 +18,7 @@ import { SvgIcon, SvgIconProps } from '@material-ui/core';
import React from 'react';
export const AzureReposIcon = (props: SvgIconProps) => (
export const AzurePullRequestsIcon = (props: SvgIconProps) => (
<SvgIcon {...props} viewBox="0 0 512 512">
<circle
fill="none"
@@ -14,4 +14,4 @@
* limitations under the License.
*/
export { AzureReposIcon } from './AzureReposIcon';
export { AzurePullRequestsIcon } from './AzurePullRequestsIcon';
@@ -17,7 +17,7 @@
import { PullRequestTable } from '../PullRequestTable/PullRequestTable';
import React from 'react';
export const EntityPageAzureRepos = ({
export const EntityPageAzurePullRequests = ({
defaultLimit,
}: {
defaultLimit?: number;
@@ -14,4 +14,4 @@
* limitations under the License.
*/
export { EntityPageAzureRepos } from './EntityPageAzureRepos';
export { EntityPageAzurePullRequests } from './EntityPageAzurePullRequests';
@@ -27,7 +27,7 @@ import {
} from '@backstage/plugin-azure-devops-common';
import React, { useState } from 'react';
import { AzureReposIcon } from '../AzureReposIcon';
import { AzurePullRequestsIcon } from '../AzurePullRequestsIcon';
import { DateTime } from 'luxon';
import { PullRequestStatusButtonGroup } from '../PullRequestStatusButtonGroup';
import { useEntity } from '@backstage/plugin-catalog-react';
@@ -46,7 +46,7 @@ const columns: TableColumn[] = [
width: 'auto',
render: (row: Partial<PullRequest>) => (
<Box display="flex" alignItems="center">
<Link to={row.link || ''}>{row.title}</Link>
<Link to={row.link ?? ''}>{row.title}</Link>
<Box paddingLeft={1}>
{row.isDraft && (
<Chip
@@ -121,7 +121,7 @@ export const PullRequestTable = ({ defaultLimit }: PullRequestTableProps) => {
}}
title={
<Box display="flex" alignItems="center">
<AzureReposIcon style={{ fontSize: 30 }} />
<AzurePullRequestsIcon style={{ fontSize: 30 }} />
<Box mr={1} />
Azure Repos - Pull Requests ({items ? items.length : 0})
<Box position="absolute" right={320} top={20}>
+1 -1
View File
@@ -16,6 +16,6 @@
export {
azureDevOpsPlugin,
EntityAzurePipelinesContent,
EntityAzureReposContent,
EntityAzurePullRequestsContent,
isAzureDevOpsAvailable,
} from './plugin';
+4 -4
View File
@@ -57,12 +57,12 @@ export const EntityAzurePipelinesContent = azureDevOpsPlugin.provide(
}),
);
export const EntityAzureReposContent = azureDevOpsPlugin.provide(
export const EntityAzurePullRequestsContent = azureDevOpsPlugin.provide(
createRoutableExtension({
name: 'EntityAzureReposContent',
name: 'EntityAzurePullRequestsContent',
component: () =>
import('./components/EntityPageAzureRepos').then(
m => m.EntityPageAzureRepos,
import('./components/EntityPageAzurePullRequests').then(
m => m.EntityPageAzurePullRequests,
),
mountPoint: azureDevOpsRouteRef,
}),