<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: J Silverstein</title>
    <description>The latest articles on DEV Community by J Silverstein (@jlr7245).</description>
    <link>https://dev.to/jlr7245</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F9566%2F12768542.jpeg</url>
      <title>DEV Community: J Silverstein</title>
      <link>https://dev.to/jlr7245</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jlr7245"/>
    <language>en</language>
    <item>
      <title>Weekly UI Challenge, Week 2: Search Input, Part 1</title>
      <dc:creator>J Silverstein</dc:creator>
      <pubDate>Tue, 17 Apr 2018 03:48:39 +0000</pubDate>
      <link>https://dev.to/jlr7245/weekly-ui-challenge-week-2-search-input-part-1-hgd</link>
      <guid>https://dev.to/jlr7245/weekly-ui-challenge-week-2-search-input-part-1-hgd</guid>
      <description>&lt;p&gt;This week's &lt;a href="https://dev.to/geoff/week-2-day-1-design-a-search-bar-mo6"&gt;Weekly UI Challenge&lt;/a&gt; is to design a search bar, complete with autocomplete and previous search cacheing.&lt;/p&gt;

&lt;p&gt;This is actually pretty close to something I've already built:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fusc4c9ujmp0w93rc5ld6.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fusc4c9ujmp0w93rc5ld6.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am happy with the design of this search bar already. However, its functionality leaves something to be desired. Instead of dynamically getting legislator information, it does a filter through a large JSON object that has to be updated manually. Less than ideal! And, as you can see, it doesn't cache previous searches. &lt;/p&gt;

&lt;p&gt;This project (&lt;a href="https://callcongress-how.herokuapp.com" rel="noopener noreferrer"&gt;callcongress.how&lt;/a&gt;) is a site I've been meaning to rebuild in the first place -- it has some serious flaws, and needs an overhaul badly. I love the idea of doing this project in community rather than on my own, and I have been meaning to start writing about my development process. So, let's get to it!&lt;/p&gt;

&lt;h3&gt;
  
  
  Sketches &amp;amp; Design Considerations
&lt;/h3&gt;

&lt;p&gt;Since I'm working off a search feature I've already built, I didn't do any high-fidelity sketches, just this one:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fvtdonbd6w3wzj9umxwov.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fvtdonbd6w3wzj9umxwov.JPG"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Thoughts &amp;amp; Questions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;At what point is a user's search cached to appear in a "recent searches"? When the user chooses a card? When the user stops typing for an amount of time?&lt;/li&gt;
&lt;li&gt;Maybe it would be good to have some kind of search button functionality. The cards can have minimal info and the results page would have a little bit more.&lt;/li&gt;
&lt;li&gt;Want to implement memoization &amp;amp; debounce techniques to manage the fetches for the autocomplete.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Tech Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;React/Redux/Router&lt;/li&gt;
&lt;li&gt;Redis (currently one of my favorite technologies)&lt;/li&gt;
&lt;li&gt;Express/Postgres/pg-promise&lt;/li&gt;
&lt;li&gt;Flexbox&lt;/li&gt;
&lt;li&gt;The ProPublica congress API&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The repository so far lives &lt;a href="https://github.com/jlr7245/callcongresshow" rel="noopener noreferrer"&gt;here&lt;/a&gt;. So far, it has an auth boilerplate and the beginnings of our politician router.&lt;/p&gt;

&lt;h3&gt;
  
  
  Timeline
&lt;/h3&gt;

&lt;p&gt;I am one day behind the official timeline of this challenge. I'm also thinking that most of the heavy lifting here is going to be backend work, which I don't get to do very much of at the moment but really enjoy, so that's fine with me. So, here's the steps I think I'm going to need to take in order to accomplish this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PHASE -1&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create temporary legislators table&lt;/li&gt;
&lt;li&gt;Create search form&lt;/li&gt;
&lt;li&gt;Create actions/reducers relating to the actions that form should take&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;PHASE 0&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implement a fuzzy search&lt;/li&gt;
&lt;li&gt;Implement LocalStorage to save user's recent searches&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;PHASE 1&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Improve data -- at this point I should attempt to get actual data out of the ProPublica API&lt;/li&gt;
&lt;li&gt;Rework search form to make API calls while user is typing&lt;/li&gt;
&lt;li&gt;Styling!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;PHASE 2&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Improve performance -- implement Redis cacheing to save past searches over users and save time by not querying the DB&lt;/li&gt;
&lt;li&gt;Results page -- user can either use the mini-cards on the search page to add legislators to their watchlist or go to a results page that will contain more info&lt;/li&gt;
&lt;li&gt;A11y concerns&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Closing Thoughts
&lt;/h3&gt;

&lt;p&gt;This is a really ambitious project to try to finish in a week, and I have &lt;em&gt;maybe&lt;/em&gt; stretched what the challenge is supposed to be about, but I'm excited to tackle it. The CallCongress.How project is something I've felt strongly about for a while and I'm looking forward to getting the chance to improve it.&lt;/p&gt;

</description>
      <category>weeklyui</category>
      <category>challenge</category>
      <category>design</category>
    </item>
  </channel>
</rss>
