Skip to content

AO3-7410 Fix the inconsistency in the site name on the page title for works and series#5766

Open
CelineB-sudo wants to merge 5 commits into
otwcode:masterfrom
CelineB-sudo:AO3-7410
Open

AO3-7410 Fix the inconsistency in the site name on the page title for works and series#5766
CelineB-sudo wants to merge 5 commits into
otwcode:masterfrom
CelineB-sudo:AO3-7410

Conversation

@CelineB-sudo
Copy link
Copy Markdown
Contributor

Pull Request Checklist

Issue

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

Purpose

What does this PR do?
It resolves the inconsistency in the page titles for works and series. The browser page title had the site name formatted as "[App Name]," but every other page uses the format "| App Name."
Now, all pages use the format “| App Name”.

The tests have been updated to reflect the changes.

Credit

What name and pronouns should we use to credit you in the Archive of Our Own's Release Notes?
Céline Bertaud (she/her)

@CelineB-sudo CelineB-sudo marked this pull request as ready for review April 28, 2026 19:32
Copy link
Copy Markdown
Member

@marcus8448 marcus8448 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!

end

page_title += " [#{ArchiveConfig.APP_NAME}]" unless options[:omit_archive_name]
page_title += " | #{ArchiveConfig.APP_NAME}" unless options[:omit_archive_name]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it would be a bit nicer to stop appending the app name altogether in this function, and instead update all of its uses to set @page_subtitle instead of @page_title.

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.

Good call 👍 More files have changed, mainly because I renamed 2 functions for clarity.
Rspec tests have been added to check how browser_page_title sets the app name in the title.

- Remove APP_NAME appending from get_page_title
- Update works_controller, chapters_controller, series_controller to use @page_subtitle
- Remove obsolete omit_archive_name option from comments_controller
- Rename get_page_title to get_page_subtitle for clarity
- Rename work_page_title to work_page_subtitle for clarity
- Updated tests and added tests for browser_page_title
Copy link
Copy Markdown
Member

@marcus8448 marcus8448 left a comment

Choose a reason for hiding this comment

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

Thank you!

And I should not see "pinchhitter"
When I follow "Fulfilling Story 1"
Then I should see the page title "Fulfilling Story 1 - Anonymous - Stargate Atlantis [Example Archive]"
Then I should see the page title "Fulfilling Story 1 - Anonymous - Stargate Atlantis | Example Archive"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One extra (optional) note: Since this test is being updated, could you add a And the app name is "Example Archive" to the list of Given steps? This prevents the test from failing when a custom app name is set in the config.

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