Skip to content
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

Feat/daygrid creation guide #810

Merged
merged 15 commits into from
May 25, 2021
Merged

Feat/daygrid creation guide #810

merged 15 commits into from
May 25, 2021

Conversation

jungeun-cho
Copy link
Contributor

@jungeun-cho jungeun-cho commented May 18, 2021

Please check if the PR fulfills these requirements

  • It's submitted to right branch according to our branching model
  • It's right issue type on title
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • It does not introduce a breaking change or has description for the breaking change

Description

basic
스크란샷 2021-05-20 23 53 59

2 weeks
스크란샷 2021-05-18 20 26 37

narrow weekend
스크란샷 2021-05-21 00 16 51


Thank you for your contribution to TOAST UI product. πŸŽ‰ 😘 ✨

@jungeun-cho jungeun-cho marked this pull request as draft May 20, 2021 03:01
@jungeun-cho jungeun-cho marked this pull request as ready for review May 20, 2021 14:57
@jungeun-cho jungeun-cho marked this pull request as draft May 20, 2021 14:58
@jungeun-cho jungeun-cho marked this pull request as ready for review May 20, 2021 15:21
Comment on lines +54 to +55
clientX: 9,
clientY: 20,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ΄λ ‡κ²Œ ν…ŒμŠ€νŠΈ ν•˜λ‹€λ³΄λ©΄ UIλ₯Ό 쑰금만 변경해도 금방 ν…ŒμŠ€νŠΈ μΌ€μ΄μŠ€κ°€ 깨질 것 κ°™μ€λ°μš”..clientX, clientYλ₯Ό 톡해 이 마우슀 ν¬μΈνŠΈκ°€ μ œλŒ€λ‘œ ν΄λ¦­λ˜λŠ”μ§€λ₯Ό μœ μΆ”ν•˜κΈ° 쑰금 νž˜λ“  ν…ŒμŠ€νŠΈμΈκ²ƒ κ°™λ„€μš”..λ‹€λ₯Έλ°©λ²•μ΄ μžˆμ„κΉŒμš”?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

클릭이벀트 λ°œμƒμ„ ν™•μΈν•˜λŠ” λͺ©μ μ΄μ•„λ‹ˆλΌ 마우슀 포인트 κΈ°μ€€μœΌλ‘œ κ·Έλ¦¬λ“œμ˜ rowIndex(y), columnIndex(x)λ₯Ό μ œλŒ€λ‘œ κ³„μ‚°ν•˜λŠ”μ§€ ν™•μΈν•˜κ³ μžˆμŠ΅λ‹ˆλ‹€~!

@@ -120,3 +128,14 @@ export function includes<T>(arr: T[], searchItem: T, searchIndex?: number) {

return false;
}
export function findIndex<T>(arr: T[], predicate: (item: T) => boolean) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 λΆ€λΆ„ μΆ”κ°€ν•˜λŠ”κ±΄ 폴리필을 μ•ˆλ„£μœΌλ €κ³  μΆ”κ°€ν•˜λŠ”κ±΄κ°€μš”?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

λ„€, 직접 κ΅¬ν˜„ν•΄μ„œ μ‚¬μš©ν–ˆμŠ΅λ‹ˆλ‹€.

Comment on lines +29 to 35
store.dispatch('dataStore/clearSchedules', { events });

if (events.length) {
store.dispatch('dataStore/createSchedules', { events });
}

store.dispatch('dataStore/clearSchedules', { events });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 뢀뢄이 μ œκ°€ 잘 λͺ°λΌμ„œ 이해가 λ˜μ§€ μ•ŠλŠ” 것 같은데
dataStore의 μŠ€μΌ€μ€„μ„ clearν•œλ‹€μŒμ— λ‹€μ‹œ μƒμ„±ν–ˆλ‹€κ°€ λ‹€μ‹œ clearν•˜λŠ”κ±΄κ°€μš”?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

λ„€ μƒˆλ‘œμš΄ 각 μŠ€ν† λ¦¬λ§ˆλ‹€ 이전에 있던 μŠ€ν† λ¦¬λ₯Ό μ΄ˆκΈ°ν™”ν•΄μ€λ‹ˆλ‹€.

Copy link
Member

@jung-han jung-han left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ™„λ£Œν•©λ‹ˆλ‹€~

Copy link
Contributor

@lja1018 lja1018 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

λ¦¬λ·°μ™„λ£Œν•©λ‹ˆλ‹€.

apps/calendar/src/components/daygrid/gridsWithMouse.tsx Outdated Show resolved Hide resolved
apps/calendar/src/components/events/gridEvent.tsx Outdated Show resolved Hide resolved
apps/calendar/src/components/view/month.tsx Outdated Show resolved Hide resolved
apps/calendar/src/time/datetime.ts Show resolved Hide resolved
apps/calendar/src/util/domutil.ts Outdated Show resolved Hide resolved
apps/calendar/src/util/monthViewHelper.ts Outdated Show resolved Hide resolved
apps/calendar/stories/daygrid.stories.tsx Outdated Show resolved Hide resolved
apps/calendar/test/app/util/domUtil.spec.ts Outdated Show resolved Hide resolved
Comment on lines +125 to +131
const start = toStartOfDay(day);
const end = toEndOfDay(start);

return {
start,
end,
};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

λ°”λ‘œ 리턴해도 될 것 κ°™μ•„μš”~

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

endκ°€ κ³„μ‚°λœ startλ₯Ό κΈ°μ€€μœΌλ‘œ κ³„μ‚°ν•΄μ„œμš”γ…Ž
end: toEndOfDay(toStartOfDay(day))둜 μž‘μ„±ν• κΉŒμƒκ°ν–ˆλŠ”λ°
λ³€μˆ˜μ— λ‹΄μ•„ μ‚¬μš©ν•˜λŠ”κ²ƒμ΄ 쀑볡을 쀄이고 가독성이 더 μ’‹λ‹€κ³  νŒλ‹¨ν•©λ‹ˆλ‹€.

@@ -73,6 +72,7 @@ function getStyles({ viewModel, eventHeight, headerHeight, flat = false }: GridE
exceedRight,
model: { bgColor, borderColor },
} = viewModel;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이전에 λ¦¬λ·°ν–ˆλ˜ μ‚¬ν•­μΈλŒ€ viewModel이 일반적으둜 μƒκ°ν•˜λŠ” λ·°λͺ¨λΈκ³Ό λ™μΌν•œ 역할을 ν•˜λŠ”κ²Œ λ§žλŠ”μ§€ 생각해봐야될 것 κ°™μ•„μš”. 사싀상 뷰와 λͺ¨λΈ μ‚¬μ΄μ˜ μΈν„°νŽ˜μ΄μŠ€λ‘œμ„œ 역할을 μ œλŒ€λ‘œ μˆ˜ν–‰ν•˜λŠ”κ²Œ μ•„λ‹ˆμ—ˆλ˜ 걸둜 기얡이 λ‚˜μ„œμš”

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

λ„€ ν˜„μž¬ viewModel은 뷰와 λͺ¨λΈμ‚¬μ΄μ˜ μΈν„°νŽ˜μ΄μŠ€ 역할이 μ•„λ‹ˆλΌ λ Œλ”λ§μ„ μœ„ν•œ μΊ˜λ¦°λ” λ‚΄λΆ€μ—μ„œ μ‚¬μš©ν•˜λŠ” 이벀트 λͺ¨λΈμž…λ‹ˆλ‹€.
v1λΆ€ν„° μ‚¬μš©ν•˜λ©΄μ„œ κ·ΈλŒ€λ‘œ 가져와 μ‚¬μš©λ˜μ—ˆλŠ”λ°μš”.
넀이밍은 λ°”κΏ€ ν•„μš”κ°€ μžˆμ„κ²ƒκ°™μ•„μš”. 이뢀뢄은 μΊ˜λ¦°λ” μž‘μ—…μžλΆ„λ“€μ΄λž‘ μ˜΅μ…˜λͺ… λ…Όμ˜ν•˜λ©΄μ„œ ν•¨κ»˜ μ˜λ…Όν•˜κ² μŠ΅λ‹ˆλ‹€.

@@ -57,6 +58,24 @@ function useContainerHeight(container: Ref<HTMLDivElement>, dayNameHeight: numbe
return gridPanelHeight;
}

function usePanelContainer(container: Ref<HTMLDivElement>) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이전에 containerλ₯Ό μ»¨ν…μŠ€νŠΈμ— λ‹΄μ•„μ„œ μ“΄λ‹€κ³ ν–ˆλ˜κ±° 같은데 μ•„λ‹Œκ°€μš”~?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ‚¬μš©μžκ°€ μž…λ ₯ν•œ λ£¨νŠΈμš”μ†Œκ°€ μ•„λ‹ˆλΌ μ»΄ν¬λ„ŒνŠΈμ—μ„œ μ‚¬μš©λ˜λŠ” μΌλΆ€λΌμ„œ μ €μž₯ν•˜μ§€ μ•Šκ³  μ‚¬μš©ν–ˆμŠ΅λ‹ˆλ‹€.

triggerEvent: 'click',
});
});
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

util ν…ŒμŠ€νŠΈ 말고 UIκΈ°μ€€μœΌλ‘œ ν†΅ν•©ν…ŒμŠ€νŠΈλŠ” μ—†λ‚˜μš”?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testing-library/preact-testing-library#38
jestμ—μ„œ ν†΅ν•©ν…ŒμŠ€νŠΈ μž‘μ„±ν•˜λ‹€κ°€ μ•Œμˆ˜μ—†λŠ” 였λ₯˜κ°€ λ°œμƒν•΄μ„œμš”.
이슈 μ˜¬λ €λ†“μ•˜κ΅¬, νŒ”λ‘œμ—… ν•˜λ„λ‘ν• κ»˜μš”~!

Copy link

@js87zz js87zz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰 μ™„λ£Œμž…λ‹ˆλ‹€

@jungeun-cho jungeun-cho merged commit 0fcb60a into next May 25, 2021
@jungeun-cho jungeun-cho deleted the feat/daygrid-creation-guide branch May 25, 2021 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants