Skip to content

FIREFLY-1327: Update job info dialog#1765

Merged
loitly merged 2 commits intodevfrom
FIREFLY-1327-jobinfo-dialog
May 16, 2025
Merged

FIREFLY-1327: Update job info dialog#1765
loitly merged 2 commits intodevfrom
FIREFLY-1327-jobinfo-dialog

Conversation

@loitly
Copy link
Contributor

@loitly loitly commented May 12, 2025

Ticket: https://jira.ipac.caltech.edu/browse/FIREFLY-1327

Implemented as described in the ticket, with two exceptions:

  • Owner has been moved to the bottom section to provide a clearer separation between the top and bottom.
  • The default proportional font is used, so the dates are not perfectly aligned as shown in the ticket. Would you like me to switch all values to a monospaced font for better alignment? But, this will cause the dialog's font to deviate from the rest of the application.

Test: https://fireflydev.ipac.caltech.edu/firefly-1327-jobinfo-dialog/firefly/
Submit a few TAP or IRSA Catalog searches, then go to Job Monitor and click the Job Info (i-icon) to view details.

@loitly loitly added this to the 2025.3 milestone May 12, 2025
@loitly loitly requested review from gpdf and jaladh-singhal May 12, 2025 18:05
@loitly loitly self-assigned this May 12, 2025
Copy link
Member

@jaladh-singhal jaladh-singhal left a comment

Choose a reason for hiding this comment

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

Looks good - left minor comments in code (sorry for nitpicking)

Two probably important things from ticket that I notice missing are:

  1. Copy icon button next to job id.
  2. the "query" field in Parameters should be easier to find. This can be done either by moving the "query" to the top of parameters key-value pairs or by giving the query value a different font color (maybe 'primary' aka blue or 'success' aka green?) or by doing both.

const duration = executionDuration ? executionDuration + 's' : '';
const dateProps = {width: '18em', justifyContent:'space-between'};
return (
<Stack direction='row' spacing={2}>
Copy link
Member

@jaladh-singhal jaladh-singhal May 12, 2025

Choose a reason for hiding this comment

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

Suggested change
<Stack direction='row' spacing={2}>
<Stack direction='row' spacing={4}>

The space-between key and value pairs is more than 16px in some cases in first column. So the horizontal spacing of second column from the first column should be more. From a quick hacking through dev-tools, 32px seems to provide a good visual grouping between the two columns.

actualRt = Math.round((endTime - startTime) / 1000) + 's';
}
const duration = executionDuration ? executionDuration + 's' : '';
const dateProps = {width: '18em', justifyContent:'space-between'};
Copy link
Member

Choose a reason for hiding this comment

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

haven't we decided to use rem throughout firefly where possible instead of em? I can only think of need of em for font sizing to maintain some proportion from parent.

Comment on lines +171 to +172
label = label ? label + ':' : '\u00A0';
value = value ? String(value) : '\u00A0';
Copy link
Member

Choose a reason for hiding this comment

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

have you tried using '&nbsp;' here instead?

I tend to avoid using raw unicode characters where possible for readability.

Copy link
Contributor Author

@loitly loitly May 16, 2025

Choose a reason for hiding this comment

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

'&nbsp;' doesn't work. It treats it as plain text.

Copy link
Contributor

@robyww robyww left a comment

Choose a reason for hiding this comment

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

Could you detect a select statement and do some simple formatting like we do with the ADQL panel.

You would have to parse apart the select, columns, and from. There are some utils functions buried in TAP (makeColsLines())

I think it would look better and me more skimable.

@loitly
Copy link
Contributor Author

loitly commented May 16, 2025

I updated the test instance with the suggested changes. Let me know what you think.
https://fireflydev.ipac.caltech.edu/firefly-1327-jobinfo-dialog/firefly/

Copy link
Contributor

@robyww robyww left a comment

Choose a reason for hiding this comment

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

The AQDL looks good!

Copy link
Member

@jaladh-singhal jaladh-singhal left a comment

Choose a reason for hiding this comment

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

Thanks for updating it. Looks great.

Left 2 cosmetic change suggestions to make it even more polished (feel free to ignore if you don't like them). Incorporating them will make the dialog look like this (from dev tools hacking):
image

On a side note, the ADQL block in this dialog is not theme responsive - in dark mode, it still stays light (unlike ADQL examples in TAP ADQL panel)

const hrefs = results?.map((r) => r.href);
const hasMoreSection = hrefs || parameters || errorSummary || aux;
return (
<Stack spacing={.5} p={1} sx={sx}>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<Stack spacing={.5} p={1} sx={sx}>
<Stack spacing={1} p={1} sx={sx}>

Looks tight, JobInfoDetails, TAPDetails, etc. already have their children with 0.5 vertical space (at least visually). To make these visual groups separate, consider using higher vertical spacing.

return (
<Stack spacing={0}>
<KeywordBlock label='ADQL QUERY'/>
<PrismADQLAware text={adql} sx={{marginBlock: '-8px'}}/>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<PrismADQLAware text={adql} sx={{marginBlock: '-8px'}}/>
<PrismADQLAware text={adql} sx={{marginBlock: '-8px', fontSize: 'fontSize.sm'}}/>

Everyone else using sm font size in this compact panel except this Prism block

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did you mean fontSize: var(--joy-fontSize-sm)? Using fontSize.sm didn’t work for me.

Copy link
Member

@jaladh-singhal jaladh-singhal May 16, 2025

Choose a reason for hiding this comment

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

Oh, I got confused. The right syntax should be fontSize: 'sm' - sx should recognize it. If not, then the var should work as you mentioned.

@loitly loitly force-pushed the FIREFLY-1327-jobinfo-dialog branch from 8027d6e to ad74c95 Compare May 16, 2025 21:11
@loitly loitly merged commit 16136a1 into dev May 16, 2025
@robyww robyww deleted the FIREFLY-1327-jobinfo-dialog branch June 5, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants