mirror of
https://github.com/coder/coder.git
synced 2026-11-03 14:21:04 +08:00
fix: improve click UX and styling for Auth Token page (#11863)
* wip: commit progress for clipboard update * wip: push more progress * chore: finish initial version of useClipboard revamp * refactor: update API query to use newer RQ patterns * fix: update importers of useClipboard * fix: increase clickable area of CodeExample * fix: update styles for CliAuthPageView * fix: resolve issue with ref re-routing * docs: update comments for clarity * wip: commit progress on clipboard tests * chore: add extra test case for referential stability * wip: disable test stub to avoid breaking CI * wip: add test case for tab-switching * feat: finish changes * fix: improve styling for strong text * fix: make sure period doesn't break onto separate line * fix: make center styling more friendly to screen readers * refactor: clean up mocking implementation * fix: resolve security concern for clipboard text * fix: update CodeExample to obscure text when appropriate * fix: apply secret changes to relevant code examples * refactor: simplify code for obfuscating text * fix: partially revert clipboard changes * fix: clean up page styling further * fix: remove duplicate property identifier * refactor: rename variables for clarity * fix: simplify/revert CopyButton component design * fix: update how dummy input is hidden from page * fix: remove unused onClick handler prop * fix: resolve unused import * fix: opt code examples out of secret behavior
This commit is contained in:
@@ -5,6 +5,7 @@ const meta: Meta<typeof CodeExample> = {
|
||||
title: "components/CodeExample",
|
||||
component: CodeExample,
|
||||
args: {
|
||||
secret: false,
|
||||
code: `echo "hello, friend!"`,
|
||||
},
|
||||
};
|
||||
@@ -12,7 +13,11 @@ const meta: Meta<typeof CodeExample> = {
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof CodeExample>;
|
||||
|
||||
export const Example: Story = {};
|
||||
export const Example: Story = {
|
||||
args: {
|
||||
secret: false,
|
||||
},
|
||||
};
|
||||
|
||||
export const Secret: Story = {
|
||||
args: {
|
||||
@@ -22,6 +27,7 @@ export const Secret: Story = {
|
||||
|
||||
export const LongCode: Story = {
|
||||
args: {
|
||||
secret: false,
|
||||
code: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICnKzATuWwmmt5+CKTPuRGN0R1PBemA+6/SStpLiyX+L",
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user