Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comprehensive Events Page #378

Merged
merged 16 commits into from
Nov 28, 2015
Merged

Comprehensive Events Page #378

merged 16 commits into from
Nov 28, 2015

Conversation

mikeal
Copy link
Contributor

@mikeal mikeal commented Nov 25, 2015

Ok, here we go :)

This is code to:

  • Pull data from meetup.com
  • Pull data from nodeschool.io
  • Display data from meetup, nodeschool, and any manually added data in the events.md yaml

The display is terrible, would love some help there before we merge this.

@mikeal
Copy link
Contributor Author

mikeal commented Nov 25, 2015

Also, we filter out all the meetups on meetup.com that don't have "node" in the name. That is probably too aggressive but I wanted something a little more manageable to begin with. Eventually we can list every meetup with the "node.js" topic.

, CA: 'North America'
, US: 'North America'
, AR: 'Latin America'
, PE: 'Latin America'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CO: 'Latin America'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only have all of the ones in here that we need for the meetups currently coming out of meetup.com, I wonder why there isn't one showing up for Colombia.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like they need to be tagged with the topic?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now they need to be tagged with "nodejs" and they need to have "node" in the name, but we may remove that second part later.

@mikeal mikeal added the on hold label Nov 25, 2015
@phillipj
Copy link
Member

Wow, great idea @mikeal 👍 And what a tremendous amount of meetups and nodeschools there are 😃

My initial test displays three entries for Oslo NodeSchool which seems weird. Haven't had time to debug it, but thought it was worth mentioning.

@rnsloan
Copy link
Contributor

rnsloan commented Nov 25, 2015

As a start, I have added a commit to downsize the links and have a three column layout on wider browser windows.

events

@rnsloan
Copy link
Contributor

rnsloan commented Nov 25, 2015

I have some code that toggles the display of events
toggle

If people think we should proceed with this I will make it look better and push it up.

@mikeal as mentioned previously, looks like the region list is being output three times:

screen shot 2015-11-26 at 01 18 51

@mikeal
Copy link
Contributor Author

mikeal commented Nov 25, 2015

@rnsloan this already looks so much more manageable. Awesome :)

@Fishrock123
Copy link
Contributor

@rnsloan suggestion: add some sort of the arrow to the side of those suggesting that they open up.

@mikeal
Copy link
Contributor Author

mikeal commented Nov 25, 2015

If we're going to start with them collapsed we should include some metrics for how many entries, like the number of meetups and nodeschools.

@ghost
Copy link

ghost commented Nov 25, 2015

(also @mikeal can you fix the spelling mistake in the title real quick?)

@mikeal mikeal changed the title Comprehenive Events Page Comprehensive Events Page Nov 25, 2015
@mikeal
Copy link
Contributor Author

mikeal commented Nov 26, 2015

Just got a map in ;)

screen shot 2015-11-25 at 4 14 33 pm

@mikeal
Copy link
Contributor Author

mikeal commented Nov 26, 2015

Ok, so here's what is left:

  • Add support for conferences, which are added manually, to show up on the map.
  • Total counts and auto-collapsing (we have way too many to not show them collapsed by default now)
  • Nice to have: Highlighted events section for some of the bigger tent-pole stuff.

@KhaledMohamedP
Copy link

You did the right thing +1

function _bounds () {
for (var i=0;i<points.length;i++) {
var hav = points[i][2]
if (i > 10 && hav > .1) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the 10th point the one to return?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's how I do bounds detection, it could be a regular for loop as well, though where is the fun in that?

function getBounds(points) { 
    return points.reduce(function(bounds, point) {
        bounds.minLat = bounds.minLat < point.lat ? bounds.minLat : point.lat; 
        bounds.maxLat = bounds.maxLat < point.lat ? point.lat : bounds.maxLat; 
        bounds.minLon = bounds.minLon < point.lon ? bounds.minLon : point.lon; 
        bounds.maxLon = bounds.maxLon < point.lon ? point.lon : bounds.maxLon; 
        return bounds;
    }, {minLat: 180, maxLat: -180, minLon: 90, maxLon: -90}) 
}

@rnsloan
Copy link
Contributor

rnsloan commented Nov 26, 2015

Toggling of events lists is in

toggle

@mikeal can we truncate the text used by the map? Produces a tall box for some like the Melbourne meetup:

map

@mikeal
Copy link
Contributor Author

mikeal commented Nov 28, 2015

@rnsloan I did a new count in JS so that we can add the totals to the key.

The only thing left is some documentation about how to add new events.

- move inline css into .styl
- do not display empty event list number box
@rnsloan
Copy link
Contributor

rnsloan commented Nov 28, 2015

Just did a bit of minor cleanup. My code is now ready for review.

@mikeal
Copy link
Contributor Author

mikeal commented Nov 28, 2015

@rnsloan There's no advantage other than we have to do it anyway in order to get the totals and put them in the map key.

@mikeal mikeal removed the on hold label Nov 28, 2015
@mikeal
Copy link
Contributor Author

mikeal commented Nov 28, 2015

Ok, from my point of view this is ready to be merged, does anyone object?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants