Giter Site home page Giter Site logo

artsy / emission Goto Github PK

View Code? Open in Web Editor NEW
618.0 61.0 78.0 96.6 MB

⚠️ Deprecated repo, moved to artsy/eigen ➡️ React Native Components

Home Page: http://artsy.github.io/blog/2018/04/17/making-a-components-pod/

License: MIT License

Ruby 0.47% Objective-C 12.51% JavaScript 1.56% Shell 0.02% TypeScript 85.04% Makefile 0.16% HTML 0.25% C 0.01% Swift 0.01%
react-native app artsy

emission's Introduction

⚠️ This repo is deprecated

The code in this repository was folded into Eigen. Please go there for all future development.

Reactions ⇒ Emissions

Emission is a collection of React Native Components which are consumed by Eigen. A writeup on how & why we made a lot of the repo decisions is on our blog here.

Inside Emission you will find:

  • An example app for building and running Emission's components with an Eigen-like API.
  • An NPM module that relies on React Native and manages the components.
  • A Podspec that wraps it all together for easy external usage in Eigen.

Meta

This is a core Artsy Mobile OSS project, along with Energy, Eidolon, Eigen and Emergence.

Don't know what Artsy is? Check out this overview and more, or read our objc.io on team culture.

Want to know more about Emission? Read the mobile blog posts, or Emission's / React Native's specifically. Also check out the map to Emission to oriented yourself to the codebase.

Prerequisites

  • Xcode

Installation

Automated install:

  • OSS: git clone https://github.com/artsy/emission.git && cd emission && make setup && make oss
  • Artsy: git clone https://github.com/artsy/emission.git && cd emission && make setup && make artsy. Then look in 1password for the Eigen keys.

Manual install

  1. Install Node.js, and Yarn: $ brew install node yarn
  2. Install file watcher used by React Native:
    • $ brew install watchman
  3. Install NPM modules: $ yarn install
  4. Install Pods: $ cd Example && bundle && bundle exec pod install

Ran into issues? Try troubleshoot.

Running the project:

  1. Run $ yarn start from the top directory, which will:

    • Clean the example app’s Xcode build dir.
    • Start the example app’s React Native packager.
    • Start the React Storybooks environment.
  2. Now from Xcode you can run the app in Example/Emission.xcworkspace.

  • If you already have the app installed, you can run open -a Simulator to open the last sim, and then xcrun simctl launch booted net.artsy.Emission to open the app.
  • If you run into any issues with the above commands oftentimes a full clean can help. Run rm -rf node_modules; rm -rf Example/Pods; yarn install; cd Example; bundle exec pod install and then repeat the steps above.

Daily Development

To use Storybooks, select "Open Storybook" from the "Developer" section of the root view in the app. You can also use the VSCode Storybooks plugin.

To create your React components and Relay containers, use the omakase generator. E.g.

$ yarn om g src/lib/Scenes/Artwork/ArtworkMetadata -f Artwork
$ yarn om g src/lib/Scenes/Artwork/ArtworkMetadata -r Artwork
$ yarn om g src/lib/Scenes/Artwork/ArtworkMetadata -p Artwork.artists

For full details see the CLI README.


Using VS Code as an IDE

There is a comprehensive document covering our setup here.

Debugging

There is a comprehensive document covering the various options.

Updating Dependencies

We vendor some data from other repositories that you will sometimes need to update. Notably the GraphQL schema of metaphysics that Relay uses to generate queries from: $ yarn sync-schema

Deploying Emission

Deploys are automated on CI after each PR merge, based on the patch/minor/major label added to the PR (patch is default).

Resources

License

MIT.

About Artsy

This project is the work of engineers at Artsy, the world's leading and largest online art marketplace and platform for discovering art. One of our core Engineering Principles is being Open Source by Default which means we strive to share as many details of our work as possible.

You can learn more about this work from our blog and by following @ArtsyOpenSource or explore our public data by checking out our API. If you're interested in a career at Artsy, read through our job postings!

emission's People

Contributors

alloy avatar anandaroop avatar artsy-peril[bot] avatar artsyit avatar ashfurrow avatar ashkan18 avatar ashleyjelks avatar brainbicycle avatar broskoski avatar damassi avatar dependabot[bot] avatar ds300 avatar erikdstock avatar javamonn avatar kierangillen avatar l2succes avatar lilyfromseattle avatar mennenia avatar mzikherman avatar orta avatar pepopowitz avatar peril-staging[bot] avatar renovate-bot avatar saolsen avatar sarahscott avatar sepans avatar sweir27 avatar xtina-starr avatar yuki24 avatar zephraph avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emission's Issues

Add artworks grid component

This needs to be copied over from my prototype app.

While I have a working one that’s backed by a native collection view and our masonry grid layout, I’d like to try to use a pure RN one for now.

The one issue we have is that we don’t have pagination working atm. Maybe we can have a stop-gap hybrid that does further paging without Relay, but that still requires me to work out a way to load the next page when scrolled to the bottom.

[Image] Get images sized according to screen DPI

E.g. if we want to display an image at 200x100, we should make GraphQL queries like so:

Screen scale:

  1. 200x100
  2. 400x200
  3. 600x300

For those images where we dynamically size based on the aspect ratio (e.g. masonry grid) we only specify 1 dimension (e.g. width) that’s specified according to screen scale and let metaphysics figure out the resize arguments based on the image’s aspect ratio.

Update to RN 0.25

I tried doing that as part of my PR #8, but it seems that it re-breaks my simple workaround for the image view getting a zero size rect.

Port to TypeScript

Requires:

  • Type definitions for latest React
  • Type definitions for latest React Native
  • Setting up compiler
  • Ensuring VS Code is properly configured for our project
  • Add type annotations to our existing code

[metaphysics] Missing shows data

  • Number of artworks by artist X in a show
  • ausstellungsdauer, is the same format used across clients? If so, implement in metaphysics
  • formatted status string (i.e. Closing in 2 days; Opening Today)
  • shows filtered by status - call should take an array parameter for desired statuses (i.e. "running" & "upcoming")

[Artworks] Crash while paging

https://rink.hockeyapp.net/manage/apps/37020/app_versions/225/crash_reasons/122479397

RCTFatalException: Unhandled JS Exception: this.props.artworksQuery is not a function. (In 'this.props.artworksQuery(this.props.relay.route.params.artistID,t)', 'this.props.artworksQuery' is undefined)', reason: 'Unhandled JS Exception: this.props.artworksQuery is not a function. (In 'th..., stack:
value@625:943
value@625:2897
scrollResponderHandleScroll@362:1586
handleScroll@360:2499
a@258:71
o@256:391
a@256:582
f@254:159
g@254:262
i@260:102
processEventQueue@254:1382
s@304:92
handleTopLevel@304:181
_receiveRootNodeIDEvent@303:613
receiveEvent@303:714
value@196:3100
<unknown>@196:1319
k@196:413
value@196:1291

Add tap and route to other entity handling.

  • Add a native module that can use Eigen’s ARSwitchBoard to open a new VC and add it to the stack. (I have a rough version here which is used here.)
  • Add tap handling to articles.
  • Add tap handling to artworks.
  • Add tap handling to shows.
  • Add tap handling to artists.

[metaphysics] Artist bio

The current artist bio that is returned by metaphysics appears to only be the short one, we also need the long one, as seen in the design.

{
  "data": {
    "artist": {
      "bio": "born 1965, Bristol, United Kingdom, lives and works in London, United Kingdom"
    }
  }
}

Integrate into Eigen

  • Write switchboard bindings
  • Use proper loading spinner
  • Write artist follow API binding
  • Make Emission pod integration work in Eigen
  • Make Eigen+Emission setup smooth

Consider TypeScript?

From http://twitter.com/lazerwalker/status/723232122480287745:

I know more people using TypeScript, the argument generally being great IDE support in VS Code

I’m digging VS Code thus far. I’m not really feeling Flow yet. Maybe it makes sense to use a ‘real’ language instead of another bolted on thing…

The one thing that Flow has going for it and why I wanted to try to use that first is that it’s what is used by FB and thus React/Native are annotated using Flow.

[Artist] Paginate past shows

  • Add Object Identification support to metaphysics
  • Add support to React Native to have ListView invoke its onEndReached callback when a ListView is wrapped in another ScrollView.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.