Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Make Views Great Again #65

Closed
flexsurfer opened this issue Dec 27, 2017 · 3 comments
Closed

Make Views Great Again #65

flexsurfer opened this issue Dec 27, 2017 · 3 comments

Comments

@flexsurfer
Copy link
Member

flexsurfer commented Dec 27, 2017

Preamble

Idea: DEV#065
Title: Make Views Great Again
Status: Draft
Created: 2017-07-27

Summary

Because our views are not pure it's difficult to test it and reuse.
If we will have pure views covered with spec we could generate it with different data and diffrent sizes in browser and see how it looks for different data and sizes.
Also, it will help us with translations in the future we could develop online translations editor.

Swarm Participants

This project can be done by external contributors for bounties

  • Lead Contributor: @flexsurfer
  • Testing & Evaluation:
  • Contributor:
  • Contributor:
  • PM:
  • UX (if relevant):

Product Overview

Product Description

day8/re-frame#299
https://juxt.pro/blog/posts/generative-ui-clojure-spec.html

Example

(defview accounts []
  [accounts [:get-accounts]]
  [view st/accounts-container
   [status-bar {:type :transparent}]
   [view st/account-title-conatiner
    [text {:style st/account-title-text
           :font :toolbar-title}
     (i18n/label :t/sign-in-to-status)]]
   [view st/accounts-list-container
    [list-view {:dataSource      (lw/to-datasource (vals accounts))
                :renderSeparator #(list-item ^{:key %2} [view {:height 10}])
                :renderRow       #(list-item [account-view %])}]]
(defn accounts-pure [subs labels]
  [view st/accounts-container
   [status-bar {:type :transparent}]
   [view st/account-title-conatiner
    [text {:style st/account-title-text
           :font :toolbar-title}
     (:sign-in labels) ]]
   [view st/accounts-list-container
    [list-view {:dataSource      (lw/to-datasource (vals (:accounts subs))
                :renderSeparator #(list-item ^{:key %2} [view {:height 10}])
                :renderRow       #(list-item [account-view %])}]]

(defview accounts []
  [accounts [:get-accounts]]
  [accounts-pure {:accounts accounts} {:sign-in (i18n/label :t/sign-in-to-status)}])

accounts-pure [subs labels] subs and labels should be covered by spec

Requirements & Dependancies

Minimum Viable Product

Goal Date:

Description:

Dates

Goal Date:

Description:

Testing Days required:

Success Metrics

Copyright

Copyright and related rights waived via CC0.

@andytudhope
Copy link
Contributor

I'm so down to make views great again! Will be part of my role as lead of Status SOB swarm to help out here, but would prefer to keep tracking my time commitment there, if that is OK with you?

@flexsurfer
Copy link
Member Author

after discussing with the team we decided to postpone this idea, and just try to use binding first https://gist.github.com/rasom/63f52696b806429310187f4401358ebc

@naghdy
Copy link
Contributor

naghdy commented Feb 19, 2018

Since this is being postponing, I'm going to mark it closed for now.

@naghdy naghdy closed this as completed Feb 19, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

3 participants