Skip to content

Add table of SMS/Voice support dynamically loaded from IDP#707

Merged
zachmargolis merged 60 commits intomainfrom
margolis-country-support
Oct 28, 2021
Merged

Add table of SMS/Voice support dynamically loaded from IDP#707
zachmargolis merged 60 commits intomainfrom
margolis-country-support

Conversation

@zachmargolis
Copy link
Contributor

@zachmargolis zachmargolis commented Oct 19, 2021

This is an idea for a help page with content loaded from the IDP, see IDP PR 18F/identity-idp#5523

If we wanted to launch this:

  • write and translate the real content
  • style it differently if needed?
  • confirm that JS is ok to load this, instead of some build process that loads in the static build step
    • (in my mind we're looking to build more dynamic enabling/disabling, so I think that a build step would get stale more quickly, and this is a simple implementation in the IDP so I don't think it would create a big burden)
  • tests??

Here's how it looks right now:
Screen Shot 2021-10-19 at 3 23 55 PM

@zachmargolis
Copy link
Contributor Author

@nickttng suggested we check out the stacked width for mobile, and some visual indicators so I pushed a small change, at least using borderless for now

desktop mobile
Screen Shot 2021-10-19 at 4 42 58 PM Screen Shot 2021-10-19 at 4 43 09 PM

@Danielle-Lee
Copy link
Contributor

I think it's a good idea and could fit somewhere in the help content. I'd be curious about accessibility particularly for screen readers. Do we need a visual indicator for both "yes" and "no"? it looks crowded.

@zachmargolis
Copy link
Contributor Author

I think it's a good idea and could fit somewhere in the help content. I'd be curious about accessibility particularly for screen readers. Do we need a visual indicator for both "yes" and "no"? it looks crowded.

The visual indicator was just one idea. Another was having a more sentence-like structure "supports voice and SMS". And we can also choose to hide some content (such as the visual indicators) from screen readers if we are concerned about accessibility.

Copy link
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

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

Personally I think it'd be marginally better to render this server-side to improve scrapability/indexing and no-JS user support. Maybe with a daily CircleCI job to make sure we're sync'd up. I do think the current implementation here would be much simpler to maintain though, and avoid any delay / overhead in the sync process.

@zachmargolis
Copy link
Contributor Author

Personally I think it'd be marginally better to render this server-side to improve scrapability/indexing and no-JS user support. Maybe with a daily CircleCI job to make sure we're sync'd up. I do think the current implementation here would be much simpler to maintain though, and avoid any delay / overhead in the sync process.

Yeah I agree it would be great to have that, but AFAICT, Federalist does't have a notion of scheduled builds? So maybe we'd need to give CircleCI write access to GH so it could push to a deploy branch or something?

@aduth
Copy link
Contributor

aduth commented Oct 20, 2021

Yeah I agree it would be great to have that, but AFAICT, Federalist does't have a notion of scheduled builds? So maybe we'd need to give CircleCI write access to GH so it could push to a deploy branch or something?

In my mind I pictured something more like what we have with daily sitemap checks or Pinpoint configuration alerts we send to Slack, which still requires effort on part of the developer to push up the pull request to sync the changes.

@zachmargolis
Copy link
Contributor Author

the backend is deploy to DEV and I updated the preview branch to pull from there, so the preview works now: https://federalist-17bd62cc-77b7-4687-9c62-39b462ce6fd5.app.cloud.gov/preview/18f/identity-site/margolis-country-support/help/manage-your-account/international-phone-support/

@aduth
Copy link
Contributor

aduth commented Oct 20, 2021

tests??

Couple thoughts:

  • Puppeteer tests could work for this, but a bit heavy. On the other hand, it already exists!
  • Could adapt parts of our testing infrastructure we use in the IdP, like Mocha, Sinon (to stub window.fetch), JSDOM (for faking DOM), maybe @testing-library/dom

Co-authored-by: Andrew Duthie <aduth@users.noreply.github.com>
@zachmargolis
Copy link
Contributor Author

The prod API endpoint has been deployed, this is ready to go!

isoCode,
{
name,
country_code: countryCode,
Copy link
Contributor

Choose a reason for hiding this comment

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

One thing we may consider in the future is to have the API respond with locale-translated country names? For example, Germany is "Allemagne" in French, but currently we show all country names in English.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes definitely! The IDP itself only has English names right now, but that is a great idea. In the meantime we do that the ISO country codes too

Copy link
Contributor

@aduth aduth Oct 28, 2021

Choose a reason for hiding this comment

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

Yeah, I bet we're probably showing English names in some of our translated alert texts. Thinking ones like this in particular:

https://github.com/18F/identity-idp/blob/ef4418520046674acb903d13ddb5552d76a36d3d/config/locales/two_factor_authentication/en.yml#L90

I'll plan to confirm and create a ticket as necessary.

Copy link
Contributor

Choose a reason for hiding this comment

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

For posterity: LG-5321

Comment on lines +16 to +18
// identity-style-guide backports
$error: #e21c3d;
$success: #18852e;
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I had a typo in my original comment. error is the correct token. I think it should be available in the older version?

@zachmargolis
Copy link
Contributor Author

Confirmed that this works in IE 11! merging

Screen Shot 2021-10-28 at 12 57 25 PM

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.

4 participants