Skip to content
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

Use GUIDs for ephemeral PluginWidgets #784

Merged
merged 2 commits into from
Sep 18, 2023

Conversation

boatbomber
Copy link
Member

Because Roact will destroy and recreate a plugin widget if it unmounts and remounts, Studio will complain about making a new widget with the same ID as the old one.

The simplest solution is to just use GUIDs so we never have to worry about this again. The ID is used internally for storing the widget's dock state and other internal details, so we don't want all our widgets to use GUIDs, only the ephemeral popup ones.

@boatbomber boatbomber added scope: plugin Relevant to the Roblox Studio plugin size: small status: needs review This work is mostly done, but just needs work to integrate and merge it. skip changelog PRs that may skip the changelog enforcement check labels Sep 18, 2023
@boatbomber boatbomber requested a review from Dekkonot September 18, 2023 21:38
@boatbomber boatbomber self-assigned this Sep 18, 2023
@Dekkonot Dekkonot enabled auto-merge (squash) September 18, 2023 21:42
@Dekkonot Dekkonot merged commit 840e9be into rojo-rbx:master Sep 18, 2023
9 checks passed
@boatbomber boatbomber deleted the unique-widget-ids branch September 18, 2023 21:46
Dekkonot pushed a commit to UpliftGames/rojo that referenced this pull request Jan 11, 2024
Because Roact will destroy and recreate a plugin widget if it unmounts
and remounts, Studio will complain about making a new widget with the
same ID as the old one.

The simplest solution is to just use GUIDs so we never have to worry
about this again. The ID is used internally for storing the widget's
dock state and other internal details, so we don't want *all* our
widgets to use GUIDs, only the ephemeral popup ones.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: plugin Relevant to the Roblox Studio plugin size: small skip changelog PRs that may skip the changelog enforcement check status: needs review This work is mostly done, but just needs work to integrate and merge it.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants