Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,7 @@
## 2024-07-13 - ์ผ๊ด„ ์—…๋กœ๋“œ ํผ์— ํ”„๋ฆฌ์…‹ ๋ฒ„ํŠผ ๋ฐ ํŒŒ์ผ ํฌ๊ธฐ ๋ฏธ๋ฆฌ๋ณด๊ธฐ ์ถ”๊ฐ€
**Learning:** ์ผ๊ด„ ํŒŒ์ผ ์—…๋กœ๋“œ ํผ์—์„œ ๋Œ€์ƒ ๋ฐ”์ดํŠธ(target_bytes) ์ž…๋ ฅ ํ•„๋“œ๋งŒ ์ œ๊ณตํ•˜๋ฉด ์‚ฌ์šฉ์ž๊ฐ€ ์›ํ•˜๋Š” ์šฉ๋Ÿ‰์„ ๋ฐ”์ดํŠธ ๋‹จ์œ„๋กœ ์ •ํ™•ํžˆ ๊ณ„์‚ฐํ•˜๊ธฐ ์–ด๋ ค์›Œ ์‚ฌ์šฉ์„ฑ์ด ๋–จ์–ด์ง‘๋‹ˆ๋‹ค. ์‚ฌ์šฉ์ž๊ฐ€ ์—ฌ๋Ÿฌ ํŒŒ์ผ์„ ์—…๋กœ๋“œํ•  ๋•Œ ์ด ํŒŒ์ผ ํฌ๊ธฐ๋ฅผ ํŒŒ์•…ํ•˜์ง€ ๋ชปํ•ด ์—…๋กœ๋“œ ์ œํ•œ์„ ์ดˆ๊ณผํ•˜๊ฑฐ๋‚˜ ์ž˜๋ชป๋œ ๋Œ€์ƒ ๋ฐ”์ดํŠธ๋ฅผ ์„ค์ •ํ•  ์œ„ํ—˜์ด ํฝ๋‹ˆ๋‹ค.
**Action:** ์ผ๊ด„ ํŒŒ์ผ ์—…๋กœ๋“œ ํผ์—๋„ ๋‹จ์ผ ํŒŒ์ผ ์—…๋กœ๋“œ ํผ๊ณผ ๋™์ผํ•˜๊ฒŒ ๋Œ€์ƒ ๋ฐ”์ดํŠธ๋ฅผ ์‰ฝ๊ฒŒ ์„ ํƒํ•  ์ˆ˜ ์žˆ๋Š” ๋น ๋ฅธ ํ”„๋ฆฌ์…‹ ๋ฒ„ํŠผ์„ ์ถ”๊ฐ€ํ•˜๊ณ , `onchange` ์ด๋ฒคํŠธ ๋ฐœ์ƒ ์‹œ ์„ ํƒ๋œ ๋ชจ๋“  ํŒŒ์ผ์˜ ํฌ๊ธฐ๋ฅผ ํ•ฉ์‚ฐํ•˜์—ฌ ์‚ฌ๋žŒ์ด ์ฝ๊ธฐ ์‰ฌ์šด ๋‹จ์œ„(MiB, GiB ๋“ฑ)๋กœ ๋ฏธ๋ฆฌ๋ณด๊ธฐ๋ฅผ ์ œ๊ณตํ•˜๋„๋ก JavaScript ๋กœ์ง์„ ๊ฐœ์„ ํ–ˆ์Šต๋‹ˆ๋‹ค.

## 2024-05-18 - ์ˆซ์ž ์ž…๋ ฅ ํ•„๋“œ ์ธ๋ผ์ธ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ UX ๊ฐœ์„ 
**ํ•™์Šต:** ์ˆซ์ž ์ž…๋ ฅ์„ ์œ„ํ•œ ์ธ๋ผ์ธ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ๋ฅผ ๊ตฌํ˜„ํ•  ๋•Œ, ๊ฐ’์ด ๋น„์›Œ์ง„(empty string) ์ƒํƒœ๋ฅผ ๋ช…์‹œ์ ์œผ๋กœ ์ฒ˜๋ฆฌํ•˜์ง€ ์•Š์œผ๋ฉด ๋ธŒ๋ผ์šฐ์ €๊ฐ€ ์‚ฌ์šฉ์ž์—๊ฒŒ 'Must be greater than 0.'๊ณผ ๊ฐ™์€ ๋ถˆํ•„์š”ํ•œ ์ปค์Šคํ…€ ์—๋Ÿฌ๋ฅผ ํ‘œ์‹œํ•˜๊ณ  HTML5์˜ ๊ธฐ๋ณธ `required` ์†์„ฑ ๋™์ž‘์„ ๋ฐฉํ•ดํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.
**์‹คํ–‰:** ์ž…๋ ฅ๊ฐ’์ด `this.value === ''`์ผ ๋•Œ, ๋ช…์‹œ์ ์œผ๋กœ `this.setCustomValidity('')` ๋ฐ `this.removeAttribute('aria-invalid')`๋ฅผ ํ˜ธ์ถœํ•˜์—ฌ ์ปค์Šคํ…€ ์—๋Ÿฌ๋ฅผ ์ง€์šฐ๊ณ  ๋„ค์ดํ‹ฐ๋ธŒ ์ œ์•ฝ ์กฐ๊ฑด์ด ์ •์ƒ์ ์œผ๋กœ ๋™์ž‘ํ•˜๋„๋ก ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
12 changes: 10 additions & 2 deletions saas_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,11 @@ async def add_security_headers(request: Request, call_next):
);
});

if (isNaN(val) || val <= 0) {
if (this.value === '') {
preview.innerText = '';
this.setCustomValidity('');
this.removeAttribute('aria-invalid');
} else if (isNaN(val) || val <= 0) {
preview.innerText = 'Must be greater than 0.';
preview.style.color = '#dc3545';
this.setCustomValidity('Must be greater than 0.');
Expand All @@ -282,7 +286,11 @@ async def add_security_headers(request: Request, call_next):
);
});

if (isNaN(val) || val <= 0) {
if (this.value === '') {
preview.innerText = '';
this.setCustomValidity('');
this.removeAttribute('aria-invalid');
} else if (isNaN(val) || val <= 0) {
preview.innerText = 'Must be greater than 0.';
preview.style.color = '#dc3545';
this.setCustomValidity('Must be greater than 0.');
Expand Down
Loading