Git Product home page Git Product logo

locus's People

Contributors

jadnco avatar

Watchers

 avatar  avatar

locus's Issues

Integrate Map

Now that photo uploads are working we can draw geographic data onto a map.

The react-map-gl component should be used.

What needs to be done to close this issue:

  • Create Photo model on the backend that will include location data (lat and long) as well as any data, I'm thinking the raw dimensions and the url. Then implement it into Spot models.
  • When creating Spot records, the location data (if available) needs to be sent with the request.
  • Create a MapView that implements the react-map-gl component. This view should be able to get accessed through SpotView with a button or similar.
  • If a Spot does not contain any photos (just text), the map should be displayed in the SpotCard.

Setup navigator to work with nested routes

I ran into this issue after replacing SpotGrid with a List of Spot components in ProfileView. What happens, is essentially, an infinite loop of routes.

Eg:

  • Navigate to Profile tab
  • Click on an avatar icon in one of the Spot components.
  • We went from ProfileView to ProfileView, this happens infinitely.

Some ideas to how this can be resolved:

  • Inside the Spot component, use the Navigator to check if ProfileView is present in the route stack. If it is present, nothing should happen when the avatar is tapped on.
  • If we are on ProfileView and tap on a Spot component, we're routed to SpotView and if we click on the avatar icon again, a new ProfileView is mounted. The route stack should be checked for ProfileView, and if it's present, perform a simple .pop().

Tab bar icon press should result in initial route

When an icon in the tab bar is pressed it should animate back to the initial route.

eg.

  • Start on Feed view (initial route)
  • Click on a SpotCard
  • Now on Spot view
  • Click on Avatar
  • Now on ProfileView

So the route stack should now look something like FeedView > SpotView > ProfileView. Clicking on the 'Feed' icon again in the tab bar should pop every view in the stack, except for Feed.

Integrate third party features

Working ideas on what to integrate:

  • Dropbox โ€“ A lot of spotters will use a DSLR or some kind of digital camera. Being able to take that photo, upload to Dropbox and then to Locus would be ideal.

Add iPad support

In Xcode going to General > Deployment and setting Deployment Target: Universal is the starting point.

All of the full width images should resize into a grid layout. Views like profile, search, spot etc. should pop up in a modal overlay.

Add parallax to views

Parallax should be added to ProfileView and SpotView using react-native-parallax-view.

The behaviour needs to be experimented with. I'm thinking it would differ for both views;

ProfileView

  • User pulls down ScrollView => header image scales.
  • User scrolls downwards => header image has parallax effect.

SpotView

  • User pulls down ScrollView => spot image scales.
  • User scrolls downwards => natural behaviour (no parallax)

This isn't something that can be implemented right away, there is no support for release candidates. I'm expecting an update to v0.18.0 should be about a week away.

SpotView Design

The SpotView needs to be finished up to correlate with the layout of SpotCard.

Dispose large assets as views are unmounted

In particular the views associated to creating new Spots.

From a stationary standpoint, the app uses ~42MB of memory and ~7% CPU. Those numbers are pretty decent. As the user creates a new Spot this changes quickly.

  • Loading up the NewSpotSource view (on the library tab) jumps the memory up to ~72MB, likely because a series of large images are loaded in.
  • Clicking and using the Camera view bumps memory up to ~90MB.
  • After a photo is taken from the camera or selected from the library, the photo gets passed through to a new view. Memory is now up to ~98MB.
  • Moving into the next view, where the user can add a title and caption it's at ~105MB.

I believe the memory is constantly increasing because the large photo assets aren't being disposed of as the views get un-mounted.

This is something that needs to get looked into. Using +100MB is totally fine, it's just not ideal.

Implement custom TabBar

I spent some time playing around with Objective-C trying to enable things like Item background colours, however Apple does not expose those kind of features in the native UITabBarItem class.

It looks like a JavaScript implementation will need to be used.

This custom tab bar should include:

  • TabBarItems need to be able to have separate background colours; I am specifically talking about the camera button.
  • The whole TabBar should hide away as the user scrolls downwards.

Add component tests

Should've started on this one from the beginning.

Doesn't look like there is support for React Native with enzyme, will need to look into this.

Don't push views with direct properties

When pushing new views, properties are currently sent alongside the route component. This should be changed to a passProps property.

ie.

push({ component: Profile, passProps: { data: data.spotter } });

Create method to format numbers

This should be a utility function that can be used throughout the app.

It should follow these example cases:

12983 => 12.9K
1983479 => 1.9M
1784 => 1,784

New Post concepts

Creating a new Spot:

  • Select an image already present in the camera roll.
  • OR Take a new photo
  • After the photo is taken/chosen the user should be able to add filters, crop and make other edits. This new photo should automatically be saved to the camera roll, in case the app suddenly crashes. The photo should not get lost.
  • Once edits have been made to the photo, the user should be able to specify what car is in the photo with a group of selection boxes. A copy of this edited photo should also get saved to the camera roll.
  • Publish/Post button then sends the request and uploads to the servers.

User should be able to move location marker

Inside views/LocationSelector.jsx the current location is grabbed; that is a good start, but the user should be able to manually move (drag) the marker to a more specific location.

Clean up styles

Should not be using inline style objects...

Global style properties like colour, font sizes etc. should be stored in a global file.

Adjust aspect ratio for captured images

The camera feature captures image at 1920x1080 or 16:9 ratio. This isn't ideal because long vertical images don't look good on the device. Something like 4:3 or 3:2 would look a lot better.

Create fix for long Spot titles

A fix needs to be created for Spots with long titles. I was thinking either:

  • Append ellipse (...) after certain amount of characters
  • Or use a horizontal ScrollView if above a certain amount of characters.

photo 2016-02-14 15 05 51 copy

PhotoGrid should display as masonry layout

Photos are currently displayed as perfect squares. They should eventually be displayed in respect to their aspect ratio.

The width of each photo should always be fixed (window.width / 4), but the height should be variable.

masonry-2

Add wrapper to Spots

In the Feed view, the Spots are full width (edge to edge). Right now I'm thinking of sticking them into wrappers with horizontal margins on 8pt. It would look way better transitioning from the iPhone view of a single image to an iPad view of a grid.

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.