Skip to content

AO3-7409 Adjust header and page subtitle for managing invitations#5780

Open
jmalark wants to merge 1 commit intootwcode:masterfrom
jmalark:AO3-7409-manage-invitations-title
Open

AO3-7409 Adjust header and page subtitle for managing invitations#5780
jmalark wants to merge 1 commit intootwcode:masterfrom
jmalark:AO3-7409-manage-invitations-title

Conversation

@jmalark
Copy link
Copy Markdown
Contributor

@jmalark jmalark commented May 3, 2026

Pull Request Checklist

Issue

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

Purpose

On the manage invitations page, adjusts the browser subtitle and the header

Credit

Jesse Malark he/him

@jmalark jmalark force-pushed the AO3-7409-manage-invitations-title branch 2 times, most recently from 7c2db7e to 646a997 Compare May 3, 2026 23:13
Comment thread app/controllers/invitations_controller.rb Outdated
Comment thread app/views/invitations/manage.html.erb Outdated
@@ -1,5 +1,5 @@
<!--Descriptive page name, messages and instructions-->
<h2 class="heading"><%= logged_in_as_admin? ? (@user.login + "'s") : "Your" %> Invitations</h2>
<h2 class="heading"><%= t(logged_in_as_admin? ? ".admin_header" : ".header", username: @user.login) %></h2>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

For admins, let's go with "Manage Invitations for %{usernames}". I'll update the issue.

To keep close to our usual naming convention, let's use the keys page_heading.admin and page_heading.user

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated

@jmalark jmalark force-pushed the AO3-7409-manage-invitations-title branch from 01ff6ed to a560bbb Compare May 8, 2026 04:36

expect(response).to render_template("manage")
end
it "assigns subtitle with username in it" do
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Tiny nitpick, but as long as we need another commit to finish getting the heading key straightened out, could you add a blank line above this?

@@ -1,5 +1,5 @@
<!--Descriptive page name, messages and instructions-->
<h2 class="heading"><%= logged_in_as_admin? ? (@user.login + "'s") : "Your" %> Invitations</h2>
<h2 class="heading"><%= t(logged_in_as_admin? ? ".page_heading_admin" : ".page_heading_user", username: @user.login) %></h2>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you make these page_heading.admin and page_heading.user, please? It should look like this in the locale file:

manage:
  page_heading:
    admin: text
    user: text

And apologies for not catching this before, but the current code will define the username variable even when we don't need it. It's not terrible, but it would be better to do something like

<h2 class="heading">
  <% if logged_in_as_admin? %>
    <%= t(".page_heading.admin", username: @user.login) %>
  <% else %>
    [etc]

That would also mean i18n-tasks unused -l en should pass without needing to add anything to ignore_unused.

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.

2 participants