Skip to content
This repository was archived by the owner on Jul 19, 2022. It is now read-only.

Add (and style) the basic Catalog page layout #290

Merged
merged 1 commit into from
Dec 15, 2021
Merged

Conversation

hojberg
Copy link
Member

@hojberg hojberg commented Dec 14, 2021

Problem

We want to render a catalog page (#144)

Solution

CleanShot 2021-12-14 at 16 06 39@2x

(this screenshot is the current look, but needs more work in terms of hero background and input focus)

  • 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

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).

@hojberg hojberg requested a review from pchiusano December 14, 2021 21:43
@hojberg hojberg force-pushed the basic-catalog-layout branch from 27026b0 to e86ada3 Compare December 14, 2021 22:00
* 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
@hojberg hojberg force-pushed the basic-catalog-layout branch from e86ada3 to c2b9f8c Compare December 14, 2021 22:01
@@ -1,26 +1,33 @@
module UnisonShare.Page.Catalog exposing (..)

import Api
import Dict exposing (Dict)
-- import Api
Copy link
Member Author

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
Copy link
Member Author

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)
Copy link
Member Author

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 }
Copy link
Member Author

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.

Copy link
Member

@pchiusano pchiusano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet!!!

@hojberg hojberg merged commit 725f20a into main Dec 15, 2021
@hojberg hojberg deleted the basic-catalog-layout branch December 15, 2021 04:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants