Skip to content

Improve report a problem flow #2990 - #3010

Open
BFoster-BF wants to merge 3 commits into
endlessm:mainfrom
BFoster-BF:Improve-Report-a-Problem-flow-#2990
Open

BFoster-BF wants to merge 3 commits into
endlessm:mainfrom
BFoster-BF:Improve-Report-a-Problem-flow-#2990

Conversation

@BFoster-BF

Copy link
Copy Markdown
Contributor

The existing .github/ISSUE_TEMPLATE/bug.yml bug report template has been updated to include 2 new text inputs for both the game resolution and the player location.

res://scenes/globals/pause/report_bug_button.gd has been modified to include both the current window size using DisplayServer.window_get_size() , and the player's global position using get_tree().get_first_node_in_group("player") together with the get_global_position()

This data is used in the url query string which is used to automatically populate the GitHub issue form.

Resolves Improve "Report a Problem" flow #2990

@BFoster-BF
BFoster-BF requested a review from a team as a code owner October 12, 2026 18:50
@github-actions

Copy link
Copy Markdown

Play this branch at https://play.threadbare.game/branches/BFoster-BF/Improve-Report-a-Problem-flow-%232990/.

(This launches the game from the start, not directly at the change(s) in this pull request.)

@manuq manuq left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is looking good! I'm requesting format changes.

url += (
"&location="
+ (
("%s,%s" % [player.get_global_position().x, player.get_global_position().y])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You can use the player.global_position property instead of player.get_global_position().

Also why is this Vector2 being encoded with uri_encode(), and the game_resolution (which is also a Vector2) isn't? I would expect either both be encoded, or none. I think both should be encoded for safety.

Also you are doing custom formatting on each, the resolution Vector2 has a x separator, and the global position Vector2 has a , separator. I think it will be better if both have the same formatting, for parsing them in the future. What about using the default formatting? calling str(vector) outputs: "(100.5, 21)" if vector = Vector2(100.5, 21.0).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The reason it is being url encoded is to do with the format. currently game_resolution only ever returns integers separated by an x separator. therefore no url encoding is necessary.
It was formatted this way to be more readable but maybe I was just trying to be too clever.

The format of player_location however contains a , separator so I thought it would be necessary to url encode() this to avoid problems with the url string,

I can see how this might be confusing though.

I'll amend to use default formatting as suggested.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yes, consider that at one point we will want to decode them. So is easier to do the same for both. Something like:

	prints("&resolution=" + str(Vector2(1920, 1080)).uri_encode())
	prints(("&resolution=" + str(Vector2(1920, 1080)).uri_encode()).uri_decode())

Which outputs:

&resolution=%281920.0%2C%201080.0%29
&resolution=(1920.0, 1080.0)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@BFoster-BF actually, after reading some more it looks like it's better to use str_to_var and var_to_str.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@BFoster-BF use this for encoding:

	var s := "&resolution=" + var_to_str(Vector2(1920, 1080)).uri_encode()
	prints(s)

And we will be able to decode it like this in the future:

	var v: Vector2 = str_to_var(s.split("=")[1].uri_decode())
	prints(v)

Comment on lines +29 to +31
If you report a problem from within the game, this will have been filled automatically with the current resolution.

You can change this if you are reporting a problem you saw in a different resolution.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good explanation!

Comment on lines +56 to +59
Provide the player's coordinates in the format `X,Y` (integers only, no spaces). If reporting from within the game,
this will have been filled automatically with the player's current location.

Leave blank if location is irrelevant to the issue.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This one too, nice explanation!

@manuq

manuq commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

Resolves Improve "Report a Problem" flow #2990

@BFoster-BF keep in mind that the correct format of this line is as documented here: https://github.com/endlessm/threadbare/wiki/Contributing#pull-request-descriptions

It matters that the format is the word and the number, just that. If you add anything in the middle like "improve..." it doesn't work.

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.

2 participants