Skip to content

AO3-7378 Add button to copy setup key to clipboard for totp#5735

Open
jmalark wants to merge 3 commits intootwcode:masterfrom
jmalark:AO3-7378_copy_button_for_setup_code
Open

AO3-7378 Add button to copy setup key to clipboard for totp#5735
jmalark wants to merge 3 commits intootwcode:masterfrom
jmalark:AO3-7378_copy_button_for_setup_code

Conversation

@jmalark
Copy link
Copy Markdown
Contributor

@jmalark jmalark commented Apr 15, 2026

Pull Request Checklist

Issue

https://otwarchive.atlassian.net/browse/AO3-7378

Purpose

Context: an admin setting up two-step verification for their account

This PR adds a button to copy the setup key to the clipboard (as long as JavaScript is enabled, otherwise the button will not display)

Credit

Jesse Malark he/him

Comment thread app/views/admin/totp/reauthenticate_create.erb Outdated
Comment thread app/views/admin/totp/reauthenticate_create.erb Outdated
Comment thread config/locales/views/en.yml Outdated
Comment thread app/views/admin/totp/reauthenticate_create.erb Outdated
AO3-6229 Add static 404 error page (otwcode#5711)

AO3-6531 Fix comment decorator 500 error for orphaned comments (otwcode#5719)

* AO3-6531 Fix comment decorator 500 error when parent comment is physically deleted

* AO3-6531 Add rake task to create placeholders for orphaned comments

* AO3-6531 Rename orphaned_commentable_ids variable to missing_commentable_ids.Suggested by brianjaustin.

AO3-6531 Fix create_placeholders_for_orphaned_comments task 500 (otwcode#5736)

* AO3-6531 - Add spec for orphaned comment with nil threaded_left

* AO3-6531 - Handle nil threaded_left in orphaned comment placeholder task

AO3-7381 Update Devise to 5.0.3 (otwcode#5727)

AO3-6531 Remove after task for placeholder comments (otwcode#5740)

Per comments on the related ticket, this could lead to weird behaviour.
Pulling this out so the fix for the most critical part can go live.

AO3-7080 Fix suspended and banned user check (otwcode#5741)

AO3-7378 Fix the order of en.yml
@jmalark jmalark force-pushed the AO3-7378_copy_button_for_setup_code branch from c786289 to f31947e Compare April 20, 2026 23:50
Copy link
Copy Markdown
Collaborator

@sarken sarken left a comment

Choose a reason for hiding this comment

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

Thanks for working on this!

It looks like the issue didn't contain any design information, so I took a quick look. Can you please add the following CSS to the bottom of the .annotation styles in 22-system-messages.css? It will make sure the button is centered like the rest of the text, and take out the whitespace that was throwing off the vertical alignment.

.annotation .actions {
  float: none;
  margin-block-end: 0;
  padding-block-end: 0;
}

We can make a separate issue for this once this pull request is merged, but now that we have similar JavaScript in two places, we should also move the JavaScript to an external resource (most likely application.js). This makes it easier to maintain and reuse and is more in line with modern standards, particularly regarding security.

Copy link
Copy Markdown
Collaborator

@sarken sarken left a comment

Choose a reason for hiding this comment

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

Thanks for the CSS changes! I'll leave the final approval to Brian.

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.

3 participants