Domains returning hsts_required:true from the API need a special HSTS notification.

Plus similar popover like in Calypso.


Yep. Let's stick with the same pattern. I'll update a designs.
@daledupreez hi!
What do you think if requires_hsts: true|false info would be coming directly from the domains suggestions API? I think that would simplify a lot of things.
Currently checking for hsts requires passing a slug such as product_slug: "dotequipment_domain" to this helper, which then compares it to _product list_.
That works fine in Calypso, but if we'd like this feature to be easy to port to wp-admin context (and we do!), it would be great if we don't need to deal with massive Calypso state.
With API approach, the check in UI would become super simple:
{ suggestion.hsts_required && <HstsInfo tld={ domainTld } /> }
Thoughts?
@simison, I think we can refactor the logic here somewhat, but I don't think we can escape the dependency on the products -- we need the product data to show accurate pricing details. We can shift that out of the state if need be, but I think you're still going to need the relevant data in the component.
@simison, I looked into this some more, and I realized that we're sending the cost back in the response data -- we should be able to do the same for the HSTS required flag. I'll work on a diff for that tomorrow, using the name hsts_required as a boolean.
馃槏馃槏馃槏馃槏馃尰馃尰馃帀
OK, the back end change to add the flag in D43163-code has been reviewed and approved but not deployed. Feel free to ping me if you want/need that deployed before Monday, which is when I am planning on deploying for now.
馃憤 Monday works great for me, thanks! I'll add the UI on Monday as well.
I've just deployed D43163-code - it returns hsts_required: true in the payload when HSTS is required, and does not include the flag otherwise.
I've created a separate issue https://github.com/Automattic/wp-calypso/issues/45449 for the UI tooltip component that is also needed in other parts of Gutenboarding (eg: plans grid).
Most helpful comment
I've just deployed D43163-code - it returns
hsts_required: truein the payload when HSTS is required, and does not include the flag otherwise.