Conversation
We are reusing the gpo_controller aka "Want a letter?" code to create this interstitial page. changelog: User-Facing Improvements, Confirmation page, add interstitial confirming that the user wants another letter sent
aduth
approved these changes
Jun 2, 2023
app/views/idv/gpo/index.html.erb
Outdated
|
|
||
| <%= render AlertComponent.new(message: t('idv.messages.gpo.info_alert'), class: 'margin-bottom-4') %> | ||
| <% if @presenter.resend_requested? %> | ||
| <%= render AlertIconComponent.new(icon_name: :warning, class: 'display-block margin-bottom-2') %> |
Contributor
There was a problem hiding this comment.
Since all of the content varies depending on this condition, I'd wonder if it'd be better to use StatusPageComponent rather than constructing its parts.
i.e.
<% if @presenter.resend_requested? %>
<%= render StatusPageComponent.new(status: :warning) do |c| %>
<% c.with_header { @presenter.title } %>
<p>
<%= t('idv.messages.gpo.resend_timeframe') %>
</p>
<p>
<%= t('idv.messages.gpo.resend_code_warning') %>
</p>
<% end %>
<% else %>
<%= render AlertComponent.new(message: t('idv.messages.gpo.info_alert'), class: 'margin-bottom-4') %>
<%= render PageHeadingComponent.new.with_content(@presenter.title) %>
<p>
<%= t('idv.messages.gpo.address_on_file_html') %>
<%= t('idv.messages.gpo.timeframe_html') %>
</p>
<% end %>
soniaconnolly
approved these changes
Jun 2, 2023
Contributor
soniaconnolly
left a comment
There was a problem hiding this comment.
I tested this out and it all works beautifully. I logged out and back in before entering the code.
I saw an email on the resend, but none on the first letter request. I assume that was existing behavior since I didn't see it in the code. Looks like the presenter was already there - convenient!
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎫 Ticket
LG-9641
🛠 Summary of changes
Instead of creating a "true" new page (controller, view, tests, etc), we found that re-using the current GPO page (ie the "Want a letter?" page) with a presenter that checks whether or not the user already has a letter pending proved sufficient.
📜 Testing Plan
👀 Screenshots
If relevant, include a screenshot or screen capture of the changes.
English:
Spanish:
French: