-
Notifications
You must be signed in to change notification settings - Fork 15
Instance resize modal #2495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instance resize modal #2495
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Handled in #2496 instead
|
Better for it not to be a link and just pop the modal on the list view when you're there, and pop it on the detail view when you're there. It might be as simple as |
|
Sounds good. Why do you think it's better? Simpler implementation? |
|
More the UX. I think it’s weird for clicking resize on instance list to take you to a different page when it doesn’t have to. |
|
Ah of course, I guess I was only really looking at it from the root instance view route. |
| onActivate() { | ||
| navigate(pb.instanceResize(instanceSelector)) | ||
| onActivate: () => { | ||
| options.onResizeClick && options.onResizeClick(instance) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interestingly this does not fail when run locally.
But also there must be a better way of doing this? onResizeClick should not be optional but our declaration of options as {} insists on it.






Building on your PR @david-crespo
As you said, modal seems to work much better here. Kept it as a route so we can link to it from the instances list page. One thing to keep in mind is because it's a link, you can get here even if the instance is not currently stopped – so we should highlight that, even if the API would prevent it. Do we want to say that an instance must be stopped, failed or creating (or is this sufficient)? I doubt most people would be quick enough whilst it was creating, and if it's failed you just wouldn't see the message.
We can reuse the number fields from the instance create form. On that, I think we should remove the number limit and instead let the form validation describe to the user why they cannot create an instance above the CPU and memory threshold rather than just preventing it.
Unsure if this error handling is sufficient. Do we want to expand the modal to show errors like the side modal form, instead of the toast?