Add hide/show anon key button to edge function details page #39384
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Adds a "Hide/show anon key" button in Edge Function details page that'll toggle the visibility of the anon key in the code block. Defaults to hidden at the beginning which will be helpful if the user is screen sharing
Separately, also removed
react-copy-to-clipboardpackage dependency - swapped out to use ourcopyToClipboardutil method insteadFor Design team:
JFYI i've also updated the
CodeBlockandSimpleCodeBlockcomponents to support an optionalhandleCopyprop, which will be called instead of the internal copy method within the component if provided.This is mainly to support copying content with obfuscated values when displayed in the UI, but you'd want the actual values to be in the copied content (such as in this case, the anon key is obfuscated in the UI but you'd want the key's value to not be obfuscated when copying the code content)
Although separately, wondering if we should / could de-dupe the
CodeBlockandSimpleCodeBlockcomponents as well - we'd possibly be able to remove some package dependency as well since both these components I think serve the same purpose but are using different libraries for syntax highlightingTo test