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

Adding basic visualization for organization list using P5.js #16

Merged
merged 1 commit into from
Mar 27, 2018

Conversation

BlinfoldKing
Copy link
Contributor

No description provided.

Copy link
Member

@jayvdb jayvdb left a comment

Choose a reason for hiding this comment

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

Please rebase, and also use CDN URLs instead of adding vendor javascript code to this repo

list.html Outdated
@@ -1,3 +1,4 @@
<!--
Copy link
Member

Choose a reason for hiding this comment

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

leave this page as a boring list, and create a new page for your lovely UI ;-)

list.html Outdated

<div id="container">
<div id="head">
&nbsp
Copy link
Member

Choose a reason for hiding this comment

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

the entity needs a trailing comma; like &npsp;

list.html Outdated
<div id="head">
&nbsp
<div id="title"> Hello </div>
<div id="quit-btn"> &times </div>
Copy link
Member

Choose a reason for hiding this comment

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

entity problem again

jsonloader.js Outdated

var xobj = new XMLHttpRequest();
xobj.overrideMimeType("application/json");
xobj.open('GET', './_data/orgs.json', true);
Copy link
Member

Choose a reason for hiding this comment

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

this file wasnt being published, but I've fixed that: 3424380

@jayvdb
Copy link
Member

jayvdb commented Mar 11, 2018

@gitmate-bot rebase

@jayvdb
Copy link
Member

jayvdb commented Mar 11, 2018

Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently ⚠️

@jayvdb
Copy link
Member

jayvdb commented Mar 11, 2018

Automated rebase with GitMate.io was successful! 🎉

@jayvdb
Copy link
Member

jayvdb commented Mar 11, 2018

yay, preview is working https://deploy-preview-16--soc-orgs.netlify.com/list.html

visualizer.js Outdated

document.getElementById('title').innerHTML = node[index].name
document.getElementById('desc').innerHTML = node[index].tagline
document.getElementById('web').setAttribute('href', node[index].website_url
Copy link
Member

Choose a reason for hiding this comment

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

change this to point to the generated page, e.g. https://soc-orgs.netlify.com/orgs/aimacode

Copy link

@wisn wisn left a comment

Choose a reason for hiding this comment

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

We need to use a JavaScript standard style such as Standard.

jsonloader.js Outdated
xobj.overrideMimeType("application/json");
xobj.open('GET', './_data/orgs.json', true);
xobj.onreadystatechange = () => {
if (xobj.readyState == 4 && xobj.status == "200") {
Copy link

Choose a reason for hiding this comment

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

Use === instead of ==. "200" should be an integer.

list.html Outdated


#container {
width: 25%;
Copy link

Choose a reason for hiding this comment

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

Inconsistent indentation.

jsonloader.js Outdated
}


loadData = (cb) => {
Copy link

Choose a reason for hiding this comment

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

(cb) doesn't need brackets. loadData = cb => { is fine.

visualizer.js Outdated
loadData(json => {
json.forEach(element => {
data.push(element)
if(category.find(value => value.category_name == element.category) == null)
Copy link

Choose a reason for hiding this comment

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

Give a space after if keyword and use === instead of ==.

visualizer.js Outdated
]

const getcoord = (x, y) => {
return [x - screenWidth()/2, y - screenHeight()/2]
Copy link

@wisn wisn Mar 11, 2018

Choose a reason for hiding this comment

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

const getcoord = (x, y) => ([x - screenWidth()/2, y - screenHeight()/2]) is equivalence.

visualizer.js Outdated

document.getElementById('title').innerHTML = node[index].name
document.getElementById('desc').innerHTML = node[index].tagline
document.getElementById('web').setAttribute('href', node[index].website_url)
Copy link
Member

Choose a reason for hiding this comment

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

This still needs fixing: #16 (comment)

@jayvdb
Copy link
Member

jayvdb commented Mar 12, 2018

On the view of a single category, with lots of orgs, what is determining the layout. The placement of the org nodes doesnt have an obvious purpose. If there is a good reason for the layout, maybe add a note explaining it to the user.

@BlinfoldKing
Copy link
Contributor Author

the orgs is currently spawn at random position, i'm currently still searching for a way to represent the data.

Copy link
Member

@jayvdb jayvdb left a comment

Choose a reason for hiding this comment

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

Please use CDN URLs instead of adding vendor javascript code to this repo

@jayvdb
Copy link
Member

jayvdb commented Mar 12, 2018

Also need to replace jquery & p5 with CDN versions.

@BlinfoldKing
Copy link
Contributor Author

i've already replace it with the cdn version

@jayvdb
Copy link
Member

jayvdb commented Mar 12, 2018

Nice, I must have been looking at an old version.

Can you lint all of your JS code with standard. c.f. #19

Then squash your commits into a single commit if you want to. If you dont, I have to squash it, which means that I become the git Committer on your patch.

calculating org frequency

starting to visualize orgs

changing visualization style and adding p5 library

start to displaying orgs data

update orgs mode

completing base visualization

finishing all the basic functional

fix trailing comma

change library source to cdn

move the visual to separated html file

change redirect to soc-orgs generated page

change the href target

remove vendor directory

cleanup and setup eslint

cleanup and setup eslint
@jayvdb jayvdb merged commit b412e89 into summerofcode:master Mar 27, 2018
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.

3 participants