Skip to content

Add "See Migration Guide" button to the Project Manager #107623

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

Merged
merged 1 commit into from
Jun 25, 2025

Conversation

patwork
Copy link
Contributor

@patwork patwork commented Jun 17, 2025

Adds a “See Migration Guide” button to the project update warning window. When clicked, a documentation page opens in an external browser:

https://docs.godotengine.org/en/stable/tutorials/migrating/

upgrade from 4.x:
see1

upgrade from 3.x:
see2

@AThousandShips AThousandShips changed the title Added "See Migration Guide" button to the Project Manager Add "See Migration Guide" button to the Project Manager Jun 17, 2025
@AThousandShips AThousandShips requested a review from a team June 17, 2025 11:57
@AThousandShips AThousandShips added this to the 4.x milestone Jun 17, 2025
Copy link
Member

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the feature is fine as is, but I wonder if it'd be doable to send the user to a more specific, appropriate page if the difference is one minor or major release (such as "4.4 -> 4.5"), and if the page is available, of course.

@patwork patwork force-pushed the add-migration-guide-button branch from 9740424 to 4ec1db1 Compare June 17, 2025 19:22
@KoBeWi
Copy link
Member

KoBeWi commented Jun 17, 2025

The feature is fine, but the main problem is that it introduces a real maintenance burden. Right now the button opens Godot 4.5 migration guide, and greets the user with page not found. That's not acceptable, and it means we need to make sure we have a migration guide ready at least for the stable release, for each version onward, even if the guide is going to be empty.

I also wonder about the placement of the button. Wouldn't it be better if it was in the middle?

I wonder if it'd be doable to send the user to a more specific, appropriate page if the difference is one minor or major release

It would be best if we had a dedicated migration guide page that could generate its content dynamically. So you could open the page with current version and target version in the URL and it would copy-paste relevant guides between these versions. That's an overkill solution though. For now we could link previous and next migration guide in each page, so the user can quickly find them.

@patwork patwork force-pushed the add-migration-guide-button branch 2 times, most recently from 9643b78 to e4e1420 Compare June 24, 2025 09:28
@patwork
Copy link
Contributor Author

patwork commented Jun 24, 2025

Fair points.

I agree that the need to update the documentation beforehand to make the button work properly is an unnecessary burden. That's why I changed the link to a universal address describing the procedure for migration to the new versions.

https://docs.godotengine.org/en/latest/tutorials/migrating/index.html

As recommended, I use GODOT_VERSION_DOCS_URL but I agree that it doesn't make sense to create a file-scope #define, because the url is only used in one place in one small function.

void ProjectManager::_migration_guide_button_pressed() {
	const String url = vformat("%s/tutorials/migrating/index.html", GODOT_VERSION_DOCS_URL);
	OS::get_singleton()->shell_open(url);
}

As for the placement of the button, I'm using AcceptDialog::add_button, which only allows adding a button "to the right" or "to the left." I suppose it would require directly accessing the buttons_hbox member of the AcceptDialog class to insert the button between Cancel and OK.

@KoBeWi KoBeWi modified the milestones: 4.x, 4.5 Jun 24, 2025
@patwork patwork force-pushed the add-migration-guide-button branch from e4e1420 to b4627b7 Compare June 25, 2025 06:16
@akien-mga akien-mga merged commit 3407194 into godotengine:master Jun 25, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants