Skip to content

Commit

Permalink
chore: minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AKharytonchyk committed Mar 28, 2024
1 parent 7fed759 commit 2dcaf85
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ The GitHub PR Dashboard is a comprehensive tool designed to streamline the monit

![Settings](docs/images/settings.jpeg)

### Failed Checks

![Failed Checks](docs/images/failed-checks.jpeg)

## Getting Started

Follow these instructions to get your GitHub PR Dashboard up and running on your local machine for development and testing purposes.
Expand Down
Binary file modified docs/images/dashboard.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/failed-checks.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/PullRequestCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const PullRequestCard: React.FC<PullRequestCardProps> = ({ pr }) => {
sx={{ marginRight: "auto" }}
/>
{pr.locked && <Lock /> }
{pr.draft && <DesignServices color="secondary"/>}
{pr.draft && <Tooltip title="Draft PR"><DesignServices color="secondary"/></Tooltip>}
{pr.labels.map((label) => (<Chip key={label.id} label={label.name} size="small" color={getLabelColor(label.name)}/> ))}
<Chip
label={pr.state.toUpperCase()}
Expand Down
6 changes: 3 additions & 3 deletions src/components/PullRequestChecks.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { ConfigContext } from "../App";
import { CheckRun } from "../models/CheckRun";
import { Box, Dialog, Link, Typography } from "@mui/material";
import { Box, Dialog, Link, Tooltip, Typography } from "@mui/material";
import { CheckCircle, Error, ErrorOutline } from "@mui/icons-material";

export type PullRequestChecksProps = {
Expand Down Expand Up @@ -44,9 +44,9 @@ export const PullRequestChecks: React.FC<PullRequestChecksProps> = ({
>
Checks:{" "}
{allChecksPassed ? (
<CheckCircle color="success" sx={{display: "flex", alignItems: "center"}} />
<Tooltip title="All checks passed"><CheckCircle color="success" sx={{display: "flex", alignItems: "center"}} /></Tooltip>
) : (
<Error color="error" />
<Tooltip title="Something went wrong. Click for details"><Error color="error" /></Tooltip>
)}
</Typography>
<Dialog open={open} onClose={() => setOpen(false)} sx={{ padding: "2em" }}>
Expand Down
10 changes: 6 additions & 4 deletions src/components/PullRequestsApprovals.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { ConfigContext } from "../App";
import { Approvals } from "../models/Approvals";
import { Avatar, Badge, Box } from '@mui/material';
import { Avatar, Badge, Box, Tooltip } from '@mui/material';

export type PullRequestsApprovalsProps = {
owner: string;
Expand Down Expand Up @@ -45,9 +45,11 @@ export const PullRequestsApprovals: React.FC<PullRequestsApprovalsProps> = ({
const allApprovals = React.useMemo(() => approvals?.filter((approval) => approval.state !== "DISMISSED"), [approvals]);

const approvalAvatars = React.useMemo(() => allApprovals?.map((approval) => (
<Badge key={approval.user.login} {...getBadgeProps(approval.state)} sx={{ height: "1em", display: "flex", alignItems: "center" }}>
<Avatar key={approval.user.login} alt={approval.user.login} src={approval.user.avatar_url} sx={{height: "1.5em", width: "1.5em"}} />
</Badge>
<Tooltip key={approval.user.login} title={approval.state}>
<Badge {...getBadgeProps(approval.state)} sx={{ height: "1em", display: "flex", alignItems: "center" }}>
<Avatar alt={approval.user.login} src={approval.user.avatar_url} sx={{height: "1.5em", width: "1.5em"}} />
</Badge>
</Tooltip>
)), [allApprovals]);

return <>
Expand Down

0 comments on commit 2dcaf85

Please sign in to comment.