-
Notifications
You must be signed in to change notification settings - Fork 13
Add extended field handling to facility details #1593
Conversation
verified={contributor.is_verified} | ||
/> | ||
{visibleContributors.map(contributor => ( | ||
<ListItem |
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.
Switched from using the FacilityDetailSidebarDetail here because the structure is different enough now to make it overly complex
<ShowOnly when={!hideTopDivider}> | ||
<Divider className={classes.divider} /> | ||
<ListItem className={classes.item}> | ||
<ShowOnly when={verified}> |
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'm showing the verified badge when an extended field is verified (presumably includes when the contributor is verified, based on upcoming changes). Do we want this, or should there be no badge for verified items?
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.
It makes sense that we visually indicate the status of these items. I like shoing the badge.
c5544c4
to
7169940
Compare
@@ -90,7 +90,7 @@ const getContent = ({ | |||
secondary: 'Claim this facility', | |||
icon: <BadgeUnclaimed />, | |||
style: { | |||
background: 'rgb(9, 18, 50)', | |||
background: 'rgb(61, 50, 138)', |
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.
Updating to new unclaimed header color per new wireframes
@@ -715,3 +715,37 @@ export const facilitySidebarActions = { | |||
CLAIM_FACILITY: 'Claim this facility', | |||
VIEW_ON_OAR: 'View on the Open Apparel Registry', | |||
}; | |||
|
|||
export const EXTENDED_FIELD_TYPES = [ |
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.
The constant array of extended field types includes anticipated fields which aren't yet included in the API
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.
Nice work on the implementation! The code is clear and I was able to successfully work through the testing instructions without any issues.
I did see some things I did not expect, but I don't think they necessarily fall withing the scope of this PR. Please create follow up issues or add subtasks to one of our existing issues (listed under #1585) if appropriate.
- After claiming the facility, I would expect the values for the claimed fa facility to be promoted to the top of the list. In my testing it appeared at the end of the list
- In my testing some addresses appear without a contributor name or date.
- In my test I created an embedded map as "Service Provider A" but when I view a facility that was originally created under a different contributor ("Factory A"), I see that contributor's name. We need to avoid showing any other contributor names.
<ShowOnly when={!hideTopDivider}> | ||
<Divider className={classes.divider} /> | ||
<ListItem className={classes.item}> | ||
<ShowOnly when={verified}> |
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.
It makes sense that we visually indicate the status of these items. I like shoing the badge.
This is caused by a) the prioritization of the name/address/location on the facility over the extended fields, and b) the combination/prioritization of the other_names/_addresses/_locations with the extended fields.
This is caused by the combination of the other_names/_addresses/_locations with the extended fields (they don't include the contribution data).
This is caused by the prioritization or and inclusion of contribution data for the facility object's name/address/locations.
|
Makes the facility details subsections expandable to show additional content (details from other matches, claims, etc.) when not in embed mode. Adds extended field subsections (number of workers, native language name, and so on) when values are present and the map is not in embed mode. Adds nonstandard/contributor field subsections when values are present in embed mode.
7169940
to
3480673
Compare
Thank you for reviewing! |
Overview
Makes the facility details subsections expandable to show additional
content (details from other matches, claims, etc.) when not in embed
mode.
Adds extended field subsections (number of workers, native language
name, and so on) when values are present and the map is not in embed
mode.
Adds nonstandard/contributor field subsections when values are present
in embed mode.
Connects #1540
Demo
Closed items
Opened items
Extended fields
Nonstandard / contributor fields (in embed)
Notes
Anticipated extended fields have been included in the list of fields to attempt to render if available, in addition to the existing extended fields. However, because these are not yet present in the API response, some tweaking might be necessary once they are being returned from the API to ensure all formatting / etc are working as expected.
Some changes have been made to the styling of the items and header based on the updated wireframes.
Testing Instructions
./scripts/server
Checklist
fixup!
commits have been squashed