-
Notifications
You must be signed in to change notification settings - Fork 24.9k
fix(community-cli-plugin): Add description in target debugs to distinguish RN Bridge and reanimated #54198
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
base: main
Are you sure you want to change the base?
Conversation
@cortinico has imported this pull request. If you are a Meta employee, you can view this in D85041647. |
({title, description}, i) => | ||
`${styleText(['white', 'inverse'], ` ${i + 1} `)} - "${title} (${description})"`, |
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.
Perhaps we could tweak this to disambiguate only when there are conflicting title
s in the target list. This would prevent showing the verbose description
field in the default case.
({title, description}, i) => | |
`${styleText(['white', 'inverse'], ` ${i + 1} `)} - "${title} (${description})"`, | |
const hasDuplicateTitles = | |
new Set(targets.map(target => target.title)).size < targets.length; | |
this.#setTerminalMenu( | |
`Multiple debug targets available, please select:\n ${targets | |
.slice(0, 9) | |
.map( | |
({title, description}, i) => | |
`${styleText(['white', 'inverse'], ` ${i + 1} `)} - "${title}"${hasDuplicateTitles ? ` (${description})` : ''}`, | |
) | |
.join('\n ')}`, | |
); |
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.
I see that the PR was "imported", which I'm unsure what does that mean. I do not mind doing the above. @cortinico let me know if this is required and can be done
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.
Yeah this is feedback from me on this PR — it goes through a second review once imported. If you push changes here, we'll re-import :)
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.
yup basically what @huntie said
Summary:
As I point out in this issue, when integration reanimated, we end up with two debug targets having the same title. This can confuse and lead people to think something is wrong.
Adding the description alongside the title to better explain where the second debug target comes from eliminates the confusion.
Changelog:
[General] [Fixed] - Add description to target debugs to differentiate RNBridge and Reanimated debug targets
Test Plan:
Tested in this RN 82 project with the latest reanimated by overriding the code in the
node_module
Before:

After:
