chore: remove out-of-scope files (weather, scratchpad) + fix docs sortColumns
- Revert weather widget changes (belongs to #6429) - Remove .cursor/goal/archive scratchpad artifact - Exclude 'integration' from docs sortColumns to match widget definition Addresses CodeRabbit review comments.
This commit is contained in:
6 files changed
+4
-77
No files matched your search
@@ -1,56 +0,0 @@
|
|||||||
---
|
|
||||||
iteration: 2
|
|
||||||
max_iterations: 10
|
|
||||||
status: active
|
|
||||||
goal: "Maximize the downloads widget by leveraging every mantine-datatable feature, adding hover tooltips with stats, click-to-expand rich detail rows, toggleable global stats, and comprehensive customization options"
|
|
||||||
success_criteria:
|
|
||||||
- "Leverage all mantine-datatable features: row expansion, column toggling, custom row styling, striped rows, scroll area tracking, pinned columns, and context menus"
|
|
||||||
- "Add hover tooltips on rows showing additional stats (size, speed, ETA, ratio, category)"
|
|
||||||
- "Implement click-to-expand row details with comprehensive download info"
|
|
||||||
- "Add toggleable global stats bar showing total speeds, ratios, queue counts, and queue size (disk usage not available from integration API)"
|
|
||||||
- "Use every relevant DataTable prop from the mantine-datatable docs"
|
|
||||||
- "Typecheck passes with pnpm turbo typecheck --filter=@homarr/widgets"
|
|
||||||
- "No regressions in existing functionality (context menu, sorting, filtering still work)"
|
|
||||||
last_verdict: null
|
|
||||||
last_reason: null
|
|
||||||
last_next: null
|
|
||||||
engine: cursor
|
|
||||||
---
|
|
||||||
|
|
||||||
## Progress log
|
|
||||||
|
|
||||||
### Iteration 1
|
|
||||||
- Added hover tooltips on name column showing size, state, speeds, ETA, ratio, category
|
|
||||||
- Added toggleable global stats bar with overall progress, total size, speeds, ratio, status counts
|
|
||||||
- Enhanced row expansion with RingProgress, SimpleGrid layout, collapse on click
|
|
||||||
- Added striped rows, highlightOnHover colors, rowBackgroundColor for failed/paused
|
|
||||||
- Added defaultColumnProps with noWrap and dynamic cellsStyle
|
|
||||||
- Added collapseProps for smooth expansion animation
|
|
||||||
- Added onScroll to auto-close context menu
|
|
||||||
- Added new translations for stats bar
|
|
||||||
- TypeCheck: PASS
|
|
||||||
|
|
||||||
### Iteration 2
|
|
||||||
- Migrated to `useDataTableColumns` hook with toggleable, draggable, resizable, pinnable columns
|
|
||||||
- Added `storeColumnsKey` for localStorage column preference persistence
|
|
||||||
- Added `pinFirstColumn`, `pinLastColumn`, `textSelectionDisabled`, `withColumnBorders`
|
|
||||||
- Added `scrollAreaProps`, `customRowAttributes`, enhanced scroll tracking (`onScroll`, `onScrollToTop`, `onScrollToBottom`)
|
|
||||||
- Added column settings menu in footer with reset visibility/order/width/pinning
|
|
||||||
- Added scroll position indicator badge when scrolled
|
|
||||||
- Explicit `rowExpansion.trigger: "click"`
|
|
||||||
- Updated docs and translations for column controls
|
|
||||||
- TypeCheck: PASS
|
|
||||||
|
|
||||||
## Blockers
|
|
||||||
None
|
|
||||||
|
|
||||||
## Verification
|
|
||||||
- pnpm turbo typecheck --filter=@homarr/widgets: PASS (exit code 0)
|
|
||||||
- Context menu: preserved via onRowContextMenu
|
|
||||||
- Sorting: preserved via sortStatus/onSortStatusChange
|
|
||||||
- Filtering: preserved in WidgetFooter
|
|
||||||
- Column toggling/reordering/resizing/pinning: via useDataTableColumns + header UI
|
|
||||||
|
|
||||||
## Task
|
|
||||||
|
|
||||||
Maximize the downloads widget by leveraging every mantine-datatable feature, adding hover tooltips with stats, click-to-expand rich detail rows, toggleable global stats, and comprehensive customization options
|
|
||||||
@@ -18,7 +18,7 @@ const columnsList = [
|
|||||||
"index",
|
"index",
|
||||||
"type",
|
"type",
|
||||||
];
|
];
|
||||||
const sortColumns = columnsList.filter((c) => !["state", "category"].includes(c));
|
const sortColumns = columnsList.filter((c) => !["state", "category", "integration"].includes(c));
|
||||||
|
|
||||||
export const downloadsWidget: WidgetDefinition = {
|
export const downloadsWidget: WidgetDefinition = {
|
||||||
icon: IconDownload,
|
icon: IconDownload,
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export const weatherRequestHandler = createWidgetRequestHandler({
|
|||||||
async requestAsync(input: { latitude: number; longitude: number }) {
|
async requestAsync(input: { latitude: number; longitude: number }) {
|
||||||
const res = await withTimeoutAsync(async (signal) => {
|
const res = await withTimeoutAsync(async (signal) => {
|
||||||
return await fetchWithTrustedCertificatesAsync(
|
return await fetchWithTrustedCertificatesAsync(
|
||||||
`https://api.open-meteo.com/v1/forecast?latitude=${input.latitude}&longitude=${input.longitude}&daily=weathercode,temperature_2m_max,temperature_2m_min,sunrise,sunset,wind_speed_10m_max,wind_gusts_10m_max,relative_humidity_2m¤t_weather=true&timezone=auto`,
|
`https://api.open-meteo.com/v1/forecast?latitude=${input.latitude}&longitude=${input.longitude}&daily=weathercode,temperature_2m_max,temperature_2m_min,sunrise,sunset,wind_speed_10m_max,wind_gusts_10m_max¤t_weather=true&timezone=auto`,
|
||||||
{ signal },
|
{ signal },
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -27,7 +27,6 @@ export const weatherRequestHandler = createWidgetRequestHandler({
|
|||||||
sunset: weather.daily.sunset[index],
|
sunset: weather.daily.sunset[index],
|
||||||
maxWindSpeed: weather.daily.wind_speed_10m_max[index],
|
maxWindSpeed: weather.daily.wind_speed_10m_max[index],
|
||||||
maxWindGusts: weather.daily.wind_gusts_10m_max[index],
|
maxWindGusts: weather.daily.wind_gusts_10m_max[index],
|
||||||
humidity: weather.daily.relative_humidity_2m[index],
|
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
} satisfies Weather;
|
} satisfies Weather;
|
||||||
@@ -49,7 +48,6 @@ const atLocationOutput = z.object({
|
|||||||
sunset: z.array(z.string()),
|
sunset: z.array(z.string()),
|
||||||
wind_speed_10m_max: z.array(z.number()),
|
wind_speed_10m_max: z.array(z.number()),
|
||||||
wind_gusts_10m_max: z.array(z.number()),
|
wind_gusts_10m_max: z.array(z.number()),
|
||||||
relative_humidity_2m: z.array(z.number()),
|
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -68,6 +66,5 @@ export interface Weather {
|
|||||||
sunset: string | undefined;
|
sunset: string | undefined;
|
||||||
maxWindSpeed: number | undefined;
|
maxWindSpeed: number | undefined;
|
||||||
maxWindGusts: number | undefined;
|
maxWindGusts: number | undefined;
|
||||||
humidity: number | undefined;
|
|
||||||
}[];
|
}[];
|
||||||
}
|
}
|
||||||
@@ -2257,8 +2257,7 @@
|
|||||||
"sunrise": "Sunrise",
|
"sunrise": "Sunrise",
|
||||||
"sunset": "Sunset",
|
"sunset": "Sunset",
|
||||||
"maxWindSpeed": "Max wind speed: {maxWindSpeed} {unit}",
|
"maxWindSpeed": "Max wind speed: {maxWindSpeed} {unit}",
|
||||||
"maxWindGusts": "Max wind gusts: {maxWindGusts} {unit}",
|
"maxWindGusts": "Max wind gusts: {maxWindGusts} {unit}"
|
||||||
"humidity": "Humidity: {humidity}%"
|
|
||||||
},
|
},
|
||||||
"kind": {
|
"kind": {
|
||||||
"clear": "Clear",
|
"clear": "Clear",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Box, Group, HoverCard, Stack, Text } from "@mantine/core";
|
import { Box, Group, HoverCard, Stack, Text } from "@mantine/core";
|
||||||
import { IconArrowDownRight, IconArrowUpRight, IconDroplets, IconMapPin, IconWind } from "@tabler/icons-react";
|
import { IconArrowDownRight, IconArrowUpRight, IconMapPin, IconWind } from "@tabler/icons-react";
|
||||||
import combineClasses from "clsx";
|
import combineClasses from "clsx";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
@@ -87,12 +87,6 @@ const DailyWeather = ({ options, weather }: WeatherProps) => {
|
|||||||
</Text>
|
</Text>
|
||||||
</Group>
|
</Group>
|
||||||
)}
|
)}
|
||||||
{weather.daily[0]?.humidity !== undefined && (
|
|
||||||
<Group className="weather-humidity-group" wrap="nowrap" gap="xs">
|
|
||||||
<IconDroplets size={16} />
|
|
||||||
<Text fz={16}>{t("dailyForecast.humidity", { humidity: weather.daily[0].humidity })}</Text>
|
|
||||||
</Group>
|
|
||||||
)}
|
|
||||||
<Group className="weather-max-min-temp-group" wrap="nowrap" gap="sm">
|
<Group className="weather-max-min-temp-group" wrap="nowrap" gap="sm">
|
||||||
<Group gap="xs" wrap="nowrap">
|
<Group gap="xs" wrap="nowrap">
|
||||||
<IconArrowUpRight size={16} />
|
<IconArrowUpRight size={16} />
|
||||||
@@ -210,7 +204,6 @@ function Forecast({ weather, options }: WeatherProps) {
|
|||||||
sunset={dayjs(dayWeather.sunset).format("HH:mm")}
|
sunset={dayjs(dayWeather.sunset).format("HH:mm")}
|
||||||
maxWindSpeed={dayWeather.maxWindSpeed}
|
maxWindSpeed={dayWeather.maxWindSpeed}
|
||||||
maxWindGusts={dayWeather.maxWindGusts}
|
maxWindGusts={dayWeather.maxWindGusts}
|
||||||
humidity={dayWeather.humidity}
|
|
||||||
/>
|
/>
|
||||||
</HoverCard.Dropdown>
|
</HoverCard.Dropdown>
|
||||||
</HoverCard>
|
</HoverCard>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import {
|
|||||||
IconCloudRain,
|
IconCloudRain,
|
||||||
IconCloudSnow,
|
IconCloudSnow,
|
||||||
IconCloudStorm,
|
IconCloudStorm,
|
||||||
IconDroplets,
|
|
||||||
IconMoon,
|
IconMoon,
|
||||||
IconQuestionMark,
|
IconQuestionMark,
|
||||||
IconSnowflake,
|
IconSnowflake,
|
||||||
@@ -52,7 +51,6 @@ interface WeatherDescriptionProps {
|
|||||||
sunset?: string;
|
sunset?: string;
|
||||||
maxWindSpeed?: number;
|
maxWindSpeed?: number;
|
||||||
maxWindGusts?: number;
|
maxWindGusts?: number;
|
||||||
humidity?: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -80,7 +78,6 @@ export const WeatherDescription = ({
|
|||||||
sunset,
|
sunset,
|
||||||
maxWindSpeed,
|
maxWindSpeed,
|
||||||
maxWindGusts,
|
maxWindGusts,
|
||||||
humidity,
|
|
||||||
}: WeatherDescriptionProps) => {
|
}: WeatherDescriptionProps) => {
|
||||||
const t = useScopedI18n("widget.weather");
|
const t = useScopedI18n("widget.weather");
|
||||||
const tCommon = useScopedI18n("common");
|
const tCommon = useScopedI18n("common");
|
||||||
@@ -100,9 +97,6 @@ export const WeatherDescription = ({
|
|||||||
<List.Item icon={<IconTemperatureMinus size={15} />}>{`${tCommon("information.min")}: ${minTemp}`}</List.Item>
|
<List.Item icon={<IconTemperatureMinus size={15} />}>{`${tCommon("information.min")}: ${minTemp}`}</List.Item>
|
||||||
<List.Item icon={<IconSun size={15} />}>{`${t("dailyForecast.sunrise")}: ${sunrise}`}</List.Item>
|
<List.Item icon={<IconSun size={15} />}>{`${t("dailyForecast.sunrise")}: ${sunrise}`}</List.Item>
|
||||||
<List.Item icon={<IconMoon size={15} />}>{`${t("dailyForecast.sunset")}: ${sunset}`}</List.Item>
|
<List.Item icon={<IconMoon size={15} />}>{`${t("dailyForecast.sunset")}: ${sunset}`}</List.Item>
|
||||||
{humidity !== undefined && (
|
|
||||||
<List.Item icon={<IconDroplets size={15} />}>{t("dailyForecast.humidity", { humidity })}</List.Item>
|
|
||||||
)}
|
|
||||||
{maxWindSpeed !== undefined && (
|
{maxWindSpeed !== undefined && (
|
||||||
<List.Item icon={<IconWind size={15} />}>
|
<List.Item icon={<IconWind size={15} />}>
|
||||||
{t("dailyForecast.maxWindSpeed", {
|
{t("dailyForecast.maxWindSpeed", {
|
||||||
|
|||||||
Reference in new issue
Block a user