Skip to content

🎨 Palette: μž…λ ₯ ν•„λ“œκ°€ λΉ„μ–΄μžˆμ„ λ•Œ 숫자 μœ νš¨μ„± 검사 μ΄ˆκΈ°ν™”#276

Open
seonghobae wants to merge 1 commit into
mainfrom
jules-palette-fix-empty-string-validation-5076865064330229252
Open

🎨 Palette: μž…λ ₯ ν•„λ“œκ°€ λΉ„μ–΄μžˆμ„ λ•Œ 숫자 μœ νš¨μ„± 검사 μ΄ˆκΈ°ν™”#276
seonghobae wants to merge 1 commit into
mainfrom
jules-palette-fix-empty-string-validation-5076865064330229252

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor
  • πŸ’‘ What: 숫자 μž…λ ₯ ν•„λ“œκ°€ λΉ„μ–΄ μžˆμ„ λ•Œ 였λ₯˜ λ©”μ‹œμ§€μ™€ 뢉은 ν…Œλ‘λ¦¬ μŠ€νƒ€μΌ(aria-invalid="true")이 μ΄ˆκΈ°ν™”λ˜λ„λ‘ 슀크립트λ₯Ό μˆ˜μ •ν–ˆμŠ΅λ‹ˆλ‹€.
  • 🎯 Why: μ‚¬μš©μžκ°€ 잘λͺ»λœ 값을 μž…λ ₯ν•œ ν›„ ν•„λ“œλ₯Ό μ™„μ „νžˆ 지웠을 λ•Œ μ‹œκ°μ μœΌλ‘œλ‚˜ μ ‘κ·Όμ„± μΈ‘λ©΄μ—μ„œ μ—¬μ „νžˆ 였λ₯˜ μƒνƒœλ‘œ λ‚¨μ•„μžˆλŠ” 문제λ₯Ό ν•΄κ²°ν•˜μ—¬ 더 λ‚˜μ€ μ‚¬μš©μž κ²½ν—˜μ„ μ œκ³΅ν•˜κΈ° μœ„ν•¨μž…λ‹ˆλ‹€.
  • πŸ“Έ Before/After: μˆ˜μ • μ „μ—λŠ” ν…μŠ€νŠΈλŠ” μ§€μ›Œμ Έλ„ μ—λŸ¬ μƒνƒœκ°€ λ‚¨μ•˜μœΌλ‚˜, μˆ˜μ • ν›„μ—λŠ” μƒνƒœκ°€ μ΄ˆκΈ°ν™”λ©λ‹ˆλ‹€.
  • β™Ώ Accessibility: 값이 없을 λ•Œ aria-invalid 속성과 μ‚¬μš©μž μ§€μ • μœ νš¨μ„± 검사 μƒνƒœλ₯Ό μ΄ˆκΈ°ν™”ν•˜μ—¬ ν™”λ©΄ νŒλ…κΈ°κ°€ λΆ€μ •ν™•ν•œ μƒνƒœλ₯Ό 읽지 μ•Šκ²Œ λ§Œλ“€μ—ˆμŠ΅λ‹ˆλ‹€.

PR created automatically by Jules for task 5076865064330229252 started by @seonghobae

Copilot AI review requested due to automatic review settings July 22, 2026 17:34
@google-labs-jules

Copy link
Copy Markdown

πŸ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a πŸ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the FastAPI UI’s client-side numeric validation so that when a user fully clears a numeric input, the previously-set error state (custom validity + aria-invalid) is properly reset. This aligns the web UI behavior with the accessibility goal of not leaving screen readers and users stuck in an incorrect β€œinvalid” state after the input is emptied.

Changes:

  • Updated target_bytes and batch_target_bytes input handlers to treat empty-string input as a β€œreset” case (clear preview and remove invalid state).
  • Added a new Palette learning/action entry documenting the empty-string handling pattern for JS validation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
saas_web.py Adjusts the inline JS validation logic to clear error state when the input is emptied.
.jules/palette.md Documents the empty-string reset pattern as a reusable UI validation guideline.

πŸ’‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread saas_web.py
Comment on lines +258 to +262
if (this.value === '') {
preview.innerText = '';
this.setCustomValidity('');
this.removeAttribute('aria-invalid');
} else if (isNaN(val) || val <= 0) {
Comment thread saas_web.py
Comment on lines +289 to +293
if (this.value === '') {
preview.innerText = '';
this.setCustomValidity('');
this.removeAttribute('aria-invalid');
} else if (isNaN(val) || val <= 0) {
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.

2 participants