Skip to content

Conversation

@quen-codes
Copy link

@quen-codes quen-codes commented Oct 26, 2025

Pull Request Checklist

  • Have you read "How to write the perfect pull request"?
  • Have you read the contributing guidelines?
  • Have you added tests for any changed functionality?
    • Note: there was no existing test for the banner functionality prior, and when I tried to add a cucumber scenario specifically for the modal case it turns out cucumber doesn't have access to the full page, only the modal element. I did add a general test case for the banner and rendering of the new user tips, though, and if it's necessary to test the modal specifically I'm happy to do more research on how that might work!
  • Have you added the Jira issue number as the first thing in your pull request title (e.g. AO3-1234 Fix thing)
  • Do you have fewer than 5 pull requests already open? If not, please wait
    until they are reviewed and merged before creating new pull requests.

Issue

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

Purpose

Fixes an issue where the "useful tips for new users" link was opening in a full unstyled HTML page rather than being rendered into a modal.

Implementation / Review Notes

I wasn't sure where the other modals are sourcing their footer text (I couldn't find those strings in the code base), so I set that to an empty string so that no footer text would display.

I also dropped the class option from the link_to_modal as that was not used by any of the three callers of that method (and if do we want to support concatenation of CSS classes it might be nice to do that more dynamically so as not to include the leading whitespace), but if it's necessary to keep that functionality I'm happy to walk that change back!

Testing Instructions

Per the very helpful instructions in the ticket:

  • Log in
  • Enable the new user help banner
  • Hi, username! > My Preferences
  • Check “Turn the new user help banner back on.”
  • Press “Update”
  • Follow the “useful tips for new users” link
  • When fixed: Confirm that the new user tips open in a modal, and that the modal can be closed as usual.

Credit

I don't have a Jira account made yet, though I'd be happy to have one created!

I can be credited as quen (or quen-codes), she/her

@sarken
Copy link
Collaborator

sarken commented Oct 26, 2025

Hi, quen!

Thank you so much for this pull request. Someone will be along to review it soon -- in the meantime, I've set the Jira issue to In Review to make sure no one else duplicates your work.

You're more than 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)," so we'd appreciate it if you could do that.

Once you've made your account, you can either reply here or send an email to [email protected] with your account name and email address and we'll set you up with the ability to comment on, assign, and transition issues in the future.

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

@quen-codes
Copy link
Author

Hi, quen!

Thank you so much for this pull request. Someone will be along to review it soon -- in the meantime, I've set the Jira issue to In Review to make sure no one else duplicates your work.

You're more than 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)," so we'd appreciate it if you could do that.

Once you've made your account, you can either reply here or send an email to [email protected] with your account name and email address and we'll set you up with the ability to comment on, assign, and transition issues in the future.

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

Thanks so much, I've sent an email to that address with my Jira info!

Copy link
Contributor

@ceithir ceithir left a comment

Choose a reason for hiding this comment

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

I also dropped the class option from the link_to_modal as that was not used by any of the three callers of that method

What about class: "help symbol question" in

" ".html_safe + link_to_modal(link, for: help_file, title: help_entry.split('-').join(' ').capitalize, class: "help symbol question").html_safe
?

And I follow "My Dashboard"
Then I should see "Hi! It looks like you've just logged in to AO3 for the first time."
When I follow "useful tips for new users"
Then I should see "Welcome to the Example Archive!"
Copy link
Contributor

Choose a reason for hiding this comment

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

Some existing tests appear to add within "#modal" at the end there, to check this is indeed a modal we're dealing with.

@quen-codes
Copy link
Author

I also dropped the class option from the link_to_modal as that was not used by any of the three callers of that method

What about class: "help symbol question" in

" ".html_safe + link_to_modal(link, for: help_file, title: help_entry.split('-').join(' ').capitalize, class: "help symbol question").html_safe

?

Ah great catch, I missed that (I think because it was in the same file as the method itself) - I'll walk that back!

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