π¨ Palette: μ λ ₯ νλκ° λΉμ΄μμ λ μ«μ μ ν¨μ± κ²μ¬ μ΄κΈ°ν#276
Conversation
|
π 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
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_bytesandbatch_target_bytesinput 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.
| if (this.value === '') { | ||
| preview.innerText = ''; | ||
| this.setCustomValidity(''); | ||
| this.removeAttribute('aria-invalid'); | ||
| } else if (isNaN(val) || val <= 0) { |
| if (this.value === '') { | ||
| preview.innerText = ''; | ||
| this.setCustomValidity(''); | ||
| this.removeAttribute('aria-invalid'); | ||
| } else if (isNaN(val) || val <= 0) { |
aria-invalid="true")μ΄ μ΄κΈ°νλλλ‘ μ€ν¬λ¦½νΈλ₯Ό μμ νμ΅λλ€.aria-invalidμμ±κ³Ό μ¬μ©μ μ§μ μ ν¨μ± κ²μ¬ μνλ₯Ό μ΄κΈ°ννμ¬ νλ©΄ νλ κΈ°κ° λΆμ νν μνλ₯Ό μ½μ§ μκ² λ§λ€μμ΅λλ€.PR created automatically by Jules for task 5076865064330229252 started by @seonghobae