Skip to content

Conversation

@benjaminleonard
Copy link
Contributor

Fixes #2063 inspired by #2067.

Much cleaner compared to that approach since we use defaultValues and don't need to set anything on the form directly after its been initialised.

CleanShot 2024-05-17 at 16 34 10

Cherry picked the route param commits from #2249

@vercel
Copy link

vercel bot commented May 17, 2024

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

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Jul 16, 2024 5:26pm

@benjaminleonard benjaminleonard changed the base branch from main to vpc-routes May 17, 2024 15:51
@just-be-dev
Copy link
Contributor

Clever! (👋)

@benjaminleonard
Copy link
Contributor Author

Come back!

@david-crespo david-crespo self-assigned this May 23, 2024
@david-crespo
Copy link
Collaborator

david-crespo commented May 23, 2024

Love this and it is wonderfully clean. I have some tweaks to make and I'll add an e2e test too. My only issue is "New similar rule" — tolerable for sure but maybe we can do better. I see the difficulty here because you want to convey both of these things at once:

  1. It's using the existing rule as a starting point, but you can edit it
  2. It only opens the form, it does not actually create anything right off

So 2 rules out the usual words like "copy" or "duplicate". I wonder if "clone" has more of a templatey connotation.

  • Clone and edit
  • Copy and edit
  • Use as template

All kind of weird. Use as template isn't bad. Could we have a tooltip on a non-disabled button saying "Create a new rule using this one as a template"? Is that disgusting?

@david-crespo
Copy link
Collaborator

We could do a random 3 digit number or something to combat that.

Base automatically changed from vpc-routes to main June 26, 2024 22:50
@david-crespo
Copy link
Collaborator

Ugh these conflicts are not cool!

@david-crespo
Copy link
Collaborator

@charliepark and I talked the button copy question to death and landed on Clone by itself. We decided the user uncertainty the first time about whether it creates it directly is tolerable because in the worst case, it creates an identical rule and you can just delete it. And of course we don't actually do that, we just open the form. Copy doesn't work because it suggests something more like copy/paste and we have the Copy ID button right above that actually does mean that.

@david-crespo
Copy link
Collaborator

We decided to go with adding -copy to the copied rule's name instead of a number. We will fix #2220 for v10, so it is fine.

@david-crespo david-crespo changed the title Copy existing firewall rule Clone firewall rule Jul 16, 2024
@david-crespo david-crespo enabled auto-merge (squash) July 16, 2024 17:28
@david-crespo david-crespo merged commit d7e92f6 into main Jul 16, 2024
@david-crespo david-crespo deleted the firewall-template branch July 16, 2024 17:33
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.

Firewall rules: Provide capability to easily set up new rules by copying an existing one

5 participants