Skip to content

fix: stop spin button at exclusive bound#491

Open
suhr25 wants to merge 3 commits into
open-telemetry:mainfrom
suhr25:fix/exclusive-min-max-number-input
Open

fix: stop spin button at exclusive bound#491
suhr25 wants to merge 3 commits into
open-telemetry:mainfrom
suhr25:fix/exclusive-min-max-number-input

Conversation

@suhr25
Copy link
Copy Markdown
Contributor

@suhr25 suhr25 commented May 15, 2026

SUMMARY

Fixes an issue where NumberInputControl treated exclusiveMinimum / exclusiveMaximum as HTML min / max values. This caused the spin button to stop at values that were actually invalid and immediately failed validation.

FIX

Updated NumberInputControl to only use inclusive minimum and maximum values for the HTML input attributes. Since HTML number inputs treat min and max as inclusive bounds, using exclusive schema constraints was misleading the UI and allowing users to land on invalid values like 0 for fields that must be greater than 0. Added a regression test to ensure exclusive-only constraints no longer set HTML min/max attributes.

CHECKLIST

  • Reproduced issue locally
  • Applied fix in NumberInputControl
  • Added regression test
  • Verified tests pass locally

Use only inclusive minimum/maximum for the HTML min/max attributes.
Exclusive bounds are already enforced by validateField; passing them
as the HTML attribute made the spin button stop at a value that
validation then rejected.

Signed-off-by: Suhrid Marwah <suhridmarwah07@gmail.com>
@suhr25 suhr25 requested review from a team as code owners May 15, 2026 09:46
@netlify
Copy link
Copy Markdown

netlify Bot commented May 15, 2026

Deploy Preview for otel-ecosystem-explorer canceled.

Name Link
🔨 Latest commit 8e9a159
🔍 Latest deploy log https://app.netlify.com/projects/otel-ecosystem-explorer/deploys/6a08ab88e1664200086cc47f

@suhr25
Copy link
Copy Markdown
Contributor Author

suhr25 commented May 15, 2026

Hi @vitorvasc @jaydeluca,
Kindly review.
Thanks!

@jaydeluca
Copy link
Copy Markdown
Member

@suhr25 can you provide steps on how to reproduce this issue? For example, which input do you see this problem occurring on?

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