Skip to content

Conversation

@charliepark
Copy link
Contributor

Found a bug in the logic on the disableClear button for the "add a transit IP" form — checking whether the field has anything in it gives a more reliable signal about whether it should be clearable or not. Also, I was able to add some logic to prevent duplication of IPs in the list.

@vercel
Copy link

vercel bot commented Sep 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Sep 27, 2024 9:58pm

@charliepark charliepark changed the title Fix disableClear, only add when IP is new Fix disableClear bug in Transit IP form; don't add duplicate IPs to list Sep 27, 2024
@david-crespo
Copy link
Collaborator

Pulled this into #2461 in a048e32. Thanks for fixing.

@david-crespo david-crespo deleted the refactor_transit_ip_miniform branch October 1, 2024 04:43
david-crespo added a commit that referenced this pull request Oct 1, 2024
* move ip utils to their own file

* validateIpNet util based one existing validateIp

* let's try a more interesting result type on the validator

* validate IPs and IP nets on the route form

* redo validateIp to look more like validateIpNet, esp. including message

* tweak validation logic to get more helpful messages, test it

* validate transit IPs on network interface edit

* split parse from validate, it's clean!

* fix e2e failure but it raises existential questions

* test leading zeroes in width

* pass noop validate functions to comboboxes that get swapped with textfields

* validate IPs, IP nets and names on firewall rules form

* fix subform revalidation issue

* really fix subform revalidation and test it like crazy

* add test for transit IPs form, incorporate PR #2480

#2480

* validate transit ip dupes in validate function

* tests that catch clear button bug, fix bug

* have to do the reset on success effect for transit IPs too

* test IP validation in route form

* polish up last two todos to do two twos too
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.

3 participants