Giter VIP home page Giter VIP logo

atila-angular's Introduction

atila-angular

The front-end app used to power Atila.

CircleCI

Getting Started

You may need to set up a separate Django Application using the django-rest framework, the app should be using a PostgreSQL database.

We try to use a decentralized approach so your Django and Angular application should be able to operate completely independently of each other. They should also be kept in separate repositories.

Here are some tutorials to get you started:

Official Django Rest Framework Tutorial

Techie Diaries Tutorial

Firebase Cloud Functions

This app also utilizes some cloud functions for various backend tasks.

They can be found in the functions folder.

To deploy: firebase deploy --only functions:fcmSend

atila-angular's People

Contributors

ademidun avatar

Watchers

 avatar

atila-angular's Issues

Improve Registration WorkFlow and UX

Make the process of registration easier:

Instead of one long registration form break into 2 processes:

  • username, email, password, first and last name -> register

  • After registration is complete, THEN ask the remaining questions.

Algorithm Brain Teaser - Scholarship Cache

Vikram is looking for scholarships to help him pay for school.
He has 2 arrays, A and B.
A is a cache of Vikram's scholarships as an array of primary keys.
B is an array of scholarship objects matching Vikram's profile.
Vikram needs to sort the objects in B based on the PKs of A, to get a new B (B_2).
Vikram needs it done in less than O(n^2) time so he doesn't get bored and starts browsing Reddit.

e.g.
A = [3,139,47] # arbitrary order
B = [{pk:139,name:'Scholarship X'},{pk:47,name:'Scholarship Y'},{pk:3,name:'Scholarship Z'}]
B_2 = [{pk:3,name:'Scholarship Z'},{pk:47,name:'Scholarship Y'},{pk:139,name:'Scholarship Z'}]

Current (very slow) solution:

    # A = user_profile.scholarship_cache, B = scholarships
    scholarships = Scholarship.objects.filter(pk__in=user_profile.scholarship_cache)

    scholarships = list(scholarships)
    ranked_scholarships = []

    # todo fix bottleneck 0(n^2)
    for pk in user_profile.scholarship_cache:
        scholarship = [scholarship for scholarship in scholarships if scholarship.pk == pk]
        ranked_scholarships.extend(scholarship)
    scholarships = ranked_scholarships

Refactor URLs to allow lazy-loading

In order for lazy loading to work the urls should be refactored to use a hierarchical path structure:

E.g

  • atila.ca/scholarships-list -> atila.ca/scholarships/
  • atila.ca/scholarships-detail/<scholarship-slug> -> atila.ca/scholarships/s/<scholarship-slug>
  • atila.ca/add-blog -> atila.ca/blog/add

Note this means some words will not be valid for usernames and must be prevented from being submitted. Or is there a better way of doing it?

Add More Question Fields to Edit Profile

Include question input fields for the following fields to edit-user profile component.

ETHNICITY
COUNTRIES
LANGUAGE
RELIGION
ACTIVITIES
SPORTS
DISABILITY

All these fields should include autocomplete functionality and be populated with fields from constants.ts.

They should behave similar to the autocomplete fields in register component. i.e:
-Allow multiple selections.
-Save to userProfile object as an array.
-One Difference: Don't allow user input if user choice is not in list.
-Clear text from input field once it has been selected.

Display one scholarship per Row and Show More details on Hover

I think it would be easier for the user to browse scholarships if:

  • each scholarship was displayed on one row, especially on the larger desktops.

  • We can also show more details like scholarship.deadline, scholarship.description, scholarship.extra_criteria etc.

Currently the description for scholarships over a certain length is truncated.

  • When the user hovers over a card, more details should be shown.

  • There should be also a show more/less that toggles showing or hiding the full scholarship description

see this link for a sample scholarship object: http://jsoneditoronline.org/?id=07b1770ad870a8b4cc092d3e60c34eca

Recommended Items Feature

If a user clicks on a forum, scholarship-detail or reaches the end of the scholarships-list page. They should be notified of scholarships or forums that they may be interested in.

This could get pretty complex quickly (deep learning recommendation algorithms, cookies and caching to ensure new results etc.) so just try to implement a very simple working v1 first.

This may require making a new view in the django-seed backend repo. If so add it as a view function in the helper/views.py file.

It should return a json response of related items.

Regex Script to Automatically Open Links in a new Window

Write a script that will:

  1. Add a target='_blank' attribute to all link elements in a given html.
  2. Only for scholarship.criteria_info Rremove all style and class attribute

e.g
Input = <h4><a href="https://www.rbccm.com/" style="color:red">Application Requirements</a></h4>

Output = <h4><a href="https://www.rbccm.com/" target="_blank">Application Requirements</a></h4>

Implement it wherever the following gets updated or created:

  • scholarship.criteria_info in add-scholarship

  • blogpost.body in blog-post-create

  • Bonus: Don't add the target="_blank" attribute for elements with links in the atila.ca domain.

  • Bonus: Implement the script in both javascript and python.

  • Create unit tests to verify that it works.

Switch from Google App Engine for SEO serverside/pre rendering

  • We currently prerender Atila because it is good for SEO and social media link previews

  • We currently use headless Chrome, rendertron on App Engine but it is way too expesive(~$90/month).

  • Fine when we had Google Cloud for Startup Credits and we didn't care about costs but now that it has expired we need to find an alternative.

See this issue: #8

and this commit for more info: 134c000

Improve Landing Page Design

Make the landing page look nicer.

The only suggestion I have is:

  • Replace landing page background with gradient

Here is an idea of what I was thinking:
new-atila-landing3

The rest is up to you, use your creativity and judgement

Replace Constants.ts with open Source Options for Form Values

  • Replace the values in constants.ts with Open Source choices:

Sports List
Activities List
Countries List
Languages List
Majors List Source
Universities List
Religion List
ETHNICITIES List
DISABILITY List

Diet Types and Allergies List
Blood Types
http://kidshealth.org/en/teens/blood-types.html#

  • TODO: Find links for lists that are missing links.

Create an open source repo on Github awesome-form-values on the Atila Github organization page.

Refactor Add Scholarship Page

Some parts of the The add-scholarship template looks weird. If you open the /add-scholarship route on the browser you will see what I mean. Unaligned buttons, not responsive on mobile, confusing etc.

Try to make it look nicer and see if you can make it simpler and more intuitive for the user.

Prevent Views Double Count When Sort By is Clicked

When the user changes the sort by option, we would like to prevent all the views from being double counted.

this.preventSortByDoubleCount keeps reverting to undefined even after the boolean is set.

In this commit b2c731d

Source:

sendScholarshipInteraction(actionType) {
 if (this.preventSortByDoubleCount) {
    // don't record view
 }
}

Improve Comments Display

If a comment is too long (300 characters?) it should be truncated and a see more link should be displayed.

If a user profile is hovered over, the user's full name, profile picture, title and school should be displayed in a tooltip similiar to facebook or twitter.

Some tips to get you started:

forum:https://api.myjson.com/bins/ppr2h
mock forum comments: https://api.myjson.com/bins/u02mh

If Django is configured, a call to http://localhost:8000/api/forum/forums/<forum_id>/comments/ can also be used and the response should be similar to the link above.

Add Infinite Scrolling to Scholarships List

  • Use infinite scrolling instead of pagination to potentially help increase user engagement.
  • Add either a load more button or a "drag to refresh" feature to show more scholarships.
  • Add a scroll to top button when bottom of page is reached

Refresh new objects to Facebook and Twitter cache.

In order for links to look pretty on social media (Facebook, twitter etc.) we want to auto-refresh the object caches on Facebook and Twitter when they are first created.

Develop a service that sends the urls of new objects (scholarship detail, forums, blogs) to twitter, facebook etc. for caching.

See this for more information:
Test the following debuggers with scholarship links on Atila. Try using both new scholarships and the same link multiple times.
Facebook Debugger
Twitter Debugger

This may help to get you started
Updating Objects Facebook: (API Changes)
How to Update Twitter Card Cache with API

Collect Program and School Info for Registered Users

If the user is logged in and is missing eligible_programs, eligible_schools or gender information:

  • a dialog should come up asking the user to submit new information for gender, eligible_programs, eligible schools.

  • The dialog should show up on scholarships-list or scholarship-detail page.

  • The program and schools dialog should use the autocomplete directives and the array constants. With the option to enter a new value if not in list.

  • The user then has the option to either fill the form, remind me later or don't ask again.

  • User user_profile.preferences field to track metadata state such as if remind me later or don't as again was selected

Sample user_profile object: http://jsoneditoronline.org/?id=2cf30cbecf54eda24b60aab07adf759d

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.