Skip to content

Commit

Permalink
v1.1.0 ๋ฐฐํฌ ๐ŸŽ‰ (#536)
Browse files Browse the repository at this point in the history
* refactor: ๋ฆฌ์•กํŠธ ์ฟผ๋ฆฌ ๋กœ์ง ์ปค์Šคํ…€ ํ›… ๋ถ„๋ฆฌ (#482)

* refactor: ๋ถˆํ•„์š”ํ•˜๊ฒŒ Feed ํŽ˜์ด์ง€์™€ SpecificPage ์—์„œ ํ›… ์‹คํ–‰ํ•˜๋Š” ๊ฒƒ ์ œ๊ฑฐ

* refactor: useEffect ์‹คํ–‰๊ตฌ๋ฌธ์— Early Return ์ถ”๊ฐ€

* refactor: useMutateChannel ํ›… ๋ถ„๋ฆฌ
- ์ฑ„๋„ ๊ตฌ๋… ๊ด€๋ จ Muatation ๋กœ์ง ํ›…์œผ๋กœ ๋ถ„๋ฆฌ
- Settle ์ดํ›„ ๋™์ž‘ (refetch)์€ Props ๋กœ ๋ฐ›๋„๋ก ๊ตฌํ˜„

* refactor: ์ „์ฒด ์ฑ„๋„ ๊ฐ€์ ธ์˜ค๋Š” useQuery ํ›…์œผ๋กœ ๋ถ„๋ฆฌ

* refactor: useMutateBookmark ํ›… ์ž‘์„ฑ ๋ฐ ์ ์šฉ

* refactor: useGetInfiniteBookmarks ํ›… ์ž‘์„ฑ ๋ฐ ์ ์šฉ

* refactor: useGetInfiniteMessages ํ›… ์ž‘์„ฑ ๋ฐ ์ ์šฉ
- ๊ธฐ์กด์˜ ๋ฉ”์‹œ์ง€ ๋ฌดํ•œ ์Šคํฌ๋กค ์š”์ฒญํ•˜๋˜ ํŽ˜์ด์ง€์—์„œ ์ผ๊ด„์ ์œผ๋กœ ์‚ฌ์šฉํ•˜๋„๋ก ์ ์šฉ
- channelId, keyword, date ๋ฅผ ์˜ต์…”๋„ ํ”„๋กญ์Šค๋กœ ๋ฐ›๋„๋ก ํ•จ

* refactor: useGetInfiniteReminders ํ›… ์ž‘์„ฑ ๋ฐ ์ ์šฉ

* refactor: useGetCertification ํ›… ์ž‘์„ฑ ๋ฐ ์ ์šฉ

* refactor: useSetTargetMessage -> useSetReminderTargetMessage ๋„ค์ด๋ฐ ์ˆ˜์ •

* refactor: slack login url ์ƒ์ˆ˜ํ™”

* refactor: hasNavBar ํ•จ์ˆ˜ ํ•œ์ค„๋กœ ๋ฆฌํŒฉํ„ฐ๋ง

* refactor: channelId ์ฟผ๋ฆฌ ํŒŒ๋žŒ ๊ตฌํ•˜๋Š” ์œ ํ‹ธํ•จ์ˆ˜ ๋ฆฌํŒฉํ„ฐ๋ง

* chore: ์˜คํƒ€์ˆ˜์ •

* refactor: ๋ถˆํ•„์š”ํ•œgetPageParam util ํ•จ์ˆ˜ ์ œ๊ฑฐ
- ํ›…์œผ๋กœ ๋ถ„๋ฆฌํ•˜์—ฌ ์žฌ์‚ฌ์šฉ ๋  ์ผ์ด ์—†๊ธฐ ๋•Œ๋ฌธ์—, ๊ฐ ํ›…์—์„œ ์ง์ ‘ ํ•จ์ˆ˜๋ฅผ ์ •์˜ํ•˜์—ฌ ์‚ฌ์šฉํ•˜๋„๋ก ์ˆ˜์ •

* refactor: @disabled ์ง€์ •ํ•œ ํ…Œ์ŠคํŠธ ์ œ๊ฑฐ (#487)

* chore: ์šด์˜์šฉ slack app ์ถ”๊ฐ€ ๋ฐ yml ์„ค์ • ์ •๋ฆฌ (#493)

* chore: test์šฉ submodule ์ œ๊ฑฐ

* chore: submodule ์—…๋ฐ์ดํŠธ ๋ณ€๊ฒฝ

- yml ํŒŒ์ผ ํ†ต์ผ
- local profile์˜ DB ์ •๋ณด ๋ณ€๊ฒฝ
- prod์šฉ slack app ์ •๋ณด ์ถ”๊ฐ€

* refactor: ์Šฌ๋ž™์—์„œ ์˜ค๋Š” ์˜ˆ์™ธ๋ฅผ ํ”„๋กœ์ ํŠธ ์˜ˆ์™ธ์ธ SlackApiCallException์œผ๋กœ ๋ณ€ํ™˜ (#492)

* chore: profile ์„ค์ • ์˜ค๋ฅ˜ ์—…๋ฐ์ดํŠธ (#496)

* refactor: ์„œ๋น„์Šค ํ…Œ์ŠคํŠธ์— DatabaseCleaner ๋„์ž… (#479)

* refactor: ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” @AutoConfigureMockMvc ์–ด๋…ธํ…Œ์ด์…˜ ์ œ๊ฑฐ

* refactor: ServiceTest์—์„œ DatabaseCleaner ๋„์ž…

* refactor: ํ…Œ์ŠคํŠธ์—์„œ @transactional ์–ด๋…ธํ…Œ์ด์…˜ ์ œ๊ฑฐ

* optimization: ํ”„๋ก ํŠธ์—”๋“œ ์„ฑ๋Šฅ ์ตœ์ ํ™” (#499)

* chore: package.json ์ˆ˜์ •

- scripts์— build-dev ๋ชจ๋“œ ์„ค์ •
- ๋ถˆํ•„์š”ํ•œ @babel dependencies ์ œ๊ฑฐ
- webpack-bundle-analyzer ์„ค์น˜

Co-authored-by: moonheekim0118 <hellomooneekim@gmail.com>

* chore: ts config module: esnext๋กœ ์ˆ˜์ •

Co-authored-by: moonheekim0118 <hellomooneekim@gmail.com>

* chore: webpack config ์ˆ˜์ • ๋ฐ babelrc ์ œ๊ฑฐ

- bundle analyzer dev mode์— ์ถ”๊ฐ€
- babel loader ์ œ๊ฑฐ

Co-authored-by: moonheekim0118 <hellomooneekim@gmail.com>

* chore: Routes.tsx import๋ฌธ ์ˆ˜์ •

Co-authored-by: moonheekim0118 <hellomooneekim@gmail.com>

* chore: file-loader ์ œ๊ฑฐ ํ›„ webpack asset ์„ค์ • ์ ์šฉ

Co-authored-by: moonheekim0118 <hellomooneekim@gmail.com>

* chore: assets ํŒŒ์ผ ์ •๋ฆฌ

- ๋ถˆํ•„์š”ํ•œ italic font ์ œ๊ฑฐ
- woff2, ttf ํฐํŠธ ์ถ”๊ฐ€
- svg ํŒŒ์ผ ์ œ๊ฑฐ

Co-authored-by: moonheekim0118 <hellomooneekim@gmail.com>

* chore: ํŒŒ์ผ ํ™•์žฅ์ž ์„ค์ • (์›นํŒฉ, d.ts)

Co-authored-by: moonheekim0118 <hellomooneekim@gmail.com>

* chore: prettier ignore ์„ค์ •

Co-authored-by: moonheekim0118 <hellomooneekim@gmail.com>

* chore: tway air ํฐํŠธ preload ์„ค์ •

Co-authored-by: moonheekim0118 <hellomooneekim@gmail.com>

* chore: ๋ณ€๊ฒฝ๋œ ํฐํŠธ ํฌ๋งท ์ ์šฉ

Co-authored-by: moonheekim0118 <hellomooneekim@gmail.com>

* refactor: svgIcon ์ปดํฌ๋„ŒํŠธ ์ƒ์„ฑ ๋ฐ ์ ์šฉ

Co-authored-by: moonheekim0118 <hellomooneekim@gmail.com>

Co-authored-by: moonheekim0118 <hellomooneekim@gmail.com>

* refactor: ๋ฉ”์‹œ์ง€ ์กฐํšŒ ํ…Œ์ŠคํŠธ ๋ฆฌํŒฉํ† ๋ง   (#421)

* refactor: ๋ฉ”์‹œ์ง€ ์กฐํšŒ ํ…Œ์ŠคํŠธ ๊ฐœ์„ 

* refactor: ์ฝ”๋“œ๋ฆฌ๋ทฐ ๋ฐ˜์˜ ๋ฐ ์ฝ”๋“œ ๋น„๊ต์šฉ ํ…Œ์ŠคํŠธ ํด๋ž˜์Šค ์ถ”๊ฐ€

* refactor: ์ฝ”๋“œ๋ฆฌ๋ทฐ ๋ฐ˜์˜

* refactor: Nested ํด๋ž˜์Šค๋ฅผ ์ด์šฉํ•œ ์กฐํšŒ ํ…Œ์ŠคํŠธ ๊ฐœ์„ 

* refactor: ์ฝ”๋“œ๋ฆฌ๋ทฐ ๋ฐ˜์˜(์–ด๋…ธํ…Œ์ด์…˜ ์ˆœ์„œ ๋ณ€๊ฒฝ, DisplayName ๊ฐœ์„ )

* refactor: ํด๋ž˜์Šค๋ช…์„ MessageServiceTest๋กœ ๋ณ€๊ฒฝ ๋ฐ ์‹œ๊ฐ„์— ๋”ฐ๋ฅธ ๋ฆฌ๋งˆ์ธ๋“œ ํ…Œ์ŠคํŠธ ์ด๋™

* refactor: ์ฑ„๋„ ๋ชฉ๋ก ์กฐํšŒ API ๊ฐœ์„  (#495)

* refactor: Channel -> ChannelResponse ๋ณ€ํ™˜ ๋กœ์ง ๊ฐœ์„ 

* test: ๋ถˆํ•„์š”ํ•œ ๋ณ€์ˆ˜ ์„ ์–ธ ์ œ๊ฑฐ

* refactor: ์ฑ„๋„ ๋ชฉ๋ก ์กฐํšŒ ๋กœ์ง ChannelSubscriptionService์—์„œ ChannelService๋กœ ์ด๋™

* test: ChannelSubscriptionServiceTest์—์„œ ChannelService ์˜์กด ์ œ๊ฑฐ

* test: ์ฑ„๋„ ์ „์ฒด ์กฐํšŒ ํ…Œ์ŠคํŠธ ์ถ”๊ฐ€

* refactor: Map ๋Œ€์‹  Set ํ™œ์šฉ

* style: ๊ฐœํ–‰ ๋ฌธ์ž ์ œ๊ฑฐ ๋ฐ ๋ฉ”์„œ๋“œ ์ˆœ์„œ ๋ณ€๊ฒฝ

* refactor: ChannelService์™€ ChannelCreateService ๋ถ„๋ฆฌ

* test: DB Cleaner ์ ์šฉ

* test: DB Cleaner ๋ˆ„๋ฝ๋œ ๊ณณ ์ถ”๊ฐ€

* refactor: Service Layer์—์„œ Domain์ด ์•„๋‹Œ DTO ๋ฐ˜ํ™˜

* style: ์ค„๋ฐ”๊ฟˆ ๊ฐœ์„ 

* refactor: ํ—ค๋” ํ† ํฐ๊ฐ’ ์ถ”์ถœ ํด๋ž˜์Šค๋ฅผ auth ํŒจํ‚ค์ง€๋กœ ์ด๋™ (#504)

* refacotor: ์ ‘๊ทผ์ œ์–ด์ž ์ˆ˜์ • (#512)

* feat: SlackApiCallException ๋กœ๊น… ๋ฉ”์‹œ์ง€ ์ถ”๊ฐ€ (#498)

* feat: ์Šฌ๋ž™ api ํ˜ธ์ถœ ์˜ˆ์™ธ ๋ฐœ์ƒ ์‹œ ์—๋Ÿฌ ๋ฉ”์‹œ์ง€ ์ถ”๊ฐ€ ๋ฐ ๋กœ๊น…

* refactor: ๋กœ๊น… ๋ฉ”์‹œ์ง€ ์ƒ์ˆ˜ํ™”, ์‘๋‹ต์ฝ”๋“œ 500 ์ง€์ •

* feat: ChannelCreateService ์˜ ์Šฌ๋ž™ ํ˜ธ์ถœ ์˜ˆ์™ธ์— ๋ฉ”์‹œ์ง€ ์ถ”๊ฐ€

* feature: submodule ๋ฒ„์ „์„ jenkinsfile์„ ์‚ญ์ œํ•œ ๋ฒ„์ „์œผ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œ (#510)

* refactor: ๋ฉ”์‹œ์ง€/๋ถ๋งˆํฌ/๋ฆฌ๋งˆ์ธ๋” ์กฐํšŒ API ์ŠคํŽ™ ๋ณ€๊ฒฝ   (#513)

* refactor: ๋ฉ”์‹œ์ง€ ์กฐํšŒ ์‘๋‹ต isLast๋ฅผ hasPast๋กœ ๋ณ€๊ฒฝ, isFuture ์ถ”๊ฐ€

* refactor: ๋ฉ”์‹œ์ง€ api ๋ณ€๊ฒฝ ๊ด€๋ จ ํ…Œ์ŠคํŠธ ์ˆ˜์ •

* refactor: ๋ถ๋งˆํฌ์˜ isLast ํ•„๋“œ๋ฅผ hasPast๋กœ ๋ณ€๊ฒฝ

* refactor: ๋ฆฌ๋งˆ์ธ๋” ์กฐํšŒ ์‹œ isLast ํ•„๋“œ๋ฅผ hasFuture๋กœ ๋ณ€๊ฒฝ

* refactor: ํ•„์š”์—†๋Š” @JsonProperty ์„ ์–ธ ์ œ๊ฑฐ

* refactor: has~ ํ•„๋“œ์˜ getter ๋ช… ๊ฐœ์„ , ์˜คํƒ€ ์ •์ •

* refactor: ๋ฉ”์‹œ์ง€/๋ถ๋งˆํฌ/๋ฆฌ๋งˆ์ธ๋” ์กฐํšŒ API ์ŠคํŽ™ ๋ณ€๊ฒฝ ๋Œ€์‘ (#515)

* refactor: ๋ถˆํ•„์š”ํ•œ ์ฃผ์„ ์ œ๊ฑฐ

* refactor: ๋ถ๋งˆํฌ get API ์ŠคํŽ™ ๋ณ€๊ฒฝ ๋Œ€์‘
- isLast -> hasPast ๋กœ ์ˆ˜์ •ํ•˜์—ฌ nextPageParam ํ•จ์ˆ˜ ๊ตฌํ˜„
- bookmark ์‘๋‹ต๊ฐ’ ํƒ€์ž… interface ์ˆ˜์ •

* chore: ๋‹จ์œ„ ํ…Œ์ŠคํŠธ ์ž„์‹œ ์ฃผ์„์ฒ˜๋ฆฌ

* refactor: ๋ฆฌ๋งˆ์ธ๋” get API ์ŠคํŽ™ ๋ณ€๊ฒฝ ๋Œ€์‘
- isLast -> hasFuture ๋กœ ์ˆ˜์ •ํ•˜์—ฌ nextPageParam ํ•จ์ˆ˜ ๊ตฌํ˜„
- Reminder ์‘๋‹ต๊ฐ’ ํƒ€์ž… interface ์ˆ˜์ •

* refactor: ๋ฉ”์‹œ์ง€ get API ์ŠคํŽ™ ๋ณ€๊ฒฝ ๋Œ€์‘
- isLast -> hasFuture ๋กœ ๋ณ€๊ฒฝํ•˜์—ฌ previousPageParam ํ•จ์ˆ˜ ๊ตฌํ˜„
- isLast -> hasPast ๋กœ ๋ณ€๊ฒฝํ•˜์—ฌ nextPageParam ํ•จ์ˆ˜ ๊ตฌํ˜„
- ๋ฉ”์‹œ์ง€ ์‘๋‹ต๊ฐ’ interface ์ˆ˜์ •

* fix: Storybook ๋นŒ๋“œ ์‹คํŒจ ํ•ด๊ฒฐ
- ์‚ญ์ œ๋œ svg ํŒŒ์ผ Import ๋ฌธ ์ œ๊ฑฐ, ์ปดํฌ๋„ŒํŠธ svg ๋กœ ๋Œ€์ฒด

* fix: font ์ ์šฉ๋˜์ง€ ์•Š๋Š” ๋ฌธ์ œ ํ•ด๊ฒฐ
- font-face ๋‚ด ์˜คํƒ€ ์ˆ˜์ •

* refactor: HashMap ๊ฐ•์ œ ํ˜•๋ณ€ํ™˜ ์ œ๊ฑฐ (#508)

* refactor: HashMap ๊ฐ•์ œ ํ˜•๋ณ€ํ™˜ ๋Œ€์‹  ObjectMapper์™€ DTO ์‚ฌ์šฉ

* refactor: challenge ๊ฒ€์ฆ ๋ฐฉ์‹ ๋ณ€๊ฒฝ

* refactor: code smell ์ œ๊ฑฐ

- final ํ‚ค์›Œ๋“œ ์ถ”๊ฐ€
- ๋ถˆํ•„์š”ํ•œ import ์ œ๊ฑฐ
- util ํด๋ž˜์Šค์—์„œ private ์ƒ์„ฑ์ž ์ƒ์„ฑ
- deprecated ์ œ๊ฑฐ

* test: toJson ์œ„์น˜ ๋ณ€๊ฒฝ

* refactor: json ๋ณ€ํ™˜ ์‹คํŒจ ์‹œ ์ปค์Šคํ…€ Exception ์ ์šฉ

* test: JsonUtils ํ…Œ์ŠคํŠธ ์ฝ”๋“œ ์ถ”๊ฐ€

* refactor: DTO ์ด๋ฆ„ ๋ณ€๊ฒฝ

* refactor: ControllerDto -> ServiceDto ๋ณ€๊ฒฝ ๋กœ์ง ControllerDto๋กœ ์ด๋™

* feat: ์ €์žฅํ•˜๋Š” ์ด๋ฏธ์ง€ 512์—์„œ 48๋กœ ๋ณ€๊ฒฝ

* test: json์œผ๋กœ ์ „ํ™˜ํ•˜๋Š” ๋กœ์ง ๋ฉ”์„œ๋“œ์—์„œ ์ œ๊ฑฐ

* refactor: ๋ฏธ์‚ฌ์šฉ import ์ œ๊ฑฐ

* style: ์ปจ๋ฒค์…˜ ๋งž์ถค

- ๋ถˆํ•„์š”ํ•œ ๊ณต๋ฐฑ ์ œ๊ฑฐ
- ๋ถˆํ•„์š”ํ•œ import ์ œ๊ฑฐ
- ์–ด๋…ธํ…Œ์ด์…˜ ์ˆœ์„œ ๋ณ€๊ฒฝ
- InvalidJsonRequestException ๋กœ๊น… ๋ฉ”์‹œ์ง€ ๋ณ€๊ฒฝ

* test: toJson() ๋กœ์ง ๋ถ„๋ฆฌ

* fix: ์‚ฌํŒŒ๋ฆฌ์—์„œ ๋กœ๊ทธ์ธ ๋˜์ง€ ์•Š๋Š” ๋ฒ„๊ทธ ํ•ด๊ฒฐ  (#518)

* refactor: ๋ถˆํ•„์š”ํ•œ ์ฃผ์„ ์ œ๊ฑฐ

* fix: ์‚ฌํŒŒ๋ฆฌ์—์„œ ๋กœ๊ทธ์ธ๋˜์ง€ ์•Š๋Š” ๋ฒ„๊ทธ ํ•ด๊ฒฐ
- ์‚ฌํŒŒ๋ฆฌ์—์„œ ์ง€์›ํ•˜์ง€ ์•Š๋Š” ์ •๊ทœํ‘œํ˜„์‹ ๋ฌธ๋ฒ• (look behind) ์ œ๊ฑฐ
- ๋Œ€์ฒด ๊ฐ€๋Šฅํ•œ ์ •๊ทœํ‘œํ˜„์‹ ๋ฐ ๋กœ์ง์œผ๋กœ ๋Œ€์ฒด

* fix: ๋‹ฌ๋ ฅ ์ปดํฌ๋„ŒํŠธ ๋ฏธ๋ž˜ ๋‚ ์งœ ๋ฐ ๋นˆ ๊ณต๊ฐ„ ํด๋ฆญ์‹œ ๋ฐ์ดํ„ฐ ์š”์ฒญ๋˜๋Š” ๋ฒ„๊ทธ ์ˆ˜์ • (#519)

* refactor: ๋งค๋ฒˆ ์ƒ์„ฑ๋˜๋Š” date ๊ฐ์ฒด ์ตœ์†Œํ•œ์œผ๋กœ ์ƒ์„ฑ๋  ์ˆ˜ ์žˆ๋„๋ก ๋ณ€๊ฒฝ

* refactor: isBlank, isFuture ์ธ ๊ฒฝ์šฐ ํด๋ฆญ ์ด๋ฒคํŠธ ๋ฐœ์ƒํ•˜์ง€ ์•Š๋„๋ก css ์ˆ˜์ •

* fix: isBlank, isFuture์ธ day ํด๋ฆญ์‹œ link ์ด๋™๋˜๋Š” ๋ฒ„๊ทธ ํ•ด๊ฒฐ

* refactor: reminderModal component ๋ฆฌํŒฉํ„ฐ๋ง (#521)

* refactor: useSetReminder hook ๋ถ„๋ฆฌ

- useDatePicker, useTimePicker๋กœ ๋ถ„๋ฆฌ

Co-authored-by: moonheekim0118 <hellomooneekim@gmail.com>

* refactor: ReminderModal component ๋ถ„๋ฆฌ

- DatePicker, TimePicker ๋กœ ๋ถ„๋ฆฌ

Co-authored-by: moonheekim0118 <hellomooneekim@gmail.com>

* refactor: DatePicker, TimePicker ์Šคํฌ๋กค ์œ„์น˜ ๋ฒ„๊ทธ ์ˆ˜์ • ๋ฐ string literal, magic number ์ƒ์ˆ˜ํ™”

Co-authored-by: moonheekim0118 <hellomooneekim@gmail.com>

Co-authored-by: moonheekim0118 <hellomooneekim@gmail.com>

* refactor: ์ตœ์ƒ๋‹จ์œผ๋กœ ์Šคํฌ๋กค์„ ์›€์ง์ด๋Š” ๋กœ์ง ๋ฆฌํŒฉํ„ฐ๋ง  (#527)

* feat: ์ดˆ๊ธฐ ๋ Œ๋”๋ง ๋ฐ ์˜์กด์„ฑ ๋ฐฐ์—ด ๋‚ด ์ƒํƒœ๊ฐ€ ๋ฐ”๋€Œ์—ˆ์„ ๋•Œ ์Šคํฌ๋กค ์œ„์น˜๋ฅผ ์ตœ์ƒ๋‹จ์œผ๋กœ ๋ณ€๊ฒฝํ•˜๋Š” ๋กœ์ง ํ›…์œผ๋กœ ์ž‘์„ฑ

* refactor: ๋ฐ˜๋ณต๋˜๋Š” ๋กœ์ง  useScrollToTop ํ›… ์ ์šฉ

* fix: ์‹œ,๋ถ„,์ดˆ๊ฐ€ ๊ฐ™์€ ๋ฉ”์‹œ์ง€๋ฅผ ์กฐํšŒํ•˜๋Š” ๊ฒฝ์šฐ ์ •๋ ฌ ์ˆœ์„œ๊ฐ€ ๋ฐ”๋€Œ๋Š” ํ˜„์ƒ  (#528)

* feat: postedDate์˜ ์ปฌ๋Ÿผ ํƒ€์ž… ๋ณ€๊ฒฝ

* feat: LocalDateTime ๋ณ€ํ™˜ ์‹œ milliSecond ๋‹จ์œ„๋กœ ๋ณ€๊ฒฝ

* test: ์˜ฌ๋ฐ”๋ฅธ ํ…Œ์ŠคํŠธ ๋ฐ์ดํ„ฐ ์„ธํŒ…

* refacotor: ์ฟผ๋ฆฌ์—์„œ ๋ถˆํ•„์š”ํ•œ left outer join ์‚ญ์ œ (#531)

* fix: Drawer ๋‚ด๋ถ€ ํด๋ฆญ ์‹œ, Drawer ๊ฐ€ ๋‹ซํžˆ๋Š” ๋ฌธ์ œ ํ•ด๊ฒฐ (#529)

* refactor: useOuterClick ํ›… ์ˆ˜์ •
- props ๋กœ ๋‚ด๋ ค์ค€ ์ˆซ์ž์— ๋”ฐ๋ผ์„œ innerRef ๋ฅผ n๊ฐœ ์ƒ์„ฑ ํ•  ์ˆ˜ ์žˆ๋„๋ก ์ˆ˜์ •

* fix: Drawer ๋‚ด๋ถ€ ํด๋ฆญ ์‹œ, Drawer ๋‹ซํžˆ๋Š” ๋ฌธ์ œ ํ•ด๊ฒฐ
- ๋ณ€๊ฒฝ๋œ useOuterClick ํ›… ์ ์šฉํ•˜์—ฌ ์—ฌ๋Ÿฌ๊ตฐ๋ฐ์— innerRef ์ ์šฉ ํ•  ์ˆ˜ ์žˆ๋„๋ก ์ˆ˜์ •

* refactor: useOuterClick ํ›… ์ ์šฉ

* refactor: useOuterClick ์—์„œ props ๋กœ ๋ฐ›์€ ref ์ˆซ์ž๊ฐ€ 0์ผ ๊ฒฝ์šฐ, ๊ธธ์ด๊ฐ€ 1๊ฐœ์ธ ๋ฐฐ์—ด์„ ๋””ํดํŠธ๋กœ ์ƒ์„ฑํ•˜๋„๋ก ์ˆ˜์ •

* fix: useOuterClick์˜ ์ด๋ฒคํŠธ ๋ฆฌ์Šค๋„ˆ์—์„œ ๋ถˆํ•„์š”ํ•œ ์กฐ๊ฑด๋ฌธ ์ œ๊ฑฐ
- Array ์˜ length ๊ฐ€ ๋ฌด์กฐ๊ฑด 1๊ฐœ ์ด์ƒ์ด๊ธฐ ๋•Œ๋ฌธ์—, ๋ถˆํ•„์š”ํ•œ ๊ฐ€๋“œ๋กœ ํŒ๋‹จ๋˜์–ด ์ œ๊ฑฐ

* fix: nullish ์—ฐ์‚ฐ์ž or ์—ฐ์‚ฐ์ž๋กœ ์ˆ˜์ •

* refactor: useOuterClick ํ•จ์ˆ˜์—์„œ innerRef ๋ฐฐ์—ด ํฌ๊ธฐ ์ง€์ •์„ ๊ฐ•์ œํ•˜๋„๋ก ์ˆ˜์ •
- requiredRefCount -> requiredInnerRefCount ๋กœ ๋„ค์ด๋ฐ ์ˆ˜์ •
- requiredInnerRefCount ํƒ€์ž… ์˜ต์…”๋„ ์ œ๊ฑฐ
- requiredInnerRefCount ๊ฐ€ 0๋ณด๋‹ค ๊ฐ™๊ฑฐ๋‚˜ ์ž‘์„ ๊ฒฝ์šฐ 1๋กœ ๊ฐ•์ œํ•˜๋„๋ก ์ˆ˜์ •

* refactor: useOuterClick ๋ฐ˜ํ™˜ ๊ฐ’ ์ฃผ์„ ์ž‘์„ฑ

* refactor: useOuterClick ๋ฐ˜ํ™˜๊ฐ’ ์ˆ˜์ •
- ๊ธฐ์กด์— ๊ฐ์ฒดํ˜•ํƒœ๋กœ ๋ฐ˜ํ™˜ํ•˜๋˜ ๊ฒƒ์„ array ๋กœ ์ˆ˜์ •

* refactor: SearchForm component ๋ฆฌ๋ Œ๋”๋ง ์ตœ์†Œํ™” ๋กœ์ง ์ถ”๊ฐ€ (#535)

* chore: tomcat ์„ค์ • ์ถ”๊ฐ€ (#533)

* feat: Service Layer์—์„œ ์™„์„ฑ๋œ DTO ๋ฐ˜ํ™˜ (#534)

* refactor: ChannelSubscriptionService DTO ๋ฐ˜ํ™˜ํ•˜๋„๋ก ๋ณ€๊ฒฝ

* style: ๋ฉ”์„œ๋“œ ์ˆœ์„œ CRUD๋กœ ๋ณ€๊ฒฝ

* style: ์ค„๋ฐ”๊ฟˆ ๋ณ€๊ฒฝ

Co-authored-by: hyewoncc <80666066+hyewoncc@users.noreply.github.com>
Co-authored-by: yeonLog <53105735+yeon-06@users.noreply.github.com>
Co-authored-by: ๋ด„ <55357130+JangBomi@users.noreply.github.com>
Co-authored-by: Jaejeung Ko <jaejeung3210@gmail.com>
  • Loading branch information
5 people committed Sep 22, 2022
1 parent f34cd15 commit 9e8ed38
Show file tree
Hide file tree
Showing 205 changed files with 4,242 additions and 2,267 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "backend/src/main/resources/security"]
path = backend/src/main/resources/security
url = https://github.com/2022-pickpick/security.git
[submodule "backend/src/test/resources/security"]
path = backend/src/test/resources/security
url = https://github.com/2022-pickpick/test-security.git
Original file line number Diff line number Diff line change
Expand Up @@ -39,45 +39,49 @@ public void verifyToken(final String token) {

@Transactional
public LoginResponse login(final String code) {
try {
String token = requestSlackToken(code);
String memberSlackId = requestMemberSlackId(token);
String token = requestSlackToken(code);
String memberSlackId = requestMemberSlackId(token);

Member member = members.findBySlackId(memberSlackId)
.orElseThrow(() -> new MemberNotFoundException(memberSlackId));
Member member = members.findBySlackId(memberSlackId)
.orElseThrow(() -> new MemberNotFoundException(memberSlackId));

boolean isFirstLogin = member.isFirstLogin();
member.markLoggedIn();
boolean isFirstLogin = member.isFirstLogin();
member.markLoggedIn();

return LoginResponse.builder()
.token(jwtTokenProvider.createToken(String.valueOf(member.getId())))
.firstLogin(isFirstLogin)
.build();
} catch (IOException | SlackApiException e) {
throw new SlackApiCallException(e);
}
return LoginResponse.builder()
.token(jwtTokenProvider.createToken(String.valueOf(member.getId())))
.firstLogin(isFirstLogin)
.build();
}

private String requestSlackToken(final String code) throws IOException, SlackApiException {
private String requestSlackToken(final String code) {
OAuthV2AccessRequest request = OAuthV2AccessRequest.builder()
.clientId(slackProperties.getClientId())
.clientSecret(slackProperties.getClientSecret())
.redirectUri(slackProperties.getRedirectUrl())
.code(code)
.build();

return slackClient.oauthV2Access(request)
.getAuthedUser()
.getAccessToken();
try {
return slackClient.oauthV2Access(request)
.getAuthedUser()
.getAccessToken();
} catch (IOException | SlackApiException e) {
throw new SlackApiCallException("oauthV2Access");
}
}

private String requestMemberSlackId(final String token) throws IOException, SlackApiException {
private String requestMemberSlackId(final String token) {
UsersIdentityRequest request = UsersIdentityRequest.builder()
.token(token)
.build();

return slackClient.usersIdentity(request)
.getUser()
.getId();
try {
return slackClient.usersIdentity(request)
.getUser()
.getId();
} catch (IOException | SlackApiException e) {
throw new SlackApiCallException("usersIdentity");
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.pickpick.utils;
package com.pickpick.auth.support;

import java.util.Enumeration;
import javax.servlet.http.HttpServletRequest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.pickpick.auth.ui;

import com.pickpick.auth.application.AuthService;
import com.pickpick.auth.support.AuthorizationExtractor;
import com.pickpick.auth.ui.dto.LoginResponse;
import com.pickpick.utils.AuthorizationExtractor;
import javax.servlet.http.HttpServletRequest;
import javax.validation.constraints.NotEmpty;
import org.springframework.web.bind.annotation.GetMapping;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.pickpick.auth.ui;

import com.pickpick.auth.support.AuthorizationExtractor;
import com.pickpick.auth.support.JwtTokenProvider;
import com.pickpick.utils.AuthorizationExtractor;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.cors.CorsUtils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.pickpick.auth.ui;

import com.pickpick.auth.support.AuthenticationPrincipal;
import com.pickpick.auth.support.AuthorizationExtractor;
import com.pickpick.auth.support.JwtTokenProvider;
import com.pickpick.utils.AuthorizationExtractor;
import javax.servlet.http.HttpServletRequest;
import org.springframework.core.MethodParameter;
import org.springframework.web.bind.support.WebDataBinderFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package com.pickpick.channel.application;

import com.pickpick.channel.domain.Channel;
import com.pickpick.channel.domain.ChannelRepository;
import com.pickpick.exception.SlackApiCallException;
import com.slack.api.methods.MethodsClient;
import com.slack.api.methods.SlackApiException;
import com.slack.api.model.Conversation;
import java.io.IOException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Transactional
@Service
public class ChannelCreateService {

private final ChannelRepository channels;
private final MethodsClient slackClient;

public ChannelCreateService(final ChannelRepository channels, final MethodsClient slackClient) {
this.channels = channels;
this.slackClient = slackClient;
}

public Channel createChannel(final String channelSlackId) {
try {
Conversation conversation = slackClient
.conversationsInfo(request -> request.channel(channelSlackId))
.getChannel();

Channel channel = toChannel(conversation);

return channels.save(channel);
} catch (IOException | SlackApiException e) {
throw new SlackApiCallException("conversationsInfo");
}
}

private Channel toChannel(final Conversation channel) {
return new Channel(channel.getId(), channel.getName());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,47 @@

import com.pickpick.channel.domain.Channel;
import com.pickpick.channel.domain.ChannelRepository;
import com.pickpick.exception.SlackApiCallException;
import com.slack.api.methods.MethodsClient;
import com.slack.api.methods.SlackApiException;
import com.slack.api.model.Conversation;
import java.io.IOException;
import com.pickpick.channel.domain.ChannelSubscription;
import com.pickpick.channel.domain.ChannelSubscriptionRepository;
import com.pickpick.channel.ui.dto.ChannelResponse;
import com.pickpick.channel.ui.dto.ChannelResponses;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Transactional(readOnly = true)
@Service
public class ChannelService {

private final ChannelRepository channels;
private final MethodsClient slackClient;
private final ChannelSubscriptionRepository channelSubscriptions;

public ChannelService(final ChannelRepository channels, final MethodsClient slackClient) {
public ChannelService(final ChannelRepository channels, final ChannelSubscriptionRepository channelSubscriptions) {
this.channels = channels;
this.slackClient = slackClient;
this.channelSubscriptions = channelSubscriptions;
}

public Channel createChannel(final String channelSlackId) {
try {
Conversation conversation = slackClient.conversationsInfo(
request -> request.channel(channelSlackId)
).getChannel();
public ChannelResponses findAll(final Long memberId) {
List<Channel> allChannels = channels.findAllByOrderByName();
Set<Channel> subscribedChannels = findSubscribedChannels(memberId);

Channel channel = toChannel(conversation);
List<ChannelResponse> channelResponses = findChannelResponses(allChannels, subscribedChannels);
return new ChannelResponses(channelResponses);
}

return channels.save(channel);
} catch (IOException | SlackApiException e) {
throw new SlackApiCallException(e);
}
private Set<Channel> findSubscribedChannels(final Long memberId) {
return channelSubscriptions.findAllByMemberId(memberId)
.stream()
.map(ChannelSubscription::getChannel)
.collect(Collectors.toSet());
}

private Channel toChannel(final Conversation channel) {
return new Channel(channel.getId(), channel.getName());
private List<ChannelResponse> findChannelResponses(final List<Channel> allChannels,
final Set<Channel> subscribedChannels) {
return allChannels.stream()
.map(channel -> ChannelResponse.of(subscribedChannels, channel))
.collect(Collectors.toList());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
import com.pickpick.channel.domain.ChannelSubscription;
import com.pickpick.channel.domain.ChannelSubscriptionRepository;
import com.pickpick.channel.ui.dto.ChannelOrderRequest;
import com.pickpick.channel.ui.dto.ChannelResponse;
import com.pickpick.channel.ui.dto.ChannelSubscriptionRequest;
import com.pickpick.channel.ui.dto.ChannelSubscriptionResponse;
import com.pickpick.channel.ui.dto.ChannelSubscriptionResponses;
import com.pickpick.exception.channel.ChannelNotFoundException;
import com.pickpick.exception.channel.SubscriptionDuplicateException;
import com.pickpick.exception.channel.SubscriptionNotExistException;
Expand Down Expand Up @@ -39,31 +40,6 @@ public ChannelSubscriptionService(final ChannelSubscriptionRepository channelSub
this.members = members;
}

public List<ChannelResponse> findAll(final Long memberId) {
List<Channel> allChannels = channels.findAllByOrderByName();
List<Channel> subscribedChannels = findSubscribedChannels(memberId);

return getChannelResponsesWithIsSubscribed(allChannels, subscribedChannels);
}

private List<ChannelResponse> getChannelResponsesWithIsSubscribed(final List<Channel> allChannels,
final List<Channel> subscribedChannels) {
return allChannels.stream()
.map(channel -> ChannelResponse.of(subscribedChannels, channel))
.collect(Collectors.toList());
}

private List<Channel> findSubscribedChannels(final Long memberId) {
return channelSubscriptions.findAllByMemberId(memberId)
.stream()
.map(ChannelSubscription::getChannel)
.collect(Collectors.toList());
}

public List<ChannelSubscription> findAllOrderByViewOrder(final Long memberId) {
return channelSubscriptions.findAllByMemberIdOrderByViewOrder(memberId);
}

@Transactional
public void save(final ChannelSubscriptionRequest subscriptionRequest, final Long memberId) {
Long channelId = subscriptionRequest.getChannelId();
Expand All @@ -75,7 +51,7 @@ public void save(final ChannelSubscriptionRequest subscriptionRequest, final Lon

validateDuplicatedSubscription(channel, member);

channelSubscriptions.save(new ChannelSubscription(channel, member, getMaxViewOrder(memberId)));
channelSubscriptions.save(new ChannelSubscription(channel, member, getMaxViewOrder(member)));
}

private void validateDuplicatedSubscription(final Channel channel, final Member member) {
Expand All @@ -84,12 +60,22 @@ private void validateDuplicatedSubscription(final Channel channel, final Member
}
}

private int getMaxViewOrder(final Long memberId) {
return channelSubscriptions.findFirstByMemberIdOrderByViewOrderDesc(memberId)
private int getMaxViewOrder(final Member member) {
return channelSubscriptions.findFirstByMemberOrderByViewOrderDesc(member)
.map(it -> it.getViewOrder() + ORDER_NEXT)
.orElse(ORDER_FIRST);
}

public ChannelSubscriptionResponses findByMemberId(final Long memberId) {
List<ChannelSubscriptionResponse> channelSubscriptionResponses = channelSubscriptions
.findAllByMemberIdOrderByViewOrder(memberId)
.stream()
.map(ChannelSubscriptionResponse::from)
.collect(Collectors.toList());

return new ChannelSubscriptionResponses(channelSubscriptionResponses);
}

@Transactional
public void updateOrders(final List<ChannelOrderRequest> orderRequests, final Long memberId) {
List<ChannelSubscription> subscribedChannels = channelSubscriptions.findAllByMemberId(memberId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.pickpick.member.domain.Member;
import java.util.List;
import java.util.Optional;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;

public interface ChannelSubscriptionRepository extends Repository<ChannelSubscription, Long> {
Expand All @@ -11,17 +12,17 @@ public interface ChannelSubscriptionRepository extends Repository<ChannelSubscri

void saveAll(Iterable<ChannelSubscription> channelSubscriptions);

@Query("select cs from ChannelSubscription cs where cs.member.id = :memberId")
List<ChannelSubscription> findAllByMemberId(Long memberId);

@Query("select cs from ChannelSubscription cs where cs.member.id = :memberId order by cs.viewOrder")
List<ChannelSubscription> findAllByMemberIdOrderByViewOrder(Long memberId);

Optional<ChannelSubscription> findFirstByMemberIdOrderByViewOrderDesc(Long memberId);
Optional<ChannelSubscription> findFirstByMemberOrderByViewOrderDesc(Member member);

Optional<ChannelSubscription> findFirstByMemberIdOrderByViewOrderAsc(Long memberId);

boolean existsByChannelAndMember(Channel channel, Member member);

void deleteAllByMemberId(Long memberId);

void deleteAllByChannelAndMember(Channel channel, Member member);
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.pickpick.channel.ui;

import com.pickpick.auth.support.AuthenticationPrincipal;
import com.pickpick.channel.application.ChannelSubscriptionService;
import com.pickpick.channel.application.ChannelService;
import com.pickpick.channel.ui.dto.ChannelResponses;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
Expand All @@ -11,14 +11,14 @@
@RequestMapping("/api/channels")
public class ChannelController {

private final ChannelSubscriptionService channelSubscriptionService;
private final ChannelService channelService;

public ChannelController(final ChannelSubscriptionService channelSubscriptionService) {
this.channelSubscriptionService = channelSubscriptionService;
public ChannelController(final ChannelService channelService) {
this.channelService = channelService;
}

@GetMapping
public ChannelResponses findAllChannels(final @AuthenticationPrincipal Long memberId) {
return new ChannelResponses(channelSubscriptionService.findAll(memberId));
return channelService.findAll(memberId);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
import com.pickpick.channel.application.ChannelSubscriptionService;
import com.pickpick.channel.ui.dto.ChannelOrderRequest;
import com.pickpick.channel.ui.dto.ChannelSubscriptionRequest;
import com.pickpick.channel.ui.dto.ChannelSubscriptionResponse;
import com.pickpick.channel.ui.dto.ChannelSubscriptionResponses;
import java.util.List;
import java.util.stream.Collectors;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
Expand All @@ -29,11 +27,7 @@ public ChannelSubscriptionController(final ChannelSubscriptionService channelSub

@GetMapping
public ChannelSubscriptionResponses getAllChannels(final @AuthenticationPrincipal Long memberId) {
return new ChannelSubscriptionResponses(
channelSubscriptionService.findAllOrderByViewOrder(memberId)
.stream()
.map(ChannelSubscriptionResponse::from)
.collect(Collectors.toList()));
return channelSubscriptionService.findByMemberId(memberId);
}

@PostMapping
Expand Down

0 comments on commit 9e8ed38

Please sign in to comment.