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

refactor: toggle UI/UX #491

Merged
merged 20 commits into from
Jan 17, 2024
Merged

refactor: toggle UI/UX #491

merged 20 commits into from
Jan 17, 2024

Conversation

hozzijeong
Copy link
Collaborator

๐Ÿ”ฅ ์—ฐ๊ด€ ์ด์Šˆ

๐Ÿš€ ์ž‘์—… ๋‚ด์šฉ

  • ์ข€ ๋” ๋ฒ”์šฉ์ ์ธ installPrompt ์ž‘์„ฑ: firefox์—์„œ๋Š” installPrompt ์•ˆ๋‚ด๊ฐ€ ๋‹ค๋ฅด๊ฒŒ ์ด๋ฃจ์–ด์ ธ์„œ ํ•ด๋‹น ๊ฐ’์„ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค
  • FCM ๊ด€๋ จ ๋กœ์ง์„ Tanstack-Query๋ฅผ ์‚ฌ์šฉํ•ด์„œ ๋น„๋™๊ธฐ ์ƒํƒœ๊ด€๋ฆฌ ํ–ˆ์Šต๋‹ˆ๋‹ค
  • ํ† ํฐ ์‚ญ์ œ(fcm๊ณผ ํ†ต์‹ ) ๋˜๋Š” ๊ตฌ๋… ์ทจ์†Œ (์„œ๋ฒ„์™€ ํ†ต์‹ ) ๋ฐœ์ƒํ•˜๋Š” ์—๋Ÿฌ๋ฅผ ํ•œ๋ฒˆ์— ๊ด€๋ฆฌํ•˜๊ธฐ ์œ„ํ•ด Promise.allSetted๋ผ๋Š” ๋ฉ”์„œ๋“œ๋ฅผ ํ†ตํ•ด ํ•œ๋ฒˆ์— ์ฒ˜๋ฆฌํ–ˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ’ฌ ๋ฆฌ๋ทฐ ์ค‘์ ์‚ฌํ•ญ

๋ธŒ๋žœ์น˜๋ฅผ ํŒ๊ฒŒ 2๋‹ฌ ์ „์ธ๋ฐ ์ด์ œ์„œ์•ผ PR์„ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค ใ…  ์‚ฌ์ด์‚ฌ์ด์— ์ผ์ด ์ข€ ๋งŽ์•˜์–ด์„œ... ใ…Ž

์—๋Ÿฌ ์ฒ˜๋ฆฌ ๊ด€๋ จ

ํ˜„์žฌ ๊ธฐ์กด ์‚ฌ์ดํŠธ์—์„œ ๊ตฌ๋… ํ•ด์ œ์‹œ์— ์•„๋ž˜์™€ ๊ฐ™์€ ๋ฉ”์„ธ์ง€๊ฐ€ ๋‚˜ํƒ€๋‚˜๊ณ  ์žˆ๋Š”๋ฐ, ๋ถˆํ•„์š”ํ•œ ๊ฒƒ ๊ฐ™์•„์„œ "๊ตฌ๋… ์ทจ์†Œ์ค‘์— ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค"๋กœ ๋Œ€์ฒดํ–ˆ์Šต๋‹ˆ๋‹ค.
image

์—๋Ÿฌ ์ฒ˜๋ฆฌ๋ฅผ ํ•  ๋•Œ response ๋‚ด๋ถ€์— ์žˆ๋Š” ๋ฉ”์„ธ์ง€๋ฅผ ๋ฐ›๊ธฐ ์œ„ํ•ด StatusError์— errorResponse๋ผ๋Š” ๊ฐ์ฒด๋ฅผ ๊ฐ™์ด ๋„˜๊ธธ ์ˆ˜ ์žˆ๋„๋ก ํ–ˆ์Šต๋‹ˆ๋‹ค.
์ €ํฌ๋Š” ์˜๋„์ ์œผ๋กœ ์„œ๋ฒ„์—์„œ ์—๋Ÿฌ๋ฅผ ๋˜์งˆ ๋•Œ response ๋‚ด๋ถ€์— message์˜ ํ˜•ํƒœ๋กœ ๋˜์ง€๋„๋ก ํ–ˆ๋Š”๋ฐ, response๋ฅผ jsonํ˜•ํƒœ๋กœ ๋ณ€ํ™˜ํ•˜๊ธฐ ์ „์— ์—๋Ÿฌ๋ฅผ throw ํ•ด๋ฒ„๋ฆฌ๋‹ˆ๊นŒ ์•ˆ์— ์žˆ๋Š” ๊ฐ’์„ ํ™•์ธํ•  ์ˆ˜ ์—†์—ˆ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ํ•ด๋‹น ์ „๋‹ฌ๋ฐ›์€ response ๊ฐ์ฒด๋ฅผ throwํ• ๋•Œ ๊ฐ™์ด ๋„˜๊ธฐ๊ณ , ํ•ด๋‹น ์—๋Ÿฌ๋ฅผ catch ํ•œ ๊ณณ์—์„œ .json์œผ๋กœ ํŒŒ์‹ฑํ•ด์„œ ํ•ด๋‹น ๊ฐ์ฒด์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋„๋ก ์„ค์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.

์ด ๋ฐฉ์‹์ด ๊ณผ์—ฐ ์˜ณ์€์ง€ ํ•œ๋ฒˆ ๋ด์ฃผ์‹œ๋ฉด... ๊ฐ์‚ฌํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค 40d2625

FCM ๋กœ์ง์„ Tanstack-Query๋กœ ๋ถ„๋ฆฌํ•œ ์ 

๊ธฐ์กด์—๋Š” class๋กœ ์บก์Šํ™” ํ•ด์„œ ๋น„๋™๊ธฐ ์ฒ˜๋ฆฌ๋ฅผ ํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ–ˆ์—ˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ, ๋น„๋™๊ธฐ ์ฒ˜๋ฆฌ ๊ด€๋ฆฌ๊ฐ€ ์‰ฝ์ง€ ์•Š์„ ๋ฟ๋”๋Ÿฌ ์ง๊ด€์ ์ด์ง€ ์•Š๋‹ค๋Š” ์ƒ๊ฐ์ด ๋“ค์—ˆ๊ณ  ํ•ด๋‹น ๋งค๋ฒˆ token ๊ฐ’์„ ์ „์—ญ ๊ฐ์ฒด์— ๋„ฃ์–ด์•ผ ํ•œ๋‹ค๋Š” ์ ์ด ์ข€ ๋ถˆํŽธํ•˜๊ฒŒ ๋Š๊ปด์กŒ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ Tanstack-query๋ฅผ ํ†ตํ•ด ์ƒํƒœ ๊ด€๋ฆฌ๋ฅผ ํ•  ์ˆ˜ ์žˆ๊ฒŒ๋” ์ฝ”๋“œ๋ฅผ ๋ณ€๊ฒฝํ–ˆ์Šต๋‹ˆ๋‹ค

ํ˜น์‹œ ์ฝ”๋“œ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์—์„œ ์–ด์ƒ‰ํ•œ ์ ์ด ์žˆ๋Š”์ง€ ํ•œ๋ฒˆ ํ™•์ธํ•ด์ฃผ์„ธ์š”!!

@hozzijeong hozzijeong added ๐Ÿ› ๏ธ ๋ฆฌํŒฉํ„ฐ๋ง ๋ฆฌํŒฉํ„ฐ๋ง์„ ์œ„ํ•œ ์ด์Šˆ์ž…๋‹ˆ๋‹ค ๐Ÿ‡ ํ”„๋ก ํŠธ์—”๋“œ ํ”„๋ก ํŠธ์—”๋“œ ๊ด€๋ จ ์ด์Šˆ์ž…๋‹ˆ๋‹ค labels Jan 11, 2024
@Kim0914 Kim0914 assigned Kim0914 and rawfishthelgh and unassigned bassyu and WaiNaat Jan 17, 2024
Copy link
Collaborator

@Kim0914 Kim0914 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
Collaborator

@rawfishthelgh rawfishthelgh left a comment

Choose a reason for hiding this comment

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

ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค~!

@hozzijeong hozzijeong merged commit 437ac3f into develop Jan 17, 2024
2 checks passed
@hozzijeong hozzijeong deleted the refactor/476-improve_Toggle_UX branch January 17, 2024 05:24
@Kim0914 Kim0914 assigned bassyu and WaiNaat and unassigned Kim0914 and rawfishthelgh Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
๐Ÿ‡ ํ”„๋ก ํŠธ์—”๋“œ ํ”„๋ก ํŠธ์—”๋“œ ๊ด€๋ จ ์ด์Šˆ์ž…๋‹ˆ๋‹ค ๐Ÿ› ๏ธ ๋ฆฌํŒฉํ„ฐ๋ง ๋ฆฌํŒฉํ„ฐ๋ง์„ ์œ„ํ•œ ์ด์Šˆ์ž…๋‹ˆ๋‹ค
Projects
Status: Done
5 participants