Add a helpful link to the cred explorer (#727)

Adds a link titled "what is this?" that points to my gentle introduction
to cred. Also, move the feedback link to be next to it and get rid of
the prototype disclaimer.

Test plan: Visual inspection, also a test was updated.
This commit is contained in:
Dandelion Mané 2018-08-29 19:19:01 -07:00 committed by GitHub
parent fef00877bf
commit d8556b618f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 10 deletions

View File

@ -80,15 +80,21 @@ export function createApp(
/>
);
}
const spacer = () => (
<span style={{display: "inline-block", width: 12}} />
);
return (
<div style={{maxWidth: 900, margin: "0 auto", padding: "0 10px"}}>
<p>
<em>
This is a prototype. Please{" "}
<a href={process.env.SOURCECRED_FEEDBACK_URL}>
let us know what you think
</a>.
</em>
<p style={{textAlign: "right"}}>
<a
href={
"https://discuss.sourcecred.io/t/a-gentle-introduction-to-cred/20"
}
>
what is this?
</a>
{spacer()}
<a href={process.env.SOURCECRED_FEEDBACK_URL}>feedback</a>
</p>
<div style={{marginBottom: 10}}>
<RepositorySelect

View File

@ -116,9 +116,7 @@ describe("app/credExplorer/App", () => {
it("should have a feedback link with a valid URL", () => {
const {el} = example();
const link = el
.find("a")
.filterWhere((x) => x.text().includes("let us know what you think"));
const link = el.find("a").filterWhere((x) => x.text().includes("feedback"));
expect(link).toHaveLength(1);
expect(link.prop("href")).toMatch(/https?:\/\//);
});