Giter Club home page Giter Club logo

swpp2019-team15's People

Contributors

bgchun avatar dependabot[bot] avatar minji1234 avatar rachelg98 avatar taehwoi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

taehwoi tyj9327

swpp2019-team15's Issues

Using function decorators to handle exceptions

We currently use boilerplate ifs in our view.py in order to check validity of the request and user logins. I think it is a better to use decorators to write DRY code. These are example snippets of a decorator.

def check_request(view_func):
    def inner(*args, **kwargs):
        try:
            return view_func(*args, **kwargs)
        except (KeyError, json.JSONDecodeError) as e:
            return HttpResponseBadRequest(str(e))

    return inner

def login_required(view_func):
    def inner(request, *args, **kwargs):
        if request.user.is_authenticated:
            return view_func(request, *args, **kwargs)
        else:
            return HttpResponse(status=401)

    return inner

[alpha testing] question

question시 위치를 지정하지 않는 경우는 제출이 안되는데 위치만 지정하고 오른쪽 버튼들을 클릭하지 않은 경우는 제출이 됩니다.
그리고 위치를 지정하지 않아 제출이 안 될 경우 메세지같은걸 띄워주면 좋을 것 같습니다.

Project Diagnosis Symptoms

Code style

  1. Variable and function names lack consistency (E.g. camelcase, snakecase used interchangeably across files)
    • Solution: Reach consensus on function and variable naming convention.
  2. Some code from previous commits left as comments instead of removing
    • Solution: Clean up code in dev branch to remove unnecessary comments
  3. Lack of explanation for functions
    • Solution: add detailed explanations for functions

Wrong design

  1. Lack of error handling
    • Implement error handling

Low coverage

  1. Lack of test cases and low frontend coverage
    • Solution: create frontend and backend tests to reach coverage above 90%

Things to be implemented from peer feedback.

An incentive for an user to answer a question. (Karma system, points, achievements...)

A way to detect malicious users. (how off is the user's answer from the average?)

What to do when there are no replies from users?

ML.

Implemented Answer page

In pull request, you can check if my codes work well with your own browser.
When I tested code, it worked well at firefox.
When you clicked on answer button on main page you can go to answer page.
And if you answer to that question the answer is sent to question sender.

Adding new view which can check past questions and answers history

At main page if we click question in 'My Questions', the user can check that question.
So how about adding 'Past Questions' button in main page which renders past questions list.
If user clicks one of past question button then it renders like Detail Page.
I want to hear your opinions.

[Alpha testing] click on question on feed show me empty page

피드에 있는 질문을 선택했을 때 어떤 질문은 제대로 나오지만, 어떤 질문은 클릭했을 때 빈 화면으로 나옵니다.
어떤 조건에서 그런지 몰라서 더 자세한 사항은 말씀드리지 못할 거 같아요.

Add Bootstrap

Let's add bootstrap to our frontend to make the interface a bit easier on the eyes :)

answering question is slow

It takes around 0.02~0.04s to accomplish post question,
But it takes 0.7s to submit an answer. I don't know why, and am looking into it.

Enhance map feature

Currently, we can only place a marker at a map via search, but I think it would be nice to move the map with dragging, and tapping to create a marker.

Sending push notifications to users in frontend

When a Question is posted by a user to to the backend or an Answer to a Question has been posted, we need to implement a feature that can send web push notifications to clients in the target location. What are your thoughts on using websockets with Redis or Firebase Cloud Messaging to implement this feature?

Firebase
https://firebase.google.com/docs/cloud-messaging/http-server-ref#notification-payload-support

Redis
https://github.com/jrief/django-websocket-redis

[Alpha Testing] Follow Button

follow를 눌렀을 때 아무런 이펙트가 등장하지 않아서 follow가 된 건지 확인이 어려운 것 같습니다. 뭔가 간단한 이펙트를 넣어주면 좋을 것 같습니다!

Notifying users upon question creation and answer creation

In branch features/notify_users,
I have implemented a skeleton code that sends notification to every user that have subscribed upon question creation. ( The subscription check is done by send_push)
Can you please improve this method (better name? check if user is near the question's target location, ....)
and also implement method to be called upon answer creation? I believe the user pool to be notified upon answer creation is simple, lets just send to the owner of the question. (We might extend it by letting other users subscribe to a question they will be interested in.... but that's sometime later)

[Alpha Testing] Sidebar

현재 구현이 안된 상태라서 작동이 안되는 건지 모르겠으나 사이드바의 기능이 동작하지 않는 것으로 보입니다.

Missing subscribe button

I found there is no subscribe button in question page, though I remember when it existed.
I wonder if it has some problem so it was deleted from dev branch or not.
Was it deleted by fault or on purpose?

Design choice regarding user location

Yesterday we decided that the component that gets user location should exist in every page.
Now I think getting user location only in the main page and the map page is a better idea, since

  1. The main page (once we implement the feed feature) and the map page is the only page that requires user location.
  2. The user should spend most of their time in the main page(again, once we implement the feed feature).

What are your thoughts?

Adding map on Answer page

It will be much better if there is marker on location which shows question_location.
I tried reusing our GoogleMap by transferring location information from NewAnswer.js, but it was not that easy.
I will try it again tomorrow if nobody has interest on it.

Fix onClick function for Q&A cards

Currently the Question and Answer view cards automatically redirect to Question detail page on click. It's prone to users being unintentionally redirected when trying to highlight text or accidental clicking which can be a bit annoying.

Perhaps we can restrain the onClick function to only the Question text instead and allow the user to view a person's profile by clicking on the username. What do you guys think?

Following a question.

As of now, when a question is answered, we only send a notification to the user who wrote the question.

However, I think it would be nice if users can 'follow' a question they are interested in from the main page.

[TIP] Configuration guide to use mysql

For mac OS

Finally,

sudo mysql -e "CREATE DATABASE Askat_DB DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;"
sudo mysql -e "CREATE USER 'Askat'@'localhost' IDENTIFIED BY '1234';"
sudo mysql -e "GRANT ALL PRIVILEGES ON Askat_DB.* to 'Askat'@'localhost';"
sudo mysql -e "GRANT ALL PRIVILEGES ON test_Askat_DB.* to 'Askat'@'localhost';"

[TIP] If you have a problem starting backend

Follow below.

Go to swpp2019-team15/oga/backend/

  1. sudo mysql
  2. SHOW DATABASES;
  3. DROP DATABASE Askat_DB;
  4. CREATE DATABASE Askat_DB;
  5. ctrl+D
  6. python manage.py migrate
  7. python manage.py makemigrations
  8. mysql.server start
  9. python manage.py createcachetable(recommendation works)
  10. python manage.py runserver

Now you can run backend.

  • This tip was provided by @taehioum

Storing user consent in local storage.

I think this information can be safely stored in local storage.

The functions that require the permissions will only execute when the permissions are valid.

Add rating feature

  • Add rating field to Answer model

  • Prevent users from making duplicate ratings

  • Users can change ratings made on an answer

  • Add point system based on answer ratings

  • Display user rank based on accumulated points

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.