Jhernandez has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379205 )

Change subject: Chore: Move test links to Home, make Home use Page
......................................................................

Chore: Move test links to Home, make Home use Page

In preparation for creating the header, move the menu with test links
that was on App to the Home page, and add an interim Home link in the
head.

Also make the Home route conform to the Page template/component.

Additional changes:
* Remove outdated test in app.test.ts. We'll need to add tests for the
  routes when they become more definitive
* Added a Style Guide link in the test links list

Change-Id: I5ab5a5a438e6d5f3a54cff8113b3386b42599099
---
D src/common/components/app/app.test.ts
M src/common/components/app/app.tsx
M src/common/pages/home.tsx
3 files changed, 38 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/05/379205/1

diff --git a/src/common/components/app/app.test.ts 
b/src/common/components/app/app.test.ts
deleted file mode 100644
index 89cb17e..0000000
--- a/src/common/components/app/app.test.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import * as assert from "assert";
-import { render } from "preact-render-to-string";
-import App from "./app";
-
-describe("app()", () => {
-  it("salutes you", () => {
-    const html = render(App({}));
-    assert.ok(html.indexOf("About") !== -1, "App HTML contains an about");
-  });
-});
diff --git a/src/common/components/app/app.tsx 
b/src/common/components/app/app.tsx
index b94d5a3..50bb6a4 100644
--- a/src/common/components/app/app.tsx
+++ b/src/common/components/app/app.tsx
@@ -1,37 +1,14 @@
 import { h } from "preact";
 import "./app.css";
-import { about, index, wiki } from "../../../common/routers/api";
 import { ChildrenProps } from "../preact-utils";
 import Link from "../link";
 
 export default function App({ children }: ChildrenProps): JSX.Element {
   return (
     <div class="App">
-      <ul>
-        <li>
-          <Link href={index.url()}>Home</Link>
-        </li>
-        <li>
-          <Link href={about.url()}>About</Link>
-        </li>
-        <li>
-          <Link href={wiki.url({ title: "Banana" })}>Banana</Link>
-        </li>
-        <li>
-          <Link href={wiki.url({ title: "Bill_&_Ted's_Excellent_Adventure" })}>
-            Bill & Ted's Excellent Adventure
-          </Link>
-        </li>
-        <li>
-          <Link href={wiki.url({ title: "Cucumber" })}>Cucumber</Link>
-        </li>
-        <li>
-          <Link href={wiki.url({ title: "Ice_cream" })}>Ice cream</Link>
-        </li>
-        <li>
-          <Link href="/404">404</Link>
-        </li>
-      </ul>
+      <h5>
+        <Link href="/">Home</Link>
+      </h5>
       <div>{children}</div>
     </div>
   );
diff --git a/src/common/pages/home.tsx b/src/common/pages/home.tsx
index 5652cce..7bbc9d5 100644
--- a/src/common/pages/home.tsx
+++ b/src/common/pages/home.tsx
@@ -1,8 +1,42 @@
 import { h } from "preact";
 import App from "../components/app/app";
+import { about, index, wiki, styleGuide } from "../../common/routers/api";
+import Page from "../components/page/page";
+import Link from "../components/link";
 
 export const Component = (): JSX.Element => (
   <App>
-    <p>Hello world!</p>
+    <Page title="Welcome" subtitle="">
+      <p>Hello world!</p>
+      <p>Here are some test links for the time being:</p>
+      <ul>
+        <li>
+          <Link href={index.url()}>Home</Link>
+        </li>
+        <li>
+          <Link href={about.url()}>About</Link>
+        </li>
+        <li>
+          <Link href={styleGuide.url()}>Style Guide</Link>
+        </li>
+        <li>
+          <Link href={wiki.url({ title: "Banana" })}>Banana</Link>
+        </li>
+        <li>
+          <Link href={wiki.url({ title: "Bill_&_Ted's_Excellent_Adventure" })}>
+            Bill & Ted's Excellent Adventure
+          </Link>
+        </li>
+        <li>
+          <Link href={wiki.url({ title: "Cucumber" })}>Cucumber</Link>
+        </li>
+        <li>
+          <Link href={wiki.url({ title: "Ice_cream" })}>Ice cream</Link>
+        </li>
+        <li>
+          <Link href="/404">404</Link>
+        </li>
+      </ul>
+    </Page>
   </App>
 );

-- 
To view, visit https://gerrit.wikimedia.org/r/379205
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ab5a5a438e6d5f3a54cff8113b3386b42599099
Gerrit-PatchSet: 1
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Jhernandez <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to