Skip to content

Commit

Permalink
Arc test blitz fixes (#2356)
Browse files Browse the repository at this point in the history
* - Typos

* - Nits from Sarah

* - Nits from Sarah

* - GitHub logo added for dark theme

* - Color for the GitHubOptions updated

* - Successful screen images fixed

* - Dark theme image set for headre

* - TODO added for when browser pop-up is blocked
  • Loading branch information
krazziekay authored Aug 21, 2023
1 parent 77d82f4 commit a216dfe
Show file tree
Hide file tree
Showing 12 changed files with 93 additions and 24 deletions.
2 changes: 1 addition & 1 deletion spa/src/common/Wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const navigateToHomePage = () => {
analyticsClient.sendUIEvent({ actionSubject: "dropExperienceViaBackButton", action: "clicked" });
AP.getLocation((location: string) => {
const locationUrl = new URL(location);
AP.navigator.go( "site", { absoluteUrl: `${locationUrl.origin}/plugins/servlet/upm` });
AP.navigator.go( "site", { absoluteUrl: `${locationUrl.origin}/jira/marketplace/discover/app/com.github.integration.production` });
});
};

Expand Down
30 changes: 19 additions & 11 deletions spa/src/components/SyncHeader/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { token } from "@atlaskit/tokens";
import { token, useThemeObserver } from "@atlaskit/tokens";
import styled from "@emotion/styled";

const HeaderWrapper = styled.div`
Expand All @@ -23,15 +23,23 @@ const Title = styled.h2`
margin: ${token("space.400")} ${token("space.0")} ${token("space.300")};
`;

const SyncHeader = () => (
<HeaderWrapper>
<LogoContainer>
<Logo className="logo" src="/public/assets/jira-logo.svg" alt=""/>
<SyncLogo className="sync-logo" src="/public/assets/sync.svg" alt=""/>
<Logo className="logo" src="/public/assets/github-logo.svg" alt=""/>
</LogoContainer>
<Title>Connect Github to Jira</Title>
</HeaderWrapper>
);
const SyncHeader = () => {
const { colorMode } = useThemeObserver();

return (
<HeaderWrapper>
<LogoContainer>
<Logo className="logo" src="/public/assets/jira-logo.svg" alt=""/>
<SyncLogo className="sync-logo" src="/public/assets/sync.svg" alt=""/>
<Logo
className="logo"
src={colorMode === "dark" ? "/public/assets/github-logo-dark-theme.svg" : "/public/assets/github-logo.svg"}
alt=""
/>
</LogoContainer>
<Title>Connect Github to Jira</Title>
</HeaderWrapper>
);
};

export default SyncHeader;
2 changes: 1 addition & 1 deletion spa/src/pages/ConfigSteps/OrgsContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const OrganizationsList = ({
if (!org.isAdmin) {
return <>
<Paragraph>
Can't connect, you're not an organization owner.<br />Ask an owner to complete this step.
Can't connect, you're not the organization owner.<br />Ask an owner to complete this step.
</Paragraph>
</>;
}
Expand Down
4 changes: 2 additions & 2 deletions spa/src/pages/ConfigSteps/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ const TooltipContainer = styled.div`
}
`;
const GitHubOption = styled.div<GitHubOptionType>`
background: ${props => props.optionKey === props.selectedOption ? "#DEEBFF" : "rgba(9, 30, 66, 0.04)"};
background: ${props => props.optionKey === props.selectedOption ? token("color.background.selected") : token("color.background.accent.gray.subtlest")};
font-weight: ${props => props.optionKey === props.selectedOption ? 600 : 400};
color: ${props => props.optionKey === props.selectedOption ? token("color.text.accent.blue") : "inherit"};
color: ${props => props.optionKey === props.selectedOption ? token("color.text.selected") : token("color.text")};
padding: ${token("space.100")} ${token("space.200")};
margin-right: ${token("space.100")};
border-radius: 100px;
Expand Down
10 changes: 6 additions & 4 deletions spa/src/pages/Connected/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from "@emotion/styled";
import { Wrapper } from "../../common/Wrapper";
import { token } from "@atlaskit/tokens";
import { token, useThemeObserver } from "@atlaskit/tokens";
import Heading from "@atlaskit/heading";
import Button from "@atlaskit/button";
import analyticsClient, { useEffectScreenEvent } from "../../analytics";
Expand Down Expand Up @@ -50,6 +50,8 @@ const Connected = () => {
useEffectScreenEvent("SuccessfulConnectedScreen");

const navigate = useNavigate();
const { colorMode } = useThemeObserver();

const navigateToBackfillPage = () => {
analyticsClient.sendUIEvent({ actionSubject: "checkBackfillStatus", action: "clicked" });
AP.navigator.go( "addonmodule", { moduleKey: "gh-addon-admin" });
Expand All @@ -58,10 +60,10 @@ const Connected = () => {
return (<Wrapper>
<ConnectedContainer>
<div>
<HeaderImg src="/public/assets/jira-github-connected.svg" alt=""/>
<HeaderImg src={colorMode === "dark" ? "/public/assets/jira-github-connected-dark-theme.svg" : "/public/assets/jira-github-connected.svg"} alt=""/>
<Title>GitHub is connected!</Title>
<TopContent>
Its' time to let everyone know that GitHub's ready to use and your<br />
It’s time to let everyone know GitHubs ready to use and your<br />
team can use issue keys to link work to Jira.<br />
</TopContent>
<ButtonContainer>
Expand Down Expand Up @@ -119,7 +121,7 @@ const Connected = () => {
onClick={navigateToBackfillPage}
>
Check your backfill status
</Button>
</Button>.
</Paragraph>
</ConnectedContainer>
</Wrapper>);
Expand Down
2 changes: 1 addition & 1 deletion spa/src/pages/StartConnection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const StartConnection = () => {
return (
<Wrapper>
<SyncHeader/>
<BeforeText>Before you start, you'll need:</BeforeText>
<BeforeText>Before you start, you should have:</BeforeText>
<ListContainer>
<ListItem>
<Logo>
Expand Down
2 changes: 1 addition & 1 deletion spa/src/pages/StartConnection/test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test("Entry Config Screen", async () => {
);

expect(screen.getByText("Connect Github to Jira")).toBeTruthy();
expect(screen.getByText("Before you start, you'll need:")).toBeTruthy();
expect(screen.getByText("Before you start, you should have:")).toBeTruthy();
expect(screen.getByText("A GitHub account")).toBeTruthy();
expect(screen.getByText("Owner permission for a GitHub organization")).toBeTruthy();
expect(screen.getByRole("button", { name: "continue" })).toHaveTextContent("Continue");
Expand Down
8 changes: 7 additions & 1 deletion spa/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ export const getJiraJWT = (): Promise<string> => new Promise(resolve => {
});

export function popup (url: string) {
return window.open(url, "_blank");
const openedPopup = window.open(url, "_blank");
if (!openedPopup || openedPopup.closed || typeof openedPopup.closed === "undefined") {
// TODO: Meaningful UI when browser pop-up is blocked
console.log("Popup is blocked");
return null;
}
return openedPopup;
}

export function reportError(err: unknown) {
Expand Down
2 changes: 1 addition & 1 deletion static/assets/collaborate-in-jira.svg
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 static/assets/github-integration.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions static/assets/github-logo-dark-theme.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 50 additions & 0 deletions static/assets/jira-github-connected-dark-theme.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a216dfe

Please sign in to comment.