-
Notifications
You must be signed in to change notification settings - Fork 74
[Team 17][FE] Todo List 2주차 PR1 #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Team 17][FE] Todo List 2주차 PR1 #141
Conversation
- menuStatus update 메서드 - menuStatus get 메서드
[FE] alert창 기본 동작 구현
- 수정하면서 생기는 render 문제 해결
[FE] 헤더기능구현 및 히스토리 애니메이션 기능
[FE] 드래그앤 드롭 기본 기능 구현(도착 잔상 및 맨끝에 추가 제외)
…nto FE/feature/#36-card_add
- 카드 write 모드 스타일 추가 - 수정기능 구현하면서 생기는 오류들 해결
[FE] 카드 삭제 기능 구현
…nto FE/feature/#37-card_edit
[FE] 카드 수정기능 구현
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
안녕하세요!
이번 리뷰들 담당하게된 json입니다!
먼저 리뷰가 늦어진점 다시 한 번 사과드리겠습니다.. 🙏
우선 영상이 있어서 그런지 파악하는데 시간이 많이 단축 됐고, 덕분에 리뷰를 달기 정말 쾌적했어요! 감사합니다!!
그리고, 전체적으로 하나의 함수가 최대한 적은 기능을 담당해서 코드를 읽기 수월한 점도 👍 !
질문사항
각자 나눠서 기능 구현하다 보니 코드 스타일이 다른 부분에 대해서는
보통 미리 상의를 하고 진행해야 하는 건가요?
생각하신대로 미리 상의를 하고 진행하면, 불필요한 시간소요를 방지할 수 있습니다!
패턴분리나 메소드 나누는 방식, 네이밍 등 서로의 생각이
조금 차이가 있어서 이런부분을 함께 이야기를 많이 했습니다.
어디서부터 어디까지 상의를 하고 맞춰야 할지 어려운것 같습니다.
문서를 통해서 서로 합의를 하고, 그 문서를 기반으로 스타일을 맞춰나가면 좋을 것 같아요!
네이밍과 관련해서 추가를 add로 할지, create로 할지
들여쓰기는 몇칸으로 할지
싱글 쿼테이션이나 더블 쿼테이션 등...
이런 내용들을 서로간의 합의가 될 때까지, 하지만 너무 깊지는 않게 최대한 정리를 하고 시작하시면 훨씬 더 원활한 개발을 진행하실 수 있을거에요 😄
더불어 린트를 활용해보는 것도 좋겠죠 😉
const createTagTemplate = (tag, content, className = '') => { | ||
return `<${tag} class="${className}">${content}</${tag}>`; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
createTagTemplate의 파라미터에서 두 번째 값이 공백으로 오는게 빈번하게 보이는 것 같아요!
현재 PR내의 코드에서는 content는 falsy할 수 있지만 className은 truthy인 것 같은데 그렇다면 혹시 순서를 바꿔보면 어떨까요?
const createTagTemplate = (tag, className, content);
// before
createTagTemplate('main', '', 'main');
// after
createTagTemplate('main', 'main');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
순서를 바꾸는것이 훨씬 더 깔끔하고 실수를 줄일것 같습니다.
class="user_img" | ||
style="background-image: url(./src/img/user.svg)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
user img를 담당하는 태그에 클래스 네임이 존재하는데
따로 인라인으로 이미지를 제어한 이유가 궁금합니다! ✋
혹시.. 임시일까요?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
로그인에 대한게 요구사항에 없는 부분이긴한데 사용자가 여러명일 경우를 생각하고 작성을 했습니다.
img 태그로 넣을 경우 사용자가 이미지 크기를 고려하지 않고 넣어도 백그라운드로 제어하면 어느정도 케어할수있기때문에 백그라운드로 처리했습니다!
제가 설명을 잘 한건지 모르겠네요..😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제가 질문을 상세하게 드리지 못한것 같아요!
그런데 답변을 듣고 다시 한번 코드를 보니 내용이 이해되었습니다! 👀
궁금했던 부분은.. user_img라는 클래스네임이 있으니 인라인 스타일을 안써도 되지않을까 였었는데요!
말씀하신대로 다수의 사용자라면 이미지는 데이터로 제어하는 방향으로 가시겠군요!! 😄
$newCard.style.position = 'absolute'; | ||
$newCard.style.zIndex = 1000; | ||
$newCard.style.borderRadius = '6px'; | ||
$newCard.style.backgroundColor = '#fff'; | ||
$newCard.style.boxShadow = '0px 1px 30px rgba(224, 224, 224, 0.3)'; | ||
$newCard.style.width = '310px'; | ||
$newCard.style.height = '115px'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여러 종류의 스타일을 설정할 때,Object.assign() 이나 cssText 로 정리해도 괜찮을 것 같습니다!
this.model = new ColumnModel(id, title, cardCount); | ||
this.view = new ColumnView(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
혹시 ColumnModel의 constructor는 파라미터를 받는데 ColumnView는 안받는 이유가 있을까요??
ColumnView도 ColumnModel과 동일하게 만든다면 init에 전달하지 않아도 될 것 같다는 생각이 들었습니다! 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id, title, cardCount 이 3개가 모델에 있는 상태값이라고 생각했고,
view의 역할에서 생각했을때 컨트롤러로 부터 받아서 사용을 해야할 것 같다고 생각했습니다.
Model, View 양쪽에 있어도 되는건가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제가 리뷰의 아키텍처 부분을 제대로 읽지 않았군요..! 😢
말씀대로 MVC나 MVVM같은 패턴을 염두해두고 작성하셨다면 말씀하신대로
분리하는 방향으로 가는게 좋을 것 같아요! 👍
} | ||
|
||
init({ id, title, cardCount }) { | ||
this.view.render(id, title, cardCount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ColumnView의 constructor에 render를 포함해보면 어떨까요?
따로 의도가 있으신지도 궁금합니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
뭔가 작업하다가 init에 render말고 다른것들이 생길수도 있다고 생각했던것 같아요..ㅎㅎ
constructor로 옮길게요!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아! 그런 의도였었군요!
그렇다면 생각하신대로 확장 여부에 따라서 조정하는 방향도 좋을 것 같아요!
import Controller from './Controller/Controller.js'; | ||
import { Header } from './Header/main.js'; | ||
import { History } from './History/main.js'; | ||
// import { dragNdrop } from './dragNdrop'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
불필요한 주석은 삭제...?
} | ||
|
||
updateStatus() { | ||
this.menuStatus ? (this.menuStatus = false) : (this.menuStatus = true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.menuStatus = !this.menuStatus;
는 어떨까요?! ;)
맞다! 깜빡했네요! 개발하느라 정말 수고하셨습니다! 👍 |
team-17 프론트엔드
안녕하세요~
이든
,J
입니다.MVVM을 사용해보기로 하고 Model. View 분리를 우선으로 생각하기로 했는데 구현하다보니 MVC가 되어버렸습니다...😅
협업과정
이번 작업은 서로 분업하여서 작업했습니다.
분업을 하다보니 서로 코드 스타일이 다른부분이 있습니다. 이부분은 대부분의 기능 구현이 완료된 후 시간이 된다면 리팩토링 진행해보려고 합니다.
참고해서 리뷰 부탁드립니다.
👉🏻 카드이동 기능은 아직 완료 되지 않고 구현중이라서
dragNdrop.js
파일에서 별도록 작업중입니다. 기능 구현 완료 후 파일 합칠 생각입니다.👉🏻 현재 두 기능을 합치면서
클릭이벤트
와마우스다운이벤트
가 겹쳐서 생기는 오류가 있어app.js
에서dragNdrop.js
부분은 주석 처리 해놓은 상태입니다!👉🏻 드래그 기능할때 스타일 깨지는 부분은 추후에 수정할 예정입니다.
진행사항
기능 영상보기
기능 영상보기
카드추가 기능
addCard.mov
카드삭제 기능
default.mp4
카드수정 기능
editCard.mov
카드이동 기능
dragNdrop.mp4
고민 및 질문
패턴분리나 메소드 나누는 방식, 네이밍 등 서로의 생각이 조금 차이가 있어서 이런부분을 함께 이야기를 많이 했습니다.
어디서부터 어디까지 상의를 하고 맞춰야 할지 어려운것 같습니다.