Skip to content
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

Add new UI changes to tile feature #508

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ function APIThumbPlain(props) {
<div>
<div>
<div>
<Typography variant='caption' gutterBottom align='left'>
<Typography variant='body2' gutterBottom align='left'>
<FormattedMessage
defaultMessage='Owners'
id='Apis.Listing.ApiThumb.owners'
Expand Down Expand Up @@ -298,44 +298,54 @@ function APIThumbPlain(props) {
{' : '}
</div>
<div className={classes.truncate}>
{api.businessInformation.businessOwner}
{api.businessInformation.businessOwner
? (api.businessInformation.businessOwner)
: (
<span
style={{ color: '#808080', fontWeight: 'bold' }}
>
Not Provided
</span>
)}
</div>
</Typography>
<Popover
id='mouse-over-popover'
className={classes.popover}
classes={{
paper: classes.paper,
}}
open={businessOpenPopover}
anchorEl={businessAnchorEl}
anchorOrigin={{
vertical: 'top',
horizontal: 'right',
}}
transformOrigin={{
vertical: 'bottom',
horizontal: 'left',
}}
onClose={handleBusinessPopoverClose}
disableRestoreFocus
>
<div style={{
display: 'flex',
flexDirection: 'column',
}}
{api.businessInformation.businessOwnerEmail && (
<Popover
id='mouse-over-popover'
className={classes.popover}
classes={{
paper: classes.paper,
}}
open={businessOpenPopover}
anchorEl={businessAnchorEl}
anchorOrigin={{
vertical: 'top',
horizontal: 'right',
}}
transformOrigin={{
vertical: 'bottom',
horizontal: 'left',
}}
onClose={handleBusinessPopoverClose}
disableRestoreFocus
>
<div style={{ display: 'flex' }}>
<EmailIcon fontSize='small' />
<Typography
variant='body2'
style={{ marginLeft: '8px' }}
>
{api.businessInformation.businessOwnerEmail}
</Typography>
<div style={{
display: 'flex',
flexDirection: 'column',
}}
>
<div style={{ display: 'flex' }}>
<EmailIcon fontSize='small' />
<Typography
variant='body2'
style={{ marginLeft: '8px' }}
>
{api.businessInformation.businessOwnerEmail}
</Typography>
</div>
</div>
</div>
</Popover>
</Popover>
)}
</div>
)}
{tileDisplayInfo.showTechnicalDetails && (
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this mean the configuration to hide owner details only applies to the technical owner, but not the business owner?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the popovers, we display the email of the business or technical owner if the user has provided their email. A configuration check is performed above to check whether the config is enabled for business or technical owners separately.
Eg: tileDisplayInfo.showBusinessDetails

Copy link
Contributor

Choose a reason for hiding this comment

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

Ack.

Expand All @@ -360,44 +370,54 @@ function APIThumbPlain(props) {
{' : '}
</div>
<div className={classes.truncate}>
{api.businessInformation.technicalOwner}
{api.businessInformation.technicalOwner
? (api.businessInformation.technicalOwner)
: (
<span
style={{ color: '#808080', fontWeight: 'bold' }}
>
Not Provided
</span>
)}
</div>
</Typography>
<Popover
id='mouse-over-popover'
className={classes.popover}
classes={{
paper: classes.paper,
}}
open={technicalOpenPopover}
anchorEl={technicalAnchorEl}
anchorOrigin={{
vertical: 'top',
horizontal: 'right',
}}
transformOrigin={{
vertical: 'bottom',
horizontal: 'left',
}}
onClose={handleTechnicalPopoverClose}
disableRestoreFocus
>
<div style={{
display: 'flex',
flexDirection: 'column',
}}
{api.businessInformation.technicalOwnerEmail && (
<Popover
id='mouse-over-popover'
className={classes.popover}
classes={{
paper: classes.paper,
}}
open={technicalOpenPopover}
anchorEl={technicalAnchorEl}
anchorOrigin={{
vertical: 'top',
horizontal: 'right',
}}
transformOrigin={{
vertical: 'bottom',
horizontal: 'left',
}}
onClose={handleTechnicalPopoverClose}
disableRestoreFocus
>
<div style={{ display: 'flex' }}>
<EmailIcon fontSize='small' />
<Typography
variant='body2'
style={{ marginLeft: '8px' }}
>
{api.businessInformation.technicalOwnerEmail}
</Typography>
<div style={{
display: 'flex',
flexDirection: 'column',
}}
>
<div style={{ display: 'flex' }}>
<EmailIcon fontSize='small' />
<Typography
variant='body2'
style={{ marginLeft: '8px' }}
>
{api.businessInformation.technicalOwnerEmail}
</Typography>
</div>
</div>
</div>
</Popover>
</Popover>
)}
</div>
)}
</div>
Expand Down
Loading
Loading