Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove code from mobile view of setting bounty status as open if github issue is open #1164

Merged
merged 7 commits into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/app/src/people/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export interface PersonProps extends Person {
description: string;
}

export interface GithubStatusPillProps {
export interface StatusPillProps {
status?: string;
assignee?: Person;
style?: React.CSSProperties;
Expand Down
8 changes: 3 additions & 5 deletions frontend/app/src/people/widgetViews/parts/StatusPill.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GithubStatusPillProps } from 'people/interfaces';
import { StatusPillProps } from 'people/interfaces';
import React, { useEffect, useState } from 'react';
import styled from 'styled-components';

Expand Down Expand Up @@ -55,7 +55,7 @@ const W = styled.div`
display: flex;
align-items: center;
`;
export default function GithubStatusPill(props: GithubStatusPillProps) {
export default function StatusPill(props: StatusPillProps) {
const { status, assignee, style } = props;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can delete the status prop since that is no longer being used

Copy link
Contributor Author

@gouravmpk gouravmpk Dec 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

const [assigneText, setAssigneText] = useState('');
Expand All @@ -74,9 +74,7 @@ export default function GithubStatusPill(props: GithubStatusPillProps) {

return (
<div style={{ display: 'flex', ...style }}>
<Pill isOpen={isOpen}>
<div>{isOpen ? 'Open' : 'Closed'}</div>
</Pill>
<Pill isOpen={isOpen}>{/* <div>{isOpen ? 'Open' : 'Closed'}</div> */}</Pill>
<W>
gouravmpk marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can delete this pill since there is no children to the component

<Assignee>{assigneText}</Assignee>
</W>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import { EuiText } from '@elastic/eui';
import { CodingViewProps } from 'people/interfaces';
import { Divider, Paragraph, Title } from '../../../../components/common';
import GithubStatusPill from '../../parts/StatusPill';
import StatusPill from '../../parts/StatusPill';
import LoomViewerRecorder from '../../../utils/LoomViewerRecorder';
import { colors } from '../../../../config/colors';
import { renderMarkdown } from '../../../utils/RenderMarkdown';
Expand Down Expand Up @@ -60,7 +60,7 @@ export default function DesktopView(props: CodingViewProps) {
<SectionPad style={{ minHeight: 160, maxHeight: 160 }}>
<Title>{titleString}</Title>
<div style={{ display: 'flex', marginTop: 12 }}>
<GithubStatusPill status={status} assignee={assignee} style={{ marginRight: 25 }} />
<StatusPill status={status} assignee={assignee} style={{ marginRight: 25 }} />
{assigneeLabel}
{ticketUrl && (
<GithubIcon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React from 'react';
import { EuiText } from '@elastic/eui';
import { CodingViewProps } from 'people/interfaces';
import GithubStatusPill from '../../parts/StatusPill';
import StatusPill from '../../parts/StatusPill';
import { Divider } from '../../../../components/common';
import LoomViewerRecorder from '../../../utils/LoomViewerRecorder';
import { colors } from '../../../../config/colors';
Expand Down Expand Up @@ -51,7 +51,7 @@ export default function MobileView(props: CodingViewProps) {
flexDirection: 'row'
}}
>
<GithubStatusPill status={status} assignee={assignee} />
<StatusPill status={status} assignee={assignee} />
{assigneeLabel}
{ticketUrl && (
<GithubIconMobile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import { EuiButtonIcon, EuiText } from '@elastic/eui';
import { observer } from 'mobx-react-lite';
import { WantedViewsProps } from 'people/interfaces';
import GithubStatusPill from '../parts/StatusPill';
import StatusPill from '../parts/StatusPill';
import { colors } from '../../../config/colors';
import NameTag from '../../utils/NameTag';
import { useStores } from '../../../store';
Expand Down Expand Up @@ -86,7 +86,7 @@ function DesktopView(props: WantedViewsProps) {
}}
>
{isCodingTask ? (
<GithubStatusPill
<StatusPill
status={status}
assignee={assignee}
style={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React from 'react';
import { EuiButtonIcon, EuiText } from '@elastic/eui';
import { observer } from 'mobx-react-lite';
import GithubStatusPill from '../parts/StatusPill';
import StatusPill from '../parts/StatusPill';
import { colors } from '../../../config/colors';
import NameTag from '../../utils/NameTag';
import { useStores } from '../../../store';
Expand Down Expand Up @@ -103,7 +103,7 @@ function MobileView(props: any) {
}}
>
{isCodingTask && (
<GithubStatusPill
<StatusPill
status={status}
assignee={assignee}
style={{
Expand Down
Loading