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 ( return (
<div style={{maxWidth: 900, margin: "0 auto", padding: "0 10px"}}> <div style={{maxWidth: 900, margin: "0 auto", padding: "0 10px"}}>
<p> <p style={{textAlign: "right"}}>
<em> <a
This is a prototype. Please{" "} href={
<a href={process.env.SOURCECRED_FEEDBACK_URL}> "https://discuss.sourcecred.io/t/a-gentle-introduction-to-cred/20"
let us know what you think }
</a>. >
</em> what is this?
</a>
{spacer()}
<a href={process.env.SOURCECRED_FEEDBACK_URL}>feedback</a>
</p> </p>
<div style={{marginBottom: 10}}> <div style={{marginBottom: 10}}>
<RepositorySelect <RepositorySelect

View File

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