-
Notifications
You must be signed in to change notification settings - Fork 53
Studio: Force latest WP version for creating site if the user goes offline #1383
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
Conversation
|
I left the tooltip as currently is when offline e.g. |
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.
Worked as described, nice catch!
Have you considered treating it as an error and disable the button if the version is not latest and is offline? All of this behavior is an edge case, but I could see a scenario where the connection fails for a short time and we change the version without the user noticing it. Having an error would make it more visible.
I am in two minds about this because we sort of block the changing of versions already when editing site instead of allowing the user to trigger the error. Perhaps, a middle ground could be to change the tooltip to something like "You are currently offline and can create a site only with the latest version. Selecting a different version requires an internet connection". Alternatively, we can also source more opinions. On my end, I don't have a strong preference. |
|
I like that suggestion! |
Yeah exactly! |
gavande1
left a comment
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.
wojtekn
left a comment
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.
The code change looks clear, works as expected. Nice improvement!

Related issues
Fixes STU-494
Proposed Changes
Currently, if the user opens the
Add siteform, chooses a custom WP version that needs to be downloaded and then their connection cuts, Studio attempts to download that WP version and this results in a gibberish error.I propose to force the
latestversion for creating a site if the user is offline since this comes with Studio already and should work without connection.Testing Instructions
npm startAdd sitein the sidebarlatestlatestPre-merge Checklist