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

Sanitize key in Developer Tools display #28991

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

tarunkishore2303
Copy link

@tarunkishore2303 tarunkishore2303 commented May 4, 2024

Summary

Added an utility function to sanitize the string before displaying it in tree

Finishes #28984

How did you test this change?

Added test cases for the utility function that has been created.

@facebook-github-bot
Copy link

Hi @tarunkishore2303!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@kassens
Copy link
Member

kassens commented May 6, 2024

Not sure devtools should just modify and display something different. That seems like it could easily be confusing - especially when that small difference is the cause of some sort of bug and need debugging.

Not sure if this is a common issue as I don't work on devtools, maybe it could display invisible characters such as newline escape codes like JSON, i.e. \n?

@hoxyq

@kassens kassens changed the title Sanitize key Sanitize key in Developer Tools display May 6, 2024
@hoxyq
Copy link
Contributor

hoxyq commented May 7, 2024

Not sure devtools should just modify and display something different. That seems like it could easily be confusing - especially when that small difference is the cause of some sort of bug and need debugging.

Not sure if this is a common issue as I don't work on devtools, maybe it could display invisible characters such as newline escape codes like JSON, i.e. \n?

@hoxyq

Yup, I think we don't need to replace anything here and instead use pre tag?
@tarunkishore2303 Could you please try wrapping the key text in pre tag and sharing a screenshot of how it looks?

I could help with building the extension locally, if needed.

@tarunkishore2303
Copy link
Author

tarunkishore2303 commented May 10, 2024

Yeah sure, I could do that. But I would need your help building the extension locally to test it out @hoxyq

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.

None yet

5 participants