GithubHelp home page GithubHelp logo

mikelambert / dancedeets-monorepo Goto Github PK

View Code? Open in Web Editor NEW
21.0 6.0 2.0 32.9 MB

DanceDeets Codebase: The python server (with React.JS rendering), as well as the React Native mobile app (and their shared code)

Home Page: http://www.dancedeets.com

JavaScript 34.43% Python 58.08% Java 0.23% Objective-C 0.44% Swift 0.28% Ruby 0.17% Shell 0.66% CSS 1.23% HTML 3.48% Awk 0.92% Dockerfile 0.07%
events-aggregator dance react-native react python gae

dancedeets-monorepo's People

Stargazers

 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

dancedeets-monorepo's Issues

[Mobile] Be smarter at app-open when there are nearby active events

When you open the app and it's showing the List view by default, we can be smarter about showing relevant events and their info:

When we retrieve a list of events, we can filter them clientside for:

  • events within 5-10 miles
  • events that are going on now

If we take those events, we can fetch FB RSVPs for those few events, and find the ones super-relevant to the user. (RSVP data is unfortunately not returned in the server-side result json.)

Then we can offer a better navigation for "relevant events going on now". I'm not sure of the best way here, but:

I'm thinking it'd be useful to have links for "See Event" and "See on Map". We could display these alongside the events in the FlatList.renderItem. We could also have the active events have a subtle pulse/glow to them indicating "active".

We could also show a dismissible pop-up modal overlay on top of the list view, that shows the "Nearby Events Happening Now", with event names, flyers, and the above two links, bringing the focus there.

[Web] Migrate off jQuery to React equivalents

We continue to use jQuery, and pull in ~100kb (pre-gzip) JS on our site. Ideally we would rewrite these dependencies in React (which we've fully committed to).

The current users of jQuery, in need of React rewrites/equivalents.

These are easier because they exist in React templates already:

  • the class results page, including expand/collapse of the navbar, and some scroll-to-selected-element functionality js/classResults.js
  • the search box functionality on the results page templates/results.html

These are a bit more complex, since it involves convert this page over to a React template (some small templates/ and python changes, to mirror what is done in our results, event, and class pages...populate a JSON dict in the python code, I can help with this bit)

  • the add event page, for selecting and triggering actual event adds templates/add.html. (needs to set up a new react template, so some python and templates/ changes)
  • the promote page, to enter the fb event url when clicking on an fb event templates/promote.html. (needs to set up a new react template, so some python and templates/ changes)
  • the backstretch functionality on the homepage background, for the auto-fading dynamically-loaded image carousel js/homepage.js. I think this functionality (dynamically load images as we scroll through the backgrounds, without preloading them all up front) might require a bit of custom work, not sure if there's an off-the-shelf npm package for this.

Misc changes:

  • various admin pages (i'm fine just sticking a <script src="jquery"></script> on these admin pages though

These are a bit harder, in that they exist in the base html templates, and so require a much larger (ie more infrastructural) migration to React JS to pull these off.

  • the app-install banner we show on repeat-usage, using jQuery.modal js/app-install-promo.js
  • the top-of-page smart-banner we show on iOS Chrome (and Android). js/common.js

[Mobile] Cached GPS and/or Event Data

When we open the app, it does a GPS lookup for lat/long (takes a second or so), then uses that to do a reverse geocode to get an address/city (takes another second), then uses that to do a DanceDeets API search for data (which is another few seconds).

A few things can be improved here on loading the "list of events", making everything much faster to load on app startup.

  • We can initiate a request to the DD API with lat/long as the location= parameter, at the same time we do the address/city geocode to get the city, and parallelize the two. And then display the city in the search box when it's found, and the event list in the result set once it's returned.

  • We can show the cached City / EventList-json immediately, while all the processing is going on in the background and reloading the dataset from the server. Sometimes you open the app in a subway without an internet connection (or without a sim card internationally, while you're on wifi), so it'd be nice to have accessto your last-seen data.

  • If we do #2, I worry there might be "jumps" in the result set as you are scrolling-down and about-to-click, which is unfortunate. I don't have great ideas for this....a few ideas:

-- We could look at the current scrolled item, and re-scroll to that item in the new dataset (if it still exists).
-- We could do some "are we online?" check at the very beginning. If we are not online (or the search results fail), we show the cached data. If we are online, we show-nothing, and then show the downloaded data as soon as it arrives.
-- Open to other ideas here if you got them?

The code is in mobile/js/events/list.js code and starts in the initialize() function flow.

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.