Skip to content

Conversation

@wescopeland
Copy link
Member

This PR adds support for game URLs with set parameters in the forum.

On submit, these are converted to [game={backingGameId}].

Screenshot 2025-10-29 at 6 30 44 PM

@wescopeland wescopeland requested a review from a team October 29, 2025 22:31

public static function convertGameSetShortcodesToBackingGame(string $input): string
{
// Extract all [game=X?set=Y] or [game=X set=Y] patterns.
Copy link
Member

Choose a reason for hiding this comment

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

If the pattern is detected, the game portion is ignored.

[game=9999 set=9534]

still maps to the sonic subset.

Should the game association be validated?

Wouldn't it be easier to just have [set=9534]?

Copy link
Member Author

Choose a reason for hiding this comment

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

Logically, I think a [set=] shortcode is easier, but I'm afraid it may be more challenging from a UX POV:

  1. It's one more button.
  2. We don't expose the set IDs of base sets, which could make the functionality ambiguous or confusing.

Granted, [game=X?set=Y] doesn't feel good from a UX POV either.

Copy link
Member Author

Choose a reason for hiding this comment

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

The more I think on this, the more I'm wondering if it's worth simplifying this implementation significantly. Rather than messing with shortcodes, what if we just detect inline game set URLs (whether it's game or game2), and have this functionality only work on those things. That may be an easier UX to explain to folks.

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