utc offset label update

This commit is contained in:
Nate Kelley 2025-10-02 11:09:53 -06:00
parent 9d37bd15fc
commit 328cb28261
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
2 changed files with 8 additions and 2 deletions

View File

@ -90,7 +90,7 @@ export const EditDateFormat: React.FC<{
showWarning={true} showWarning={true}
className="max-w-[300px]" className="max-w-[300px]"
icon={<CircleInfo />} icon={<CircleInfo />}
warningText="When UTC Offset is enabled, dates are displayed with timezone information. Use this when data is stored in different timezones or when timezone context matters. Buster tries the correct timezone and UTC Offset for each date. Note: When data is truncated (e.g., DATE_TRUNC to day/month/quarter), timezone differences are lost during truncation — the data is bucketed first, then timezone offsets are applied to the labels." warningText="When enabled, dates show which timezone they're in. This is helpful when your data comes from different locations or when the time of day matters. Note: When data is grouped (e.g., by day, month, quarter or via a DATE_TRUNC command), timezone differences are lost during grouping — dates are grouped first, then timezone labels are added."
/> />
<Switch checked={isUTC} onCheckedChange={onUpdateUTC} /> <Switch checked={isUTC} onCheckedChange={onUpdateUTC} />
</div> </div>

View File

@ -4,15 +4,21 @@ import { Switch } from '@/components/ui/switch';
import { LabelAndInput } from '../../../Common/LabelAndInput'; import { LabelAndInput } from '../../../Common/LabelAndInput';
import { WarningIcon } from '../../../Common/WarningIcon'; import { WarningIcon } from '../../../Common/WarningIcon';
const ROW_COUNT_THRESHOLD = 25;
export const EditShowDataLabel: React.FC<{ export const EditShowDataLabel: React.FC<{
showDataLabels: Required<ColumnSettings>['showDataLabels']; showDataLabels: Required<ColumnSettings>['showDataLabels'];
rowCount: number; rowCount: number;
onUpdateColumnSettingConfig: (columnSettings: Partial<ColumnSettings>) => void; onUpdateColumnSettingConfig: (columnSettings: Partial<ColumnSettings>) => void;
}> = React.memo(({ showDataLabels, rowCount, onUpdateColumnSettingConfig }) => { }> = React.memo(({ showDataLabels, rowCount, onUpdateColumnSettingConfig }) => {
const showWarning = rowCount > ROW_COUNT_THRESHOLD;
return ( return (
<LabelAndInput label="Show data labels"> <LabelAndInput label="Show data labels">
<div className="flex w-full justify-end gap-x-2"> <div className="flex w-full justify-end gap-x-2">
<WarningIcon rowCount={rowCount} /> <WarningIcon
showWarning={showWarning}
warningText="Data labels will be hidden if there are too many."
/>
<Switch <Switch
checked={showDataLabels} checked={showDataLabels}
onCheckedChange={(v) => { onCheckedChange={(v) => {