GithubHelp home page GithubHelp logo

swpp2020-team13's Introduction

Goaling Ball: Your goal management service.

Build Status Coverage Status Quality Gate Status

๐Ÿšจ Travis CI not recognizing postgreSQL properly, resulting in build failure

Deployment

Deployed on: https://www.goalingball.com/

How to start

Frontend

cd frontend
yarn install // to install packages
yarn start // start frontend

Backend

  1. Add .env file to /backend/config

  2. Start virtual environment

    virtualenv --python=python3.7 venv
    source venv/bin/activate
    
  3. Install requirements

    pip install -r requirements.txt
    
  4. Start server

    python manage.py runserver
    

swpp2020-team13's People

Contributors

jiyewise avatar chanwooluciolee avatar songbird39 avatar hhjjpp avatar hy00nc avatar kooyunmo avatar

Watchers

Byung-Gon Chun avatar James Cloos avatar Alchan Kim avatar Won Wook SONG avatar Jangho Seo avatar Donghyun Kim avatar  avatar  avatar

swpp2020-team13's Issues

Task title checkmark issues

image
image
The checkmark doesn't show when first displaying the goal detail page, so it is difficult to find where to click to see the task details. Then after clicking, the checkmark doesn't disappear when another task is selected.

Suggested improvements:

  1. show all checkmarks anytime (+ optional: display red checkmark for the selected task)
  2. show the task details when the task title is clicked, and display checkmark only for the selected task

All tasks are displayed, regardless of the day of the week settings

How to generate the bug:
Create any goal, then create any task that is repetitive with the days of the week setting.

What was expected:
The tasks for today should be displayed for default, then when the "Show all tasks" button is toggled on, other tasks should be shown as well

What happened:
No tasks are displayed for default (including the tasks for today), then when the "Show all tasks" button is toggled on, all tasks are displayed, including the tasks not for today.

There was a mistake with the task deadlines! Sorry!

New task can be created with no input data

How to generate: in add task modal, click submit button without any input data.
What was expected: an alert message asking user to submit task data
What happened: an empty task created

Handling DataTime (from backend to frontend)

  1. Backend
    Import python datetime library.
    datetime.timestamp() will convert datetime into seconds from epoch(Jan 1st, 1970)
    Send it.

  2. Frontend
    Import moment library.
    You can format a given seconds as you want.

Cannot delete tasks

image
Clicking on the delete button doesn't trigger anything, except for the error message on the console.

In mock data testing

test goal๊ฐ™์€ ์ •๋ณด๊ฐ’์ด ์—†๋Š” goal๋“ค๋ณด๋‹ค ์ €ํ•œํ…Œ ์ €๋ฒˆ์ฃผ์— ๋ณด๋‚ด์ฃผ์…จ๋˜ data๊ฐ™์€ ์ผ๊ด€๋œ user / goal / task-achievement ์„ธํŠธ๋“ค์„ ์ถ”๊ฐ€ํ•ด ์ฃผ์‹œ๋ฉด ๊ฐ์‚ฌํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

Access sagemaker endpoint via URL (with Lambda & API Gateway console)

Sagemaker endpoint of blazingtext model can be accessed via sending POST request to a URL.
The method is done by AWS lambda and API Gateway console in AWS.
For the implementation method in detail, refer to the following link:

https://aws.amazon.com/blogs/machine-learning/call-an-amazon-sagemaker-model-endpoint-using-amazon-api-gateway-and-aws-lambda/

How to use

URL: https://tsiik55j32.execute-api.us-east-1.amazonaws.com/test/blazingtext
Note: currently the endpoint is closed due to charging issues

Send a POST request, with JSON body with the following format:

{"data":["word1", "word2", "word3"]}

If the process is done without errors, the response would be:

{
statusCode: 200,
body: [ { vector: [], word: "word1" },  { vector: [], word: "word2" },  { vector: [], word: "word3" } ]
}

Refinements for the project!

main & create & edit & dashboard ๊ทธ๋ฆฌ๊ณ  explore๊นŒ์ง€ ํ•ต์‹ฌ ๊ธฐ๋Šฅ์˜ ๊ตฌํ˜„์ด ๋๋‚ฌ์Šต๋‹ˆ๋‹ค! ๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰
๊ธฐ๋Šฅ ๊ตฌํ˜„์ด ๋๋‚ฌ์Œ์„ ๊ธฐ๋…ํ•˜์—ฌ ์„ธ๋ถ€์ ์œผ๋กœ ๋ณด์™„ํ•  ๋ถ€๋ถ„(cornercase ํ•ธ๋“ค๋ง)๊ณผ optional feature๋“ค์„ ์ •๋ฆฌํ•ด ๋ณด์•˜์Šต๋‹ˆ๋‹ค.

  • ์œ ์ €๊ฐ€ create goal / edit goal์—์„œ ์‚ฌ์ง„์„ ์ถ”๊ฐ€ํ•˜์ง€ ์•Š์€ ๊ฒฝ์šฐ
    1. ์œ ์ €๊ฐ€ create goal์—์„œ ์‚ฌ์ง„์„ ์ถ”๊ฐ€ํ•˜์ง€ ์•Š์œผ๋ฉด ์šฐ๋ฆฌ๊ฐ€ ์„ค์ •ํ•œ default URL๋กœ ์„ค์ •
    2. ์œ ์ €๊ฐ€ edit goal์—์„œ ์‚ฌ์ง„์„ ์ถ”๊ฐ€ํ•˜์ง€ ์•Š์œผ๋ฉด ๊ธฐ์กด ์‚ฌ์ง„ ์œ ์ง€
  • Add achievement axios
    1. create goal๊ณผ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ์œ ์ €๊ฐ€ ์‚ฌ์ง„์„ ์ถ”๊ฐ€ํ•˜์ง€ ์•Š์œผ๋ฉด ์šฐ๋ฆฌ๊ฐ€ ์„ค์ •ํ•œ default URL๋กœ ์„ค์ •
  • Edit achievement axios
    1. edit goal๊ณผ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ์œ ์ €๊ฐ€ ์‚ฌ์ง„์„ ์ถ”๊ฐ€ํ•˜์ง€ ์•Š์œผ๋ฉด ์šฐ๋ฆฌ๊ฐ€ ์„ค์ •ํ•œ default URL๋กœ ์„ค์ •
    2. Edit ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด achievement form์ด ๋œจ๋Š”๋ฐ ์—ฌ๊ธฐ์— ๊ธฐ์กด achievement ์ •๋ณด๊ฐ€ ๋‹ด๊ฒจ ์žˆ์–ด์•ผ ํ•จ
  • Plugging in edit task axios to taskbody components
  • Frontend Testing
  • Backend Testing
  • Search ๊ธฐ๋Šฅ: explore page์—์„œ ํ‚ค์›Œ๋“œ ์ž…๋ ฅํ•˜๋ฉด ํ‚ค์›Œ๋“œ์— ํ•ด๋‹นํ•˜๋Š” goal ๋„์›Œ์คŒ
  • Deployment
    1. ์‹ค์Šต์ˆ˜์—… ์ „์— deploy ๋๋‚ด๊ธฐ
    2. ์‹œ๊ฐ„ ์—ฌ์œ ๊ฐ€ ๋˜๋ฉด, ์œ ์ €๊ฐ€ ์ƒˆ๋กœ ๊ฐ€์ž…ํ–ˆ์„ ๋•Œ ์•„๋ฌด๊ฒƒ๋„ ์—†๋Š” ์ƒํƒœ์—์„œ ์‹œ์ž‘ํ•˜๋Š” ๊ฒŒ ์•„๋‹ˆ๋ผ ํŠœํ† ๋ฆฌ์–ผ goal ๊ฐ™์€ ๊ฑธ ํ•˜๋‚˜ default๋กœ ๋œจ๊ฒŒ ํ•ด์„œ ์‚ฌ์šฉ์ž๊ฐ€ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์— ์นœ์ˆ™ํ•ด์ง€๋„๋ก ํ•˜๊ธฐ
  • Optimization
    1. S3 bucket caching
    2. ML API gateway caching
  • UX
    1. ๋กœ๊ทธ์ธ ์‹คํŒจํ•˜๋ฉด ๋ฉ”์‹œ์ง€๋‚˜ alert

API for adding and deleting tags

We might create a separate model for tags.
Either way, we will need to determine API scheme (url patterns) for adding and deleting tags.

Solution 1
(POST) "api/v1/goals/<goal_id>/tag : create a new tag (presumably one by one)
(PUT) "api/v1/goals/<goal_id>/tag/<tag_id> : update a specific tag
(DELETE) "api/v1/goals/<goal_id>/tag/<tag_id> : delete a specific tag

Solution 2
(POST) "api/v1/tags : create a new tag (a goal id is included in the request body)
(PUT) "api/v1/tags/<tag_id> : update a specific tag (a goal id is stored in a tag instance)
(DELETE) "api/v1/tags/<tag_id> : delete a specific tag (a goal id is stored in a tag instance)

Which one looks better?

Goal & Task์—์„œ time duration feature update

ํ˜„์žฌ๋Š” goal์ด๋‚˜ task๋ฅผ ๋งŒ๋“  ๋‚ ์งœ๊ฐ€ ์ž๋™์œผ๋กœ goal / task์˜ ์‹œ์ž‘ ๋‚ ์งœ๋กœ ์„ค์ •์ด ๋˜์—ˆ์ง€๋งŒ,
์‚ฌ์šฉ์ž๊ฐ€ ๋ฏธ๋ž˜์˜ goal์ด๋‚˜ task๋ฅผ ๋ฏธ๋ฆฌ ๋งŒ๋“ค๊ณ  ์‹ถ์„ ์ˆ˜ ์žˆ๋Š” ๋“ฑ ์‹œ๊ฐ„ ์„ค์ •์—์„œ ์‚ฌ์šฉ์ž์—๊ฒŒ ์ข€๋” ์œ ๋™์„ฑ์„ ์ฃผ๊ธฐ ์œ„ํ•ด backend goal/task์— 'start_at' feature๋ฅผ ์ถ”๊ฐ€ํ–ˆ๊ณ  ์•„๋ž˜์™€ ๊ฐ™์€ feature update๋ฅผ ์ง„ํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค.

  1. Goal feature update
    ์ฆ‰ ํ˜„์žฌ ๋‚ ์งœ๊ฐ€ 11/29์ผ์ด์–ด๋„, 12/21-2/20 (๊ฒจ์šธ๋ฐฉํ•™ ๋•Œ ํ• ์ผ goal์„ ๋ฏธ๋ฆฌ ๋งŒ๋“ ๋‹ค๋˜์ง€) duration์„ ๊ฐ€์ง„ goal์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
    ์ด๋•Œ ๋‹ฌ๋ ฅ์—์„œ 11/29์ผ์„ ์„ ํƒํ•˜๋ฉด ํ•ด๋‹น goal์ด ์‹œ์ž‘ ์ „์ด๋ฏ€๋กœ ์•ˆ ๋œจ์ง€๋งŒ 12/22๋ฅผ ์„ ํƒํ•˜๋ฉด ํ•ด๋‹น goal์ด ๋œน๋‹ˆ๋‹ค.
    start_at๋Š” ์œ ์ €๊ฐ€ ์•„๋ฌด ์„ค์ •๋„ ์•ˆํ•  ๊ฒฝ์šฐ default๋กœ ์˜ค๋Š˜ ๋‚ ์งœ 00:00:00 ๊ฐ’์œผ๋กœ timestamp ํ˜•ํƒœ๋กœ ๋ฐฑ์—”๋“œ์— ๋ณด๋‚ด์ง‘๋‹ˆ๋‹ค. ์ฆ‰ start_at๊ฐ€ none์ด ๋  ์ผ์€ ์—†์Šต๋‹ˆ๋‹ค.

  2. Task feature update - date
    ์˜ˆ๋ฅผ ๋“ค์–ด 12/21-2/20 goal ๋‚ด์—์„œ 12/21-30์—๋งŒ ํ•ด๋‹นํ•˜๋Š” task๋ฅผ ๋งŒ๋“ค๊ณ  ์‹ถ๋‹ค๊ณ  ํ•  ๋•Œ, add task form์—์„œ start date 12/21์„ ๊ณ ๋ฅด๊ณ  deadline์—์„œ 12/30์„ ๊ณ ๋ฅด๋ฉด ๋ฉ๋‹ˆ๋‹ค. ์ด๋•Œ ๋‹ฌ๋ ฅ์—์„œ 12/31์„ ์„ ํƒํ•˜๋ฉด ํ•ด๋‹น task๋Š” ๋œจ์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
    Recurrentํ•œ ๊ฒฝ์šฐ (๋งค์ฃผ ์›”์š”์ผ์—๋งŒ ํ•œ๋‹ค๋˜์ง€) ์—๋งŒ deadline์ด ์žˆ๊ณ  ์ผ์‹œ์ ์ธ task๋Š” deadline์ด ์—†๋Š” ๊ฑธ๋กœ ์ฒ˜์Œ์— ์Šคํ”„๋ฆฐํŠธ ๋•Œ ํ•ฉ์˜๊ฐ€ ๋˜์—ˆ์—ˆ๋Š”๋ฐ ์ด ํ•ฉ์˜๋ฅผ ๋ฐ˜์˜ํ•ด์„œ day_of_week๊ฐ€ ๋น„์–ด ์žˆ์œผ๋ฉด start date๊ฐ€ '์ผ์‹œ์ ์ธ ๋‚ ' ์ด ๋˜๊ณ  deadline์€ ์ž๋™์œผ๋กœ start date์™€ ๊ฐ™์•„์ง‘๋‹ˆ๋‹ค. ์ด๋•Œ day_of_week๊ฐ€ ๋น„์–ด ์žˆ์œผ๋ฉด ์ž๋™์œผ๋กœ ์„ค์ •๋œ deadline์€ readOnly๊ฐ€ ๋˜์–ด ์œ ์ €๊ฐ€ ํ”„๋ก ํŠธ์—์„œ ์ž„์˜๋กœ ๋ฐ”๊ฟ€ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. day of week๋ฅผ ์ถ”๊ฐ€ํ•˜๋ฉด readonly๊ฐ€ ํ•ด์ œ๋˜์–ด ์œ ์ €๊ฐ€ ๋ฐ๋“œ๋ผ์ธ์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ๊ณ ์š”.
    ๊ทธ๋ฆฌ๊ณ  task start date๊ฐ€ goal start date๋ณด๋‹ค ์•ž์ง€๋ฅธ๋‹ค๊ฑฐ๋‚˜ (12/21์— ์‹œ์ž‘๋œ goal์ด๋ฉด ๊ทธ goal์˜ task๋Š” 12/21๋ถ€ํ„ฐ ๊ฐ€๋Šฅ) task deadline์„ goal deadline๋ณด๋‹ค ๋Šฆ๊ฒŒ ์œ ์ €๊ฐ€ ๊ณ ๋ฅผ ๊ฒฝ์šฐ alert ์ฐฝ์ด ๋œจ๊ณ  ์ž๋™์œผ๋กœ goal deadline์œผ๋กœ ์„ค์ •๋˜๋„๋ก ํ•ด ๋†“์•˜์Šต๋‹ˆ๋‹ค.

  3. Task feature update - weekday
    Task๊ฐ€ 12/21-30, ๋งค์ฃผ ํ† ์š”์ผ๊ณผ ์ผ์š”์ผ๋กœ ์„ค์ •๋˜์–ด ์žˆ๋‹ค๋ฉด ํ•ด๋‹น ๊ธฐ๊ฐ„์ด์–ด๋„ ์š”์ผ์ด ๋‹ค๋ฅด๋ฉด task๊ฐ€ ๋ฉ”์ธ ํŽ˜์ด์ง€์—์„œ ๋ณด์—ฌ์ง€์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด ์˜ค๋Š˜ ๋‚ ์งœ๊ฐ€ 12/21-30 ์‚ฌ์ด์— ์žˆ์ง€๋งŒ ๊ธˆ์š”์ผ์ด๋ฉด ํ† , ์ผ ์„ค์ •๋œ task๋Š” ์•ˆ ๋ณด์ด๊ฒŒ ํ•ด ๋†“์•˜์Šต๋‹ˆ๋‹ค.
    -> ์ด ๋ถ€๋ถ„์€ ์š”์ผ์ด ๋‹ค๋ฅด๋ฉด ์•ˆ๋ณด์ด๊ฒŒ ํ• ์ง€ ์•„๋‹ˆ๋ฉด ์ƒ‰์„ ์—ฐํ•œ ํšŒ์ƒ‰ ๋“ฑ์œผ๋กœ ๋‹ค๋ฅด๊ฒŒ ํ• ์ง€ ์ข€๋” ๊ณ ๋ฏผํ•ด๋ณผ๊ฒŒ์š”.
    -> taskbar์— ํ•ด๋‹น task๊ฐ€ ์–ธ์ œ ์‹œ์ž‘ํ•ด์„œ ์–ธ์ œ ๋๋‚˜๋Š”์ง€, ๊ทธ๋ฆฌ๊ณ  ๋ฌด์Šจ๋ฌด์Šจ ์š”์ผ์— ๋ฐ˜๋ณต๋˜๋Š”์ง€ ๋œจ๊ฒŒ ํ•  ์˜ˆ์ •์ž…๋‹ˆ๋‹ค. ์ด๊ฑด ์•„๋งˆ ์˜ค๋Š˜ ํ•  ๊ฑฐ ๊ฐ™๋„ค์š”.

ํ”„๋ก ํŠธ์™€ ๋ฐฑ์—”๋“œ ๋ชจ๋‘ ์ด feature๋ฅผ ๋ฐ˜์˜ํ•ด์„œ ์ˆ˜์ •ํ•˜์˜€์œผ๋ฉฐ ํ”„๋ก ํŠธ ์ƒ์—์„œ ์ž˜ ์ž‘๋™ํ•˜๋Š”์ง€ ํ™•์ธํ•˜์˜€์Šต๋‹ˆ๋‹ค.
๋‹ค๋งŒ ๊ธฐ์กด์˜ goal๋“ค์„ getํ• ๋•Œ start_at์ด ์—†์œผ๋ฏ€๋กœ ์—๋Ÿฌ๊ฐ€ ๋‚  ์ˆ˜ ์žˆ์œผ๋‹ˆ ๋จผ์ € django admin์œผ๋กœ ์˜ˆ์ „์— ์ถ”๊ฐ€ํ•œ goal๋“ค์„ ์‚ญ์ œํ•œ ํ›„ ํ…Œ์ŠคํŠธ ํ•ด๋ณด์‹œ๊ธธ ๋ฐ”๋ž๋‹ˆ๋‹ค.
ํ…Œ์ŠคํŒ…์ด ๊ผฌ์ผ ๊ฒƒ ๊ฐ™์•„ ์ผ๋‹จ develop์—๋Š” ํ‘ธ์‹œํ•˜์ง€ ์•Š๊ณ  jiye-frontend-dateChanges ๋ธŒ๋žœ์น˜์— ํ‘ธ์‹œํ•ด ๋‘์—ˆ์Šต๋‹ˆ๋‹ค.

Please update development status in README

Everyone, please update branch development status in github-master branch-README.

You can also use Notion for markdown syntax, put don't forget to paste it to README after updating it into Notion.
This is for preventing any confusion, overlapping, or conflicts in development.

I have updated development status for branch 'jiye-backend-goalcrud' as an example.
Thank you!

JSON format for Goal CRUD

What would be JSON response format for GET/POST/PUT in Goal CRUD?
While implementation, I have arbitarily set the JSON format as:

  1. For goalList(/goals/) : GET : list of {'title': goal.title, 'photo': goal.photo, 'user': goal.user.id}
  2. For goalList(/goals/) : POST : {'title': new_goal.title, 'photo': new_goal.photo, 'user': new_goal.user.id}
  3. For goalDetail(/goals/:id) : GET : {'title': goal.title, 'photo': goal.photo, 'user': goal.user.id, 'created_at': str(goal.created_at) }
  4. For goalDetail(/goals/:id) : PUT: {'title': goal.title, 'photo': goal.photo, 'user': goal.user.id, 'created_at': str(goal.created_at), 'updated_at': str(goal.updated_at)}
    Is there ideas or suggestions regarding JSON response format?
    Thanks!

URL formatting

As far as I remember, the URL formatting of our pages was not decided. It should have been discussed before sprint 2, but I guess our minds were too busy at that time. When I tried to find our previous decisions, I discovered some inconsistencies in our documents.

Below is what our first few sections say:

  • Intro page (/)
  • Main board (goals) page (/main)
  • Dashboard page (/dashboard)
    • Goal-detail-page (/dashboard/{:goal_id})
  • Explore page (/explore)
  • Profile page (/profile)
    • Edit-profile-page (/profile/edit)

and following is what our Frontend Component per page section says:

  • Intro page (/)
  • Main board (goals) page (/<:username>/main)
  • Dashboard page (/<:username>/dashboard)
    • Goal-detail-page (/<:username>/dashboard/{:goal_id})
  • Explore page (/explore)
  • Profile page (/<:username>/profile)

It seems that we haven't done any proper discussion after TA feedback, and didn't arrive at any agreement regarding this issue. This may be a long talk to have here so I will bring this up at our meeting tonight. (This issue is for the record.)

There will be no extra API for adding and deleting Tags

This is a follow up for issue#4 (API for adding and deleting tags)

Tags will be a field in Goal and you will be able to fetch them by simply goal.tags (goal is an instance that is fetched from backend by /api/goals/<goal_id/ )

There will be no partial update for tags.
You should send a full list of tags if you want to update them.
ex) If your current tags are:
["apple", "banana"]
and you want to add "orange" and remove "banana", then you should send like below:
tags: ["apple", "orange"]

The logic to handle it will be implemented in frontend.

For your information, that is exactly how you update day_of_week field in Task.

Tasks starting after the goal deadlines are accepted without any alert

image
The tasks starting before the goal start / ending after the goal end are all rejected by the service, but if the starting date is set after the deadline it is accepted and saved. Although it is not displayed on the main screen, it is still visible on the task list. (look at the Purchase a guidebook with designs task in the screenshot)

Tips for React Hooks declaration orders

Inside Auth.jsx in frontend, we are navigating between CreateSignupForm() and CreateLoginForm().

The thing is, both CreateSignupForm and CreateLoginForm are using React Hooks.
If the order of hooks declarations in CreateSignupForm and CreateLoginForm are not consistent,
it will result in mixed order of hook declarations in Auth.jsx, which invokes CreateSignupForm and CreateLoginForm.

So please be careful when you declare a hook or change the order of hooks in CreateSignupForm and CreateLoginForm.

Deadline with Unix Timestamp

We are using a unix timestamp format both in backend and frontend.
Deadline, which is a DateTime field, is converted to a unix timestamp when a json response is constructed.

When adding a new goal on the frontend side, deadline is modified to 23:59:00 of the original day.
For example, if a deadline is Nov 17, 2020 then frontend will change it to 23:59:00 Nov 17, 2020.
The updated deadline will be converted to a unix timestamp and then sent to the backend.

The motivation of forcing 23:59:00 suffix to deadline is to fix a bug that a new goal is not showing up when the deadline of the goal is the same as today.

I've decided to handle the 23:59:00 suffix on the frontend side in order to keep backend views.py clean.

The default value of "recurrent" field in Task model

What is the default value of "recurrent" field in Task model supposed to be? True or False?
What would be a more common case?

In fact, we can indicate that some task is not recurrent by setting day_of_week field as "NONE."
Do we still need this field? Would it be better to leave it or not?

Order of goals are getting messed up after adding task

How to generate bug:

  1. Add goal 1, 2, 3 in order => goal 1, 2, 3 shows up in order
  2. Add task in goal 2 => order of goal list changes: 1, 3, 2
  3. Add taskA in goal 2 => taskA is added in goal3, not 2

What happened:
I guess the actual order of goal(created order) hasn't changed, but the order shown in the list is changing..?
So the actual order of goals is : 1, 2, 3 / but it is listed in : 1, 3, 2
So when we add a task to goal 2(actually goal 3) it is added to goal3 (actually goal 2)

+no error message on console

When reporting bugs

์—๋Ÿฌ๊ฐ€ ๋‚ฌ์„ ๊ฒฝ์šฐ F12๋ฅผ ๋ˆ„๋ฅด๋ฉด console.log์— ์–ด๋–ค ์—๋Ÿฌ๊ฐ€ ๋–ด๋Š”์ง€ ๋‚˜ํƒ€๋‚  ๊ฒƒ์ž…๋‹ˆ๋‹ค
๋ฒ„๊ทธ ๋ฆฌํฌํŒ… ํ• ๋•Œ ์–ด๋–ป๊ฒŒ generate bug / expected behavior ๋ž‘ ๊ฐ™์ด console.log์— ์–ด๋–ค ์—๋Ÿฌ๊ฐ€ ๋–ด๋Š”์ง€ (์—๋Ÿฌ๊ฐ€ ์žˆ๋Š” ๋ฒ„๊ทธ๋ผ๋ฉด) ์‚ฌ์ง„ ์ฒจ๋ถ€ํ•ด ์ฃผ์„ธ์š”

Allow Partial Update or Not

We are allowing only PUT but not PATCH.
Are we going to allow partial updates with PUT method, which is not the default behavior?

The List of Frontend tests that have problems

Below are frontend test modules with problems.
I just commented out to increase coverage but those modules should be handled correctly in the future.

  • CreateGoalComponent.test.js
  • TaskBody.test.js
  • EditGoalComponent.test.js

The upload button for photo doesn't do anything?

Although there is an upload button under the photo attaching, clicking the button doesn't produce any effect. Submitting the form without clicking upload seems to work without any problems, so I was just wondering what this button was supposed to do?

The range of importance field

The importance field in Task model is defined as FloatField.
Thus, the value of importance can be literally any number, which does not seem logical.

What would be a good range of numbers for importance?
ex) 110, 05, 0~100 ...

Would it be better to make it discrete or continuous?
ex) [0, 5] vs {0, 1, 2, 3, 4, 5}

How to test backend

As mentioned in "Design and Planning", we have decided to choose pytest over unittest.

Prerequisites:
(venv) pip install -r requirements.txt (pip install django-pytest pytest-cov)

Commands:
(venv) pytest (without a coverage report)
(venv) pytest --cov (with a coverage report)
(venv) pytest --cov --cov-report term-missing (with a coverage report and missing statements)

API for day_of_week (Task) and deadline (Goal and Task) have changed

There is no more "NONE" choice for day_of_week in Task model.
A blank list ([]) indicates that a task is not recurrent.
If you still feel that "NONE" choice is required, please let me know.

Also, deadline field has become optional and is not required in a request form.
However, it is at a model level and you might add validation login in views.py if you want.

Resolving 404 issue in reload

https://medium.com/@besoftyoon/spa-์ƒˆ๋กœ๊ณ ์นจ-์‹œ-404-์—๋Ÿฌ-3b59db7e9b4a

๋„์›€๋  ๊ฒƒ ๊ฐ™์•„ ๋งํฌ ์˜ฌ๋ ค๋ด…๋‹ˆ๋‹ค

์œ„ ๋ฐฉ๋ฒ• ๋ง๊ณ ๋„ index.html fetch๋ฅผ ์œ„ํ•ด์„œ nginx์— try_files์— ์ถ”๊ฐ€ํ•˜๋Š” ๋ฐฉ๋ฒ•๋„ ์žˆ๋‹ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ์ด๋ถ€๋ถ„์€ ๊ตฌ๊ธ€๋ง ์ข€๋” ํ•ด์„œ ๋งํฌ ๋‹ฌ๊ฒ ์Šต๋‹ˆ๋‹ค.

In dashboard-goal detail page, the task importance is not displayed properly

This is a relatively minor bug:
On the dashboard-goal detail page, the task importance reacts when the mouse is over the importance stars, as if it can be edited. However, clicking on it doesn't trigger anything, and the task importance remains the same.

(edit) the console doesn't have any output for this error.

Frontend Redux Store and Reducers Design

We need to design how redux store and reducers should look like.

Are we going to make a reducer per model in the backend?
ex) goalReducer, taskReducer, achievementReducer

Also, how are we going to keep user's session information in the frontend? Some reducer should be responsible for it and we will need to design how it looks like.

Cannot add more achievements after editing an achievement

How to produce the bug: After editing any achievement on date A, click another date B and click the add achievement button for the same goal.

What is expected: The empty create achievement form appears.

What happens: The edit achievement form appears, with the input from the past edit already there. When submit is clicked, date B still contains no achievement. Instead, the achievement of date A is edited with the input. This repeats when you attempt to add achievement again, for any date. This persists until you try adding achievement to another task, and after that the add achievement acts properly for the task that had the problem.

The goal images are not updated after clicking the next page button

image
image
image
Clicking the next page button updates the goal names, but not the goal images. This is not the problem of the data itself, since the images are rendered correctly when on the edit goal page, and when the goal order changes due to edit/add. (Before editing the oil painting goal, the pottery goal was there and had the knitting image. But after the order is changed the pottery goal has its own proper image now.)

The refresh button doesn't work?

When the refresh button is hit on the browser, any page runs into a 404 Not Found error. According to @ ChanwooLucioLee this is (unfortunately) the problem with React and needs to be handled by developers.

CI ์—ฐ๋™ ์™„๋ฃŒ

CI์™€ SonarCloud ์—ฐ๋™ ์™„๋ฃŒํ–ˆ์Šต๋‹ˆ๋‹ค. ์„ธ๋ถ€ ์„ค์ •์€ ํŒ€ ๋ ˆํฌ์— ๋งž๊ฒŒ ์ˆ˜์ •๋ฐ”๋ž๋‹ˆ๋‹ค. ์ˆ˜์—… ๋ ˆํฌ์˜ ๊ณต์ง€์‚ฌํ•ญ ์ฐธ๊ณ ํ•˜์—ฌ ๋ฑƒ์ง€๋„ ์ถ”๊ฐ€ํ•ด ์ฃผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

https://travis-ci.org/github/swsnu/swpp2020-team13/jobs/741809332

Change in a way to store objects in reducers in frontend

We have stored objects in an array in reducers in frontend.
For example, the initial state of "goals" in goalReducer is [], which is an array.

However, we will start to store objects in an object with its id as a key.
For example, goals = [{'id': 1, 'title': 'TITLE1'}, {'id': 2, 'title': 'TITLE2'}] will be stored as
goals = {1: {'id': 1, 'title': 'TITLE1'}, {'id': 2, 'title': 'TITLE2'}}

Why is it better?

  • You don't need to use filter() to find an object when you edit or delete. goals[] is all you need to do.

How to migrate?

  • Backend will still send objects as before. So the response.data (action.payload) will look the same as before.
  • We will use lodash library's "mapKeys" function to convert an array to an object with a key as id.
    _.mapKeys(action.payload, 'id'} will do the job. The second argument 'id' indicates that the 'id' value of each item will be the key for the item.
  • When you want to convert the object to an array as before, use Object.values(). That will convert
    {1: {'id': 1, 'title': 'TITLE1'}, {'id': 2, 'title': 'TITLE2'}} to [{'id': 1, 'title': 'TITLE1'}, {'id': 2, 'title': 'TITLE2'}].

    I cannot terminate the list.

    Precaution: there might be issues during migration. Please check the format of the data you are using is what you expected.

Daily Goal View: UI/UX topics

By "Daily Goal View" I mean the former "Today's Goals" section, where we decided to change the title text to today's date, since a new date may be selected from the calendar. It is just a name I made up just now.
I am weighing with some design choices related to UI/UX here, and would like to address some of them.

  1. What goals should we display?
    Some goals would have no tasks to address now. Should we display them as well? (My opinion now is yes, since we can add tasks in this daily goal page, it should be here ready to be added any task)

  2. In what order?
    For the tasks, it would be logical to sort them by importance, but how about the goals? These are my ideas now:

    1. Sort by pending: the end date of the goal is nearest
    2. Sort alphabetically
    3. Sort by goal creation date: newest first / oldest first
    4. Sort by most important task: this might be confusing when the order changes every day
    5. Let the user set the importance of the goal as well
    6. Let users drag & drop the goals to reorder them, and save it for the next session & days: This is what I prefer for now, but the implementation may be overly difficult for a class project?

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.