choppaluv / HighTravel

0 stars 0 forks source link

Saga & component, action, reducer Connect #11

Closed choppaluv closed 6 years ago

choppaluv commented 6 years ago

User page

component, reducer, action, saga 모두 연결하여 User page 완성하였습니다. @parkkyuyeon User page에서 필요한 action이 빠져있어 추가하면서 reducer도 수정하였습니다. component rendering할 때 User molecule에서 TripTitle atom이 들어있었는데 무슨 이유에서인지 component life cycle관련 문제로 error가 떠서 atom 따로 안쓰고 molecule에서 직접 Trip Title을 rendering하도록 하였습니다. css style은 그대로 옮겨놔서 rendering할 때 보이는 모습은 원래 의도하신 대로 보이도록 하였습니다. reducer랑 component 변경한 점 고려해서 test 작성해주세요~

@hjbc0921 User page에서 Add trip버튼, Trip Title 버튼 누르면 다른 page로 routing이 되어야 하는데 component(molecule/User)에서 해당하는 부분 각각 주석으로 표시해 두었습니다. add trip page도 이미 saga작업이 완성되어 있어 add trip button눌러 해당 page로 이동해서 trip 추가 하는 것까지 확인하실 수 있을 것 같습니다. 다른 page들도 saga 작업끝나는대로 component에서 어떤 button누르면 routing되어야하는지 주석처리 해서 올리도록 하겠습니다~

choppaluv commented 6 years ago

Intro page

@hjbc0921 Intro page도 saga작업 완료하였습니다. 다만 login success/fail에 따라 routing여부가 달라지는데 단순한 button click과는 다르기 때문에 조금 더 생각해봐야 할 것 같습니다.

ghost commented 6 years ago

기본적으로 조건 없이 버튼 누르면 라우팅은 모두 구현하였습니다. 추가로 구현해야할 버튼이 있으면 말씀해주세요.

조건에 따라 라우팅하는 것은 state 추가, saga 수정, action 및 reducer 수정까지 해야해서 현재 intro와 signup page 수정 중입니다.

ghost commented 6 years ago

@choppaluv login 후 state 변경할 때 selectors 파일은 비어있던데 username, token 같은 것은 다른 파일에 저장되는건가요? 구현해야하는건가요? 우선은 login/selectors.js에 구현해놓겠습니다.

ghost commented 6 years ago

login 실패 시 에러메시지와 함께 페이지 유지 구현하였습니다.

2018-05-12 5 59 37

ghost commented 6 years ago

성공시 페이지 전환도 구현하였습니다. selectors, actions, reducers, sagas, component 모두 조금씩 수정했으니 testing할 때 참고하시기 바랍니다.

choppaluv commented 6 years ago

@hjbc0921 selectors.js에 따로 selector를 만들지 않았고 각 store마다 saga 파일에서 필요한 state(다른 store의 state포함)를 불러오도록 하였습니다. 처음에 string값으로 직접 saga파일에 적어서 backend 통신을 test하던 것을 state에서 그 값을 불러와서 사용하도록 하였으며 성공적으로 통신함을 확인하였습니다. 현재 addtrip, addschedule, addtrip page의 경우 이미 그렇게 변경하여 test를 마쳤고 다른 store의 saga들도 작업중에 있습니다.

choppaluv commented 6 years ago

Home page

현재 home page중에서 add user, add schedule부분은 saga작업을 마쳤습니다.

해당 결과화면은 #9 에서 확인하실 수 있습니다.

parkkyuyeon commented 6 years ago

@choppaluv Add schedule을 했을 때 Calendar에 내용이 뜨게 하는 구현이 너무 복잡해서 다음 iteration에 해야할 것으로 미루려고 합니다.

choppaluv commented 6 years ago

@narajoa21 toggle todo 작업 완료하였습니다. backend model, serializer수정하였고 frontend에서도 해당 todo를 누를때마다 toggle되도록 하여 그 state가 store에 성공적으로 저장됩니다. toggle되어 line-through 형태로 보여지는 것을 직접 확인하실 수 있습니다.