Skip to content

Conversation

@germpy
Copy link

@germpy germpy commented Nov 22, 2025

Pull Request Checklist

Issue

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

Purpose

What does this PR do?
Builds on AO3-7205, but adds the warning when directly adding existing bookmark to a collection with the Add to Collection button. This PR adds that warning to the success message when directly adding existing bookmark to collection.

Testing Instructions

How can the Archive's QA team verify that this is working as you intended?
Build UI locally, follow repro steps in Jira ticket AO3-7211. Video of local testing included.

testing.collection.bookmarks.mp4

References

AO3-7205 Add a warning to the bookmark success message

Credit

Credit under "germpy" is fine, she/her. I dunno if this is a change that really requires credit tbhhhh

@sarken
Copy link
Collaborator

sarken commented Nov 23, 2025

Hi, germpy!

Thank you so much for this pull request. Someone will be along to review it soon.

I've updated the Jira issue status to In Review to make sure no one mistakenly creates a duplicate pull request. If you'd like the ability to comment on, assign, and transition issues in the future, you're welcome to create a Jira account! It makes things a bit easier for us on the organizational side if the Full Name on your Jira account either closely matches the name you'd like us to credit in the release notes or includes it in parentheses, e.g. "Nickname (CREDIT NAME)."

Once you've done that (or if you've already done it -- Jira has been unreliable about showing us new accounts in the admin panel lately), you can either reply here or send an email to otw-coders@transformativeworks.org with both your account name and email address and we'll set up the permissions for you.

Thanks again for contributing! If you have any questions, you can contact us at the same email address listed above.

@germpy
Copy link
Author

germpy commented Nov 23, 2025

An email has been sent, thank you!

Copy link
Member

@omerfaruk-pseud omerfaruk-pseud 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 so much for this PR! Two small problems, but looks pretty good.

unless new_collections.empty?
flash[:notice] = ts("Added to collection(s): %{collections}.",
collections: new_collections.collect(&:title).join(", "))
flash[:notice] += t("bookmarks.create.warnings.private_bookmark_added_to_collection")
Copy link
Member

Choose a reason for hiding this comment

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

Per our internationalization standards, you should avoid reusing the exact same locale key across different contexts, and use lazy lookup. Can you change this locale key to a new one and add it to locale file?

unless new_collections.empty?
flash[:notice] = ts("Added to collection(s): %{collections}.",
collections: new_collections.collect(&:title).join(", "))
flash[:notice] += t("bookmarks.create.warnings.private_bookmark_added_to_collection")
Copy link
Member

Choose a reason for hiding this comment

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

And also, in this situation the note wouldn't be added to endings of invited and unapproved collections' success messages. Can you move this line to a bit lower, just before where the message is created?

Copy link
Author

@germpy germpy Nov 25, 2025

Choose a reason for hiding this comment

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

Yep! Just to clarify, should I move it to replace the empty message in line 137 (which is only assigned if new_collections and unapproved_collections are empty), or after the unless statements at around line 155?

Copy link
Member

Choose a reason for hiding this comment

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

The latter, line 155, (though what line 137 does is kinda the opposite of what you said.)

@Bilka2 Bilka2 changed the title AO3-7211 : Add a warning to the success message when directly adding existing bookmark to collection AO3-7211 Add a warning to the success message when directly adding existing bookmark to collection Nov 24, 2025
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.

4 participants