-
Notifications
You must be signed in to change notification settings - Fork 2
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
base: main
Are you sure you want to change the base?
FFS-2295: Help modal #417
Conversation
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 :)
|
||
<ol> | ||
<% steps = t("help.show.#{topic}", default: {}).select { |k, _| k.to_s.start_with?('step') } %> | ||
<% steps.each do |step, _| %> |
There was a problem hiding this comment.
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 :)
…f the previous iframe contents from being persisted when the modal is closed and opened again
… events (nav/banner)
…e refactoring to make things a bit more explicit. Added event tracking for help topics
app/app/javascript/utilities/help.js
Outdated
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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.
….com/DSACMS/iv-cbv-payroll into george/ffs-2295-help-modal
…ther than base_controller
Ticket
Resolves FFS-2295.
/help
route to use in iframeHelp
link in top nav that triggers the Help ModalChanges
Context for reviewers
Acceptance testing
: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!
)