-
Notifications
You must be signed in to change notification settings - Fork 7
Add (and style) the basic Catalog page layout #290
Conversation
27026b0
to
e86ada3
Compare
* To support the Catalog page, add a unison-share css folder for the catalog page and a new Card module for cards holding each category in the catalog. * Rename `UI.Page` to `UI.PageLayout` to better communicate what that module is for. * Add a way to generate a Route from a Project (exclusively to the Unison Share target) to allow clicking to through to the project page from the catalog
e86ada3
to
c2b9f8c
Compare
@@ -1,26 +1,33 @@ | |||
module UnisonShare.Page.Catalog exposing (..) | |||
|
|||
import Api | |||
import Dict exposing (Dict) | |||
-- import Api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disabled to satisfy linter - will make it back as we start to load real data.
Success | ||
{ catalog = Catalog categories | ||
, query = "" | ||
} | ||
in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mocking a Success
respinse.
fqn = | ||
FQN.cons (Project.ownerToString project_.owner) project_.name | ||
in | ||
Perspective (Perspective.ByNamespace Relative fqn) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perspectives make less and less sense for Unison Share. This will need some rework.
@@ -10,13 +9,18 @@ type Owner | |||
|
|||
|
|||
type alias Project a = | |||
{ a | owner : Owner, name : FQN, hash : Hash } | |||
{ a | owner : Owner, name : FQN } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the Hash field for now to make it easier to mock (creating a Hash
returns a Maybe
)—it'll be back in a later iteration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet!!!
Problem
We want to render a catalog page (#144)
Solution
(this screenshot is the current look, but needs more work in terms of hero background and input focus)
UI.Page
toUI.PageLayout
to better communicate what that module is for.Caveats/Notes
There's a bunch of hardcoded mock data that'll be removed when we load this from the server for real (empty categories are not expected to show up on the final page).