Git Product home page Git Product logo

joindin-web2's Introduction

Joind.in

This is the source code for the next generation of the Joind.in website - a resource set up to allow events to get real-time feedback from those attending. It also gives speakers a way to claim and track their presentations over time.

This version is the next generation version, providing a responsive cross-device site for screens of all devices

You can either install joind.in on an existing PHP platform, or use our vagrant setup.

Welcome

Joind.in welcomes all contributors regardless of your ability or experience. We especially welcome you if you are new to Open Source development and will provide a helping hand. To ensure that everyone understands what we expect from our community, our projects have a Contributor Code of Conduct and by participating in the development of joind.in you agree to abide by its terms.

Quick start with Vagrant

To get you going without much hassle we created a vagrant-setup. To use it fork the joindin-vm repository and follow the instructions in there.

This VM will load all three Joind.in projects (joind.in, joindin-vm and joindin-web2).

Other Resources

Global .gitignore

git has the capability to define a global gitignore file , which means you can set up rules on your machine to ignore everything you don't want to include in your commits. This works not only for this project, but for all your other projects too.

You can define the gitignore file with a command that looks like this, where the last argument is the file that holds the patterns to ignore:

git config --global core.excludesfile ~/.gitignore_global

Octocat gives a good starting point for what to include, but you can also ignore the files used by your editor:

# Eclipse
.classpath
.project
.settings/

# Intellij
.idea/
*.iml
*.iws
    
# Maven
log/
target/

# Netbeans
nbproject/private/

For more info on ignoring files, github has an excellent help page.

Using A Proxy

Since web2 then calls the API, it can be tricky to see what is going on. You can use a proxy tool such as Charles Proxy or mitmproxy to observe the requests that are being made by enabling the proxy setting in the config with a line that looks something like this:

'proxy' => 'tcp://10.0.2.2:8888',

If the proxy tool is running on your host machine, you'll need to understand what IP address the guest thinks your host has, the easiest way to do that is to vagrant ssh into the VM and then type last to see where it thinks you logged in from.

Alternatively, try Lorna's blog post about Wiresharking a VM.

CODE STYLE

Please do your best to ensure that any code you contributed adheres to the PSR2 coding style. You can run php codesniffer on an individual file like so:

vendor/bin/phpcs path/of/filename.php

This will run codesniffer on any file within the regular source for joindin-web2. Wildcards work as does specifying part of the path in case the filename alone results in sniffing more files than you wanted.

To see a summary of the codesniff errors and warnings across the entire project, run

composer sniff

This will show the files that still need some attention.

Testing Code

We use PHPUnit for running unit tests against the joindin-web2 codebase.

To run PHPUnit tests, you can go the classic route:

vendor/bin/phpunit -c . tests/

You can also use composer to run your tests:

composer test

Code Coverage

Code coverage requires that xdebug be running. If you are using the joindin-vm Vagrant box, you can run your tests from within vagrant:

vagrant ssh
xon # note: this turns on xdebug
cd ~/joindin-vm/joindin-web2
composer test

You can see your code coverage report by going to http://localhost:63342/joindin-web2/build/coverage/index.html

License

The joindin-API is developed under a BSD-3 License. You can find the exact wording in the LICENSE-file

joindin-web2's People

Contributors

akrabat avatar cal-tec avatar cvuorinen avatar danielcraigie avatar dshafik avatar dstockto avatar erichogue avatar ericpoe avatar exussum12 avatar geeh avatar heiglandreas avatar iansltx avatar jamescowie avatar justincarmony avatar liam-wiltshire avatar lornajane avatar magicmonkey avatar martynthewolf avatar mcneely avatar michaelcullum avatar mishavantol avatar mrailton avatar mvriel avatar richsage avatar shaunmza avatar svpernova09 avatar tooooooooomy avatar warren5236 avatar wimg avatar zghosts 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

Watchers

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

joindin-web2's Issues

JOINDIN-246: Complete responsive template

Jira issue originally created by user clair:

At the moment the template is using a default Twitter Bootstrap template. I think so that it isn't such a big change, we should probably change the template to look like the original site

JOINDIN-244: Controller class initialisation needs rethinking

Jira issue originally created by user clair:

At the moment, each Controller class is initialised manually in index.php:

new Controller\Application($app);
new Controller\Event($app);

This is probably fine for now, but once the site grows it needs to be rethought so that each route doesn't need a whole new line

JOINDIN-254: Login system

Jira issue originally created by user clair:

Currently, there is no way to log into joind.in using the responsive site. We'll soon need this functionality

JOINDIN-255: Style event page

Jira issue originally created by user clair:

The event page is currently unstyled, so it would be nice to style and mark it up properly

JOINDIN-321: Use appropriate tags in layout.html.twig

Jira issue originally created by user clair:

Right now, each part of the main template (head, wrapper/content, foot) uses a div element, which isn't entirely semantic (and means we can't separate use of h1/h2 tags)

I'd really like to use the appropriate tags

JOINDIN-297: (Epic) Implement talks functionality

Jira issue originally created by user clair:

There's currently no talks implementation

Any work (or tickets created) to get this started would be great

Current decisions made:

  • The talk will have a slug which will be a MD5 (or similar) hash of the talk and event name and truncated to eg. 6 characters. It should probably be tested for uniqueness, and if not unique, truncated to one less/more character
    (The event name will be needed to be hashed, as a talk may be given in more than one event)

JOINDIN-296: Search joind.in API for an item if not found in local database

Jira issue originally created by user clair:

Currently, if a direct URL is visited, eg. m.joind.in/event/view/phptek-2013 and the particular slug 'phptek-2013' isn't known, then a 404 page is shown

Instead, we should search the API to try and find a correct event (perhaps doing a search for "phptek 2013"), and if this event isn't known (it isn't just a typo on the site visitor's behalf), save to the local database and show that event

This issue gives rise to JOINDIN-277

JOINDIN-368: Proposal: Refactor Responsive Site API calls to a Guzzle client

Jira issue originally created by user s_e:

After the Guzzle talk at PHPNW13 and a quick chat with [akrabat], [lornajane] and [~clair] I thought this would be an ideal modular way of calling the API for the responsive site, with a long-term view to having a simple Joind.in API client that could be used in any php-based site wishing to make use of Joind.in data.

I'm happy to be the one to (start) implement(ing) this.

Let me know if you have any comments or suggestions, like or dislike the idea?

JOINDIN-281: Create config option for API URL

Jira issue originally created by user clair:

At the moment, the API URL is hard-coded, so it is difficult to test using your own test data/API server

It would be nice if this could be configurable somewhere

JOINDIN-256: Change URL for events on homepage

Jira issue originally created by user clair:

Once the routing has been completed (JOINDIN-250), the URL on the homepage to the different events will need to be updated, so that they don't point to the main site

JOINDIN-299: Fail Gracefully when Mongo Unavailable

Jira issue originally created by user lornajane:

If mongo isn't installed or running, we get a pretty ugly error. Can we please catch this and put something friendlier, mostly for developers wanting to set up and work with the responsive site? Currently I see:

Slim Application Error
The application could not run because of the following error:

Details:

Message: An exception has been thrown during the rendering of a template ("Failed to connect to: localhost:27017: Transport endpoint is not connected").
File: /home/lorna/svndir/joindin/responsive/lornajane/Vendor/Twig/lib/Twig/Template.php
Line: 277
Stack Trace:

JOINDIN-259: Remove Blog module from responsive site

Jira issue originally created by user lornajane:

Looking at http://m.joind.in, we've copied the nav off the old site. As a minimum, we do not want to take the blog with us. I'm also not at all sure we want to keep the old UI as it's rather unintuitive. Thinking about the best way to support our users in their tasks would be WAY better.

JOINDIN-266: Optimise Combell image

Jira issue originally created by user clair:

At the moment, the Combell logo is relatively heavy, and we want to keep the responsive site light - currently, the logo is the largest item (in page weight) on the homepage

We would like the logo optimised as much as possible, without losing quality

Once done, please ping lornajane, who can get in touch with Combell to check that they are happy with the new image

JOINDIN-295: Event slugs don't check for duplicates

Jira issue originally created by user clair:

At the moment, event slugs are simply stripped of spaces and turned into lowercase. This means if two events have the same name, they will also have the same slug

We need to add functionality to make slugs more unique, for example appending a incrementing digit to the end (eg. phpnw-conference-1)

Setting as blocker as although no event probably share the same name at the moment, it's a possibility that it will (and may do in the future), and it may cause problems with the data

JOINDIN-286: Search date picker month not very clear

Jira issue originally created by user tog:

(Not sure if this is the old or responsive site, so please update accordingly. Happens on mobile Safari & Desktop Chrome.)

When performing a search for an event based on dates, and using the popup date picker, the text for the month at the top of the picker is white on a light background, so isn't easy to see. Should be darker text or background to make it easier to read.

Tested on...
iPhone/iOS 6.1.3/Safari
iPhone/iOS 6.1.3/Chrome v25.0.1364.124
MacBook Pro/OSX 10.8.2/Chrome v25.0.1364.172

JOINDIN-330: Find solution for map for touch screens

Jira issue originally created by user clair:

On a keyboard-and-mouse device, the maps on the events page look lovely and work in a nice way

However, on a touch enabled device, it doesn't work so well. It still looks lovely, but you can't scroll around to move the map around

JOINDIN-326: Give the /event page some TLC

Jira issue originally created by user clair:

A recent PR (which I've merged, as the page wasn't much use anyway) broke the /event page

It could really use:

  • Fixing!
  • Styling to look like something a little more interesting than just a list of
  • s with event names
  • Pagination adding

JOINDIN-345: Search for event/talk

Jira issue originally created by user clair:

We'd like some kind of search functionality for talks and events (as a single thing or separate thing - I don't mind)

We would need JOINDIN-277 to be completed before this can happen

JOINDIN-279: Allow both VMs to communicate

Jira issue originally created by user erichogue:

The new VM for the responsive site does not see the the VM used for the original site and the API. They need to be on the same network so the responsive site can use the API on the dev environment, not the live one.

JOINDIN-322: Add ARIA roles

Jira issue originally created by user clair:

For accessibility, it would be nice to include ARIA roles to the new template

JOINDIN-356: Array or Object in template: pick one

Jira issue originally created by user clair:

Right now, some controllers pass an object to the view, and some pass an array

This gets a little confusing, especially if we want to share common template files. So I think we should pick one and refactor where appropriate

I'm open to which one we go for (personally I'd go for an array, with the ability to use getters if we need to: because it's less work to use a field from the API)

JOINDIN-294: Event page model API not loading event

Jira issue originally created by user clair:

At the moment, the model for getting an event (/Model/API/Event/getBySlug()) is assuming that the ID for the event is known, and stored in the database

This is an incorrect assumption. Instead, we should use the 'uri' field, which will give us the correct API uri to load

JOINDIN-357: Event map page layout broken

Jira issue originally created by user clair:

On certain event map pages (it appears to be those with short names), the map page layout is broken and you get a really narrow page with the navigation underneath

JOINDIN-159: Stats like page for users

Jira issue originally created by user jthijssen:

There should be a statistics page for each user (https://joind.in/user/stats/{id}) where you can find all the statistics for that user. For instance:

  • How many conferences attended

  • How many talks per conference commented

  • Average rating given

  • Average comment lenght given

  • Talks given

  • Average talk rating

  • Average comment per talk

The current view page (https://joind.in/user/view/{id}) for some users (like me) are getting ridiculously long so maybe another feature would be just to collapse parts (like all the talks you commented on). Maybe then the stats could be placed on top of that page.

Also: badges (speaker badge when you have 1 claimed talk, "organizer" when you are conf-admin, superorganizer when you have 5 conf-admins, super-commenter when 50 comments etc..

JOINDIN-300: Responsive Site Needs DB Config

Jira issue originally created by user lornajane:

As a minimum we need to be able to configure the database name so that we can run both a test and a live site on the same box. This should be put into config/config.php.dist and the code adjusted to take account of it.

Please mention in the pull request that we need to update the config file on live when we deploy!

JOINDIN-351: Remove event slug from local site

Jira issue originally created by user clair:

We should remove the event slug from being generated by the site itself, and instead rely on using the API (to do the latter isn't in the scope of this ticket, I've created another ticket for that)

Instead, I propose a hash of the event name instead and using that to store in the local DB and use for URLs

JOINDIN-282: Configurable base URL

Jira issue originally created by user clair:

At the moment, URLs are relative to the root (eg. /event/) - for better compatibility with developer's setups, it would be nice if we could configure a base URL, so that they can run the site in a place such as example.com/joindin/

JOINDIN-257: Improve navigation buttons

Jira issue originally created by user clair:

At the moment, the navigation buttons in a narrow viewport (when they're not tabs) aren't too great. They really could do with making a little nicer and less scattered

JOINDIN-323: Add an About Page

Jira issue originally created by user lornajane:

Can we please add a basic "about" page for the new site? Definitely NOT copying the text of the old one, maybe just that we're working on this new site, email feedbackjoind.in if you like it (or don't) and other general feel-good words

JOINDIN-333: Add some extra bits to the frontpage

Jira issue originally created by user clair:

At the moment there isn't much to grab your attention on the homepage - any improvements that can be made to add more stuff that could be deemed useful to capture the conference-goer's attention would be really nice

JOINDIN-352: Use slug from API

Jira issue originally created by user clair:

If an event has a slug, then we should be able to accept it in the new site URL

This will, I think, need a feature in the API to be able to get an event by slug (a ticket has been created for this)

JOINDIN-301: Responsive Test Site Deploy Issues

Jira issue originally created by user lornajane:

Using the Jenkins task "Launchtest_responsive_site" I tried to launch a particular github branch (lornajane/routing_anddata). The job thinks that it completed correctly but when I visit http://test.m.joind.in I see a very old copy of the site, definitely not the code I just tried to deploy.

JOINDIN-291: Add Config to Responsive Deploy

Jira issue originally created by user lornajane:

Config file now in config/config.php.dist needs to be copied once onto live server, then symlinked to as config/config.php on each deploy.

JOINDIN-320: Minify javascript

Jira issue originally created by user clair:

To aid keep download requests/weight down, it would be nice to minify and possibly merge into one file all javascript files on build

Extra bonus points if we're able to minify other things on build too, such as our CSS file :)

JOINDIN-250: Fix routing for events and talks

Jira issue originally created by user clair:

At the moment, events and talks are routed in a similar fashion to the main site, but we don't want to use the API ID in the URL

Instead, we need to create new routing which will use its own ID/slug, potentially storing these in a database, and potentially using the event name as the slug. We probably don't want to use the talk title for the talk's slug, as this may not be unique

JOINDIN-328: Event pages don't show friendly error message

Jira issue originally created by user clair:

Currently, if MongoDB is down, you get a nice friendly error message when in development mode, which is lovely

But you don't get them when you visit an event page (eg. /event/view/northeast-php-2013), instead you get the Slim error message

JOINDIN-347: Use of 'use' statements at top of class files

Jira issue originally created by user tocacar:

Would it be nicer to use 'use' statements at the top of classes instead of using fully qualified class names when instantiating new objects, or as type hints in method signatures?

For instance, Joindin/Controller/Application.php, line 15:

$event_collection = new \Joindin\Model\API\Event();

could be:

$event_collection = new Event();

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.