Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FFS-2295: Help modal #417

Open
wants to merge 46 commits into
base: main
Choose a base branch
from
Open

FFS-2295: Help modal #417

wants to merge 46 commits into from

Conversation

GeorgeCodes19
Copy link
Contributor

@GeorgeCodes19 GeorgeCodes19 commented Jan 22, 2025

Ticket

Resolves FFS-2295.

  • Update help topic(s) content
  • Add E2E tests
  • Add /help route to use in iframe
  • Add Help link in top nav that triggers the Help Modal
  • Ensuring that clicking the options link in the help banner triggers the Help Modal
  • Ensuring that the "Go Back" button works within the Help Modal
  • Ensuring that closing the Pinwheel modal triggers the Help Banner to appear

Changes

Context for reviewers

Acceptance testing

  • No acceptance testing needed
    • This change will not affect the user experience (bugfix, dependency updates, etc.)
  • Acceptance testing prior to merge
    • This change can be verified visually via screenshots attached below or by sending a link to a local development environment to the acceptance tester
    • Acceptance testing should be done by design for visual changes, product for behavior/logic changes, or both for changes that impact both.
  • Acceptance testing after merge
    • This change is hard to test locally, so we'll test it in the demo environment (deployed automatically after merge.)
    • Make sure to notify the team once this PR is merged so we don't inadvertently deploy the unaccepted change to production. (e.g. :alert: Deploy block! @ffs-eng I just merged PR [#123] and will be doing acceptance testing in demo - please don't deploy until I'm finished!)

…working with view partials"""

This reverts commit 2d09705.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I opted to use a component here since there's now a Help nav item in the main nav as well as a link in the Help banner.

<div class="usa-modal__content">
<div class="usa-modal__main padding-0 margin-0 maxw-none-important">
<div class="usa-modal__body padding-0">
<iframe
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that I've resorted to an iframe here rather coding a bunch of JS. I figured this would more closely resemble our current approach and that we can add custom Mixpanel/New Relic events using Rails helpers.

Copy link
Contributor

Choose a reason for hiding this comment

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

Kinda a bummer to use an <iframe> but I understand the complexity.

@GeorgeCodes19 GeorgeCodes19 marked this pull request as ready for review January 28, 2025 00:07
app/app/components/help_link_component.rb Outdated Show resolved Hide resolved
app/app/components/help_link_component.rb Outdated Show resolved Hide resolved
app/app/components/help_alert_component.html.erb Outdated Show resolved Hide resolved
app/app/views/layouts/application.html.erb Outdated Show resolved Hide resolved
app/app/components/help_modal_component.rb Outdated Show resolved Hide resolved
app/app/components/help_modal_component.rb Outdated Show resolved Hide resolved
app/app/components/help_modal_component.rb Outdated Show resolved Hide resolved
app/app/components/help_link_component.rb Outdated Show resolved Hide resolved
app/app/components/help_link_component.html.erb Outdated Show resolved Hide resolved
app/app/components/help_alert_component.rb Outdated Show resolved Hide resolved
app/app/components/help_modal_component.rb Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

I woudl investigate whether you could do this within the existing flash error/alert system :)

app/app/views/layouts/application.html.erb Outdated Show resolved Hide resolved

<ol>
<% steps = t("help.show.#{topic}", default: {}).select { |k, _| k.to_s.start_with?('step') } %>
<% steps.each do |step, _| %>
Copy link
Contributor

Choose a reason for hiding this comment

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

I would not use this _ thing :)

Copy link
Contributor

@allthesignals allthesignals Feb 3, 2025

Choose a reason for hiding this comment

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

Hmm, I don't understand why we need all this API stuff. If it's for sending events, doesn't MixPanel have an SDK for sending events?

I can definitely see something like this API warranted in the future, though, but it's overkill when it seems MixPanel has a similar feature to what NR offered...

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay I think I get it. But it seems like we have two of these trackUserAction things. Is there some reason we can't re-use the one already defined in Pinwheel.js? Can we pull that out and make it more generic?

I think my broader point on leveraging the MixPanel SDK for this kind of thing still stands but I see that it's already been implemented.

config/routes.rb Outdated Show resolved Hide resolved
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.

3 participants