Skip to content

Instantly share code, notes, and snippets.

@cgeglio
Last active March 18, 2020 04:24
Show Gist options
  • Save cgeglio/2f3a731b78bb264b6892b21fa75475ee to your computer and use it in GitHub Desktop.
Save cgeglio/2f3a731b78bb264b6892b21fa75475ee to your computer and use it in GitHub Desktop.

VIEW: SIDEBAR NAV

  • app/views/articles/_sidebar_nav.html.erb
  • the top part of the left sidebar - where we can add the 'collections' link + emoji

COMPONENT: LISTINGS

  • app/javascript/listings/listings.jsx
  • this is what appears when you click 'Listings' on the home page
  • it includes the topics: this is where we can suggest topics for collections, search className="classified-filters-categories" to see this section in the code
  • search export class Listings to see the react component that is actually rendering the listings container (basically the entire page you see when you click 'Listings' on the home page

COMPONENT: SINGLE LISTING

  • app/javascript/listings/singleListing/index.jsx
  • this is the component that builds out a single listing within the listings container, i figure we will use something similar for a single collection ***remind me to show you the difference between a class component and a functional component (Listings vs SingleListing)

COMPONENT: SEARCH

  • app/javascript/src/components/Search/Search.jsx
  • might be over-engineering to use this component - I'm not sure our collections search functionality needs all this but wanted to point out that it exists

STYLESHEETS: SASS/CSS

  • app/assets/stylesheets/_colors.scss
  • Fyi, this is where all the sass/css files we'll need to use are
  • How familiar are ya'll with sass/css, or how familiar do you want to be?

Other thoughts:

  • Rn, when you click on the title of a SingleListing it triggers a method called handleOpenModal that comes from Listing. Then it opens a floating listing and grays out everything behind it. I don't know if we want to do something with this - I could see having a floating list of articles in the collection, or, since this functionality seems kind of finicky, maybe we just create a new component specifically for displaying a collection list.

  • app/controllers/stories_controller.rb

  • This is setting up the home page, correct? I looked through this and am just wondering how (if??) we'll need to add collection info in here. Maybe this would be a good one to annotate part of together (??)

  • Although I think we can borrow a lot of syntax/functionality from Listings/SingleListing, and they will be useful to reference, I think it would be easier to just create new components to handle collections

  • config/routes.rb

  • is this where we create our routes? i'm used to that being controlled through an App component in react but that doesn't seem to exist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment