Closed gRegorLove closed 1 year ago
I need to push a small change before this is ready. The second condition (no rep h-card, 1 or more h-cards found) is always saying "Multiple h-cards were found...". I'll make it say "An h-card was found..." if there's only one.
Any possibility we can merge this? I'm not sure how to set up unit tests with this older framework to mock requests. The test links above demonstrate the different states and most of the changes are actually in the mf-cleaner dependency.
I'm feeling pretty confident about this so going to merge with the two approvals. We can work on implementation tests going forward, particularly after #82.
This resolves #99 and streamlines a few things on the /validate-h-card page:
getRepresentativeHCard
method instead of duplicating the rep h-card code inlineif ($error)...
andif ($showResult)...
getPlaintextArray
to parse multi-value mf2 properties for display<label>
for accessibility, addedrequired
attributeisset
and null coalescing operatorYou can test these updates on https://iwm.gregoreatworld.com/validate-h-card/
The URL from #99 is working with these updates: https://iwm.gregoreatworld.com/validate-h-card/?url=https%3A%2F%2Fpresence-gqle9t8ex-johanbove.vercel.app%2F
Edit: contextualized the message when there's no rep h-card, but one or more h-cards: