vision of where you want to go 2.Figure out baby steps that will get you there 3....make those steps smaller 4....and adaptable to changing circumstances 5....and recognize that the finished product will resemble but not match your vision 6.Then go do the thing!
- What elements have sub-elements? What sub- and parent elements are allowed? - Can an element appear alone, or is it always part of a group? - What conventions demarcate elements and groups of elements? how elements are arranged
- "Only display notification boxes that relate to the user's current goal" - "Use accordions to Look and feel of individual widgets - This can be as simple as a screenshot, or an embedded version -- and should be! What UI problems does it solve?
all of Bootstrap, or a subset? - Do you have custom, non-Bootstrap UI elements? - Do you have implicit rules about how Bootstrap's used? - Do you copypasta markup a lot?
%> <%= tab('Dogs', dogs_path) %> <% end %> class LayoutHelper # <ul class='tabs tabs-‐left span7 big-‐text red'> # [block contents] # </ul> def tab_set(&block) css_classes = %w(tabs tabs-‐left span7 big-‐text red) content_tag('ul', class: css_classes.join(' '), &block) end end what your view looks like build the tag yield control
# set options # main code card_classes = size ? "card card-‐-‐#{size}" : 'card' content_tag('div', class: 'card') do [ card_header(header_text), (subheading.present? ? card_subheading(subheading) : nil), image_tag(image_url), # ... end such long many configuration much sub-helpers
# [block contents] # </div> def render(&block) h.content_tag('div', class: css_classes, &block) end end build the outer framework yield to sub-renderers
voices of small-dollar donors - 1.1 BILLION total raised since 2004 - committed to a modern, culturally and technically sustainable approach - now hiring UX, Rails, and DevOps
@h = h @size = options.fetch(:size, 'normal') end def header(text: nil, &block) @header = text if text @header = h.capture(&block) if block_given? @header end def render(&block) block.call(self) h.render( partial: 'components/card', locals: { header: header } end end end initialization configuration methods rendering
c.header 'My Awesome Knitting Pattern' %> <%= c.image pattern.showcase_image_url %> <%= c.badges { favorite: favorite_count } %> <% end %> NOT YOUR FRIENDS ANY MORE