Skip to content
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 @@ -56,7 +56,7 @@

.paramCard {
display: grid;
grid-template-rows: auto 40px auto;
grid-template-rows: auto auto;
row-gap: 8px;
align-content: start;
}
Expand Down
19 changes: 11 additions & 8 deletions src/apps/reports/src/pages/reports/ReportsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,15 @@ const formatParameterLabel = (name: string): string => (
.replace(/^./, char => char.toUpperCase())
)

const buildParameterTooltipContent = (parameter: ReportParameter): JSX.Element => (
<>
<div>{parameter.description?.trim() || 'No description available.'}</div>
<div>
{`Location: ${parameter.location || 'query'} (${parameter.name})`}
</div>
</>
)

const EMPTY_BILLING_ACCOUNT_PROFILE_RESPONSE: BillingAccountProfileResponse = {
billingAccount: undefined,
}
Expand Down Expand Up @@ -369,14 +378,7 @@ const SelectedReportSection = (props: SelectedReportSectionProps): JSX.Element =
<div className={styles.paramHeaderActions}>
<div className={styles.paramTypePill}>{parameter.type}</div>
<Tooltip
content={(
<>
{parameter.description || 'No description available'}
<br />
{`Location: ${parameter.location || 'query'}
(${parameter.name})`}
</>
)}
content={buildParameterTooltipContent(parameter)}
place='top'
>
<button
Expand Down Expand Up @@ -761,6 +763,7 @@ const ReportsPageContent: FC<ReportsPageContentProps> = props => {
return (
<InputText
{...commonProps}
forceUpdateValue
value={parameterValues[parameter.name] ?? ''}
onChange={handleParameterChange}
error={parameterErrors[parameter.name]}
Expand Down
Loading