Skip to content

LG-15681: Add service provider or logo to ready to verify email #12018

Merged
eileen-nava merged 9 commits intomainfrom
em/15681-update-barcode-emails
Mar 28, 2025
Merged

LG-15681: Add service provider or logo to ready to verify email #12018
eileen-nava merged 9 commits intomainfrom
em/15681-update-barcode-emails

Conversation

@eileen-nava
Copy link
Copy Markdown
Contributor

@eileen-nava eileen-nava commented Mar 24, 2025

🎫 Ticket

LG-15681: Eng: Add Partner Agency logo OR name to barcode emails

🛠 Summary of changes

  • Update the ready to verify emails
  • When service provider logo is a png, display the service provider logo
  • When service provider logo is a svg, display the service provider name
  • Include a line in between the Login.gov logo and the service provider logo or name

📜 Testing Plan

Ready to verify email for example OIDC app: ReadyToVerifyEmailOIDC

👀 Screenshots

Service provider with a png logo: ReadyToVerifyEmailPNGLogo
Service provider with a svg logo: ReadyToVerifyEmailSVGLogo

@eileen-nava eileen-nava requested review from a team, gina-yamada and kellular and removed request for a team March 24, 2025 19:08
@@ -33,6 +33,10 @@ def sp_logo_url
end
end
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we should consider moving sp_logo_url and friends into ServiceProvider. Would that allow us to avoid passing around the service_provider_session and use enrollment.service_provider.sp_logo_url instead?

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.

@mitchellhenke That proposed change would enable us to stop passing around the service_provider_session and would enable us to use enrollment.service_provider.sp_logo_url, which would be good. I am wondering how removing sp_logo_url from ServiceProviderSession would affect other areas of the code base. app/views/shared/_nav_branded.html.erb relies on decorated_sp_session to render the service provider logo. Thoughts?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It would probably require some refactoring of other areas, yeah, and maybe the refactor deserves its own PR, but I don't feel strongly either way. Also happy to help with that, just let me know.

Comment on lines +315 to +316
@logo_is_png = logo_is_png
@sp_logo_url = sp_logo_url
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we're not going to use the sp_logo_url in some cases, could we do something like the following and use whether the sp_logo_url is defined in the template?

Suggested change
@logo_is_png = logo_is_png
@sp_logo_url = sp_logo_url
if logo_is_png
@sp_logo_url = sp_logo_url
else
@sp_logo_url = nil
end

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like @mitchellhenke suggestions. I did test current implementation out locally- via mailer and in moving through the flow and it is working as I'd expect. I would like to review code/test if you decide to make his changes. Please reach out so I can review/approve at that time.

Screenshot 2025-03-24 at 3 50 15 PM

Screenshot 2025-03-24 at 3 50 41 PM

Screenshot 2025-03-24 at 3 50 59 PM

Copy link
Copy Markdown
Contributor

@shanechesnutt-ft shanechesnutt-ft left a comment

Choose a reason for hiding this comment

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

Things are looking good. I have a couple more comments that might be nice to also improve.

Comment on lines +1035 to +1044
let(:view_context) { ActionController::Base.new.view_context }
let(:sp) { build_stubbed(:service_provider, logo: nil) }
let(:decorated_sp_session) do
ServiceProviderSessionCreator.new(
sp: sp,
view_context: view_context,
sp_session: { issuer: sp.issuer },
service_provider_request: ServiceProviderRequestProxy.new,
).create_session
end
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are the added let variables here still needed (as well as the decorated_sp_session below)?

Copy link
Copy Markdown

@kellular kellular left a comment

Choose a reason for hiding this comment

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

This LGTM

Co-authored-by: Mitchell Henke <mitchell.henke@gsa.gov>
Copy link
Copy Markdown
Contributor

@shanechesnutt-ft shanechesnutt-ft left a comment

Choose a reason for hiding this comment

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

Looks good to me! Ran through the test plan another time. 👍🏻

@eileen-nava eileen-nava merged commit faa62c5 into main Mar 28, 2025
1 check passed
@eileen-nava eileen-nava deleted the em/15681-update-barcode-emails branch March 28, 2025 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants