fix: restore lines background with configurable color - #502
Conversation
3044c33 to
7472902
Compare
|
์๋
ํ์ธ์ @oosuhada ๋ ์ปค๋ฐ๊ณผ ์ถฉ๋์ ํด๊ฒฐํด์ฃผ์ค ์ ์์ผ์ ๊ฐ์? |
7472902 to
36e4970
Compare
|
์๋ ํ์ธ์ @devxb ๋, ํ์ธ ๊ฐ์ฌํฉ๋๋ค. fork ์ชฝ commit history๊ฐ upstream๊ณผ ๋ค๋ฅด๊ฒ ์ฐ๊ฒฐ๋์ด unrelated commits๊ฐ ํจ๊ป ํฌํจ๋ ์ํ์์ต๋๋ค. upstream/main ๊ธฐ์ค์ผ๋ก history๋ฅผ ๋ค์ ์ ๋ฆฌํ๊ณ 1๊ฐ์ commit์ผ๋ก ์ ๋ฆฌํ์ต๋๋ค. ํ์ฌ conflict ์์ด ๋ณ๊ฒฝ์ฌํญ๋ #492 ๊ด๋ จ 5๊ฐ ํ์ผ๋ง ๋จ์ ์์ต๋๋ค. ๋ค์ ํ๋ฒ ํ์ธ ๋ถํ๋๋ฆฝ๋๋ค! |
| @PathVariable("username") username: String, | ||
| @RequestParam(name = "pet-id", defaultValue = "0") personaId: String, | ||
| @RequestParam(name = "contribution-view", defaultValue = "true") contributionView: Boolean, | ||
| @RequestParam(name = "background-color", defaultValue = "white") backgroundColor: String, |
There was a problem hiding this comment.
๋์์ด ์์ถฉ๋๋๊ฑฐ ๊ฐ์ต๋๋ค.
RequestParam background-color ๋ ์์ผ๋ฉด ๊ธฐ๋ณธ๊ฐ์ผ๋ก white๋ฅผ ๋ฐ๊ณ ์์ง๋ง,
animationFacade.getLineAnimation ํจ์์ backgroundColor ๊ธฐ๋ณธ๊ฐ์ transparent์ธ ๊ฒ ๊ฐ์์.
ํ์ํธํ์ฑ ์ ์ง๋ฅผ ์ํด, RequestParam์ defaultValue๋ transparent๋ก ์ธํ ํด์ฃผ์๋ฉด ๊ฐ์ฌ๋๋ฆฌ๊ฒ ์ต๋๋ค.
There was a problem hiding this comment.
ํ์ธ ๊ฐ์ฌํฉ๋๋ค! ๊ธฐ์กด /lines/{username}์ transparent ๋์์ ์ ์งํ๋ ํธ์ด ํ์ํธํ์ฑ ์ธก๋ฉด์์ ๋ ์ ์ ํ ๊ฒ ๊ฐ์ต๋๋ค. RequestParam์ ๊ธฐ๋ณธ๊ฐ๋ transparent๋ก ๋ง์ถฐ ๋ฐ์ํ์ต๋๋ค. ๊ฐ์ฌํฉ๋๋ค!
์์ฝ
/lines/{username}endpoint์ ๊ธฐ๋ณธ ๋ฐฐ๊ฒฝ์ ํฐ์์ผ๋ก ๋ณต์ํ์ต๋๋ค.background-colorquery parameter๋ฅผ ์ถ๊ฐํด ๋คํฌ๋ชจ๋๋ ๋ค๋ฅธ ๋ฐฐ๊ฒฝ์์๋ ์ํ๋ ์์์ ์ง์ ์ง์ ํ ์ ์๋๋ก ํ์ต๋๋ค./lines/{username}โwhite/lines/{username}?background-color=0d1117/lines/{username}?background-color=transparent#0d1117ํํ๋ ์ง์ํ๋ฉฐ URL์์๋#๋ฅผ%23์ผ๋ก ์ธ์ฝ๋ฉํ ์ ์์ต๋๋ค.white,transparent, 3/4/6/8์๋ฆฌ hex ์์๋ง ํ์ฉํฉ๋๋ค./lines/{username}/only-petsendpoint๋ ๊ธฐ์กด์ ํฌ๋ช ๋ฐฐ๊ฒฝ ๋์์ ์ ์งํฉ๋๋ค.width,height,viewBox๋ฅผ ๋ค์ ์ถ๊ฐํ์ง ์์ ๊ธฐ์กด ๋ฐ์ํ SVG ํฌ๊ธฐ ์กฐ์ ๋์๋ ์ ์งํฉ๋๋ค.ํ ์คํธ
./gradlew test --tests 'org.gitanimals.render.domain.UserTest' --console=plaingit diff --check1200x150viewport ์ ์ฒด๋ฅผ ์ฑ์ฐ๋ ๊ฒ๋ headless Chrome์์ ํ์ธํ์ต๋๋ค.Summary
/lines/{username}endpoint so GitHub page colors do not show throughbackground-colorquery parameter so users can choose a background that fits dark mode or other surfaces/lines/{username}โwhite/lines/{username}?background-color=0d1117/lines/{username}?background-color=transparent#0d1117as well;#can be URL-encoded as%23white,transparent, or 3/4/6/8 digit hex colors to avoid SVG attribute injection/lines/{username}/only-petsendpointwidth,height, orviewBoxattributesTest
./gradlew test --tests 'org.gitanimals.render.domain.UserTest' --console=plaingit diff --check1200x150viewportFixes #492