Skip to content

Conversation

@joshenlim
Copy link
Member

@joshenlim joshenlim commented Oct 9, 2025

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

image

Separately, also removed react-copy-to-clipboard package dependency - swapped out to use our copyToClipboard util method instead

For Design team:

JFYI i've also updated the CodeBlock and SimpleCodeBlock components to support an optional handleCopy prop, 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 CodeBlock and SimpleCodeBlock components 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 highlighting

To test

  • Verify that you can hide / show anon key in the edge functions details page
  • Verify that when you copy the curl value in the "Invoke function" while key is hidden, the copied value will contain the actual key value

@joshenlim joshenlim requested review from a team as code owners October 9, 2025 03:42
@vercel
Copy link

vercel bot commented Oct 9, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
design-system Ready Ready Preview Comment Oct 9, 2025 3:55am
docs Ready Ready Preview Comment Oct 9, 2025 3:55am
studio-self-hosted Ready Ready Preview Comment Oct 9, 2025 3:55am
studio-staging Ready Ready Preview Comment Oct 9, 2025 3:55am
ui-library Ready Ready Preview Comment Oct 9, 2025 3:55am
zone-www-dot-com Ready Ready Preview Comment Oct 9, 2025 3:55am
2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
cms Ignored Ignored Oct 9, 2025 3:55am
studio Ignored Ignored Oct 9, 2025 3:55am

@supabase
Copy link

supabase bot commented Oct 9, 2025

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2025

Studio E2E Results

  • Total: 1
  • Passed: 1
  • Failed: 0
  • Skipped: 0
  • Timed out: 0
  • Interrupted: 0
  • Flaky: 0
  • Duration: 2.4s

Artifacts: https://github.com/supabase/supabase/actions/runs/18364910146

Last updated: Thursday 9, October, 2025 04:02:56 (UTC)

Copy link
Contributor

@dnywh dnywh left a comment

Choose a reason for hiding this comment

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

Can confirm:

  • Verify that you can hide / show anon key in the edge functions details page
  • Verify that when you copy the curl value in the "Invoke function" while key is hidden, the copied value will contain the actual key value

Looks good! Will leave broader design feedback elsewhere.

@joshenlim joshenlim merged commit 10d75de into master Oct 9, 2025
23 of 27 checks passed
@joshenlim joshenlim deleted the chore/add-hide-show-anon-key-button-in-edge-function-details branch October 9, 2025 05:46
ivasilov pushed a commit that referenced this pull request Oct 14, 2025
* Add hide/show anon key button to edge function details page, remove react-copy-to-clipboard package

* Clean
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