From ee20f9a06d8ccb2d53d00b4be0cb9c0c5cc05b49 Mon Sep 17 00:00:00 2001
From: Linus Rath <139418639+rathlinus@users.noreply.github.com>
Date: Fri, 2 Oct 2026 13:03:19 +0200
Subject: [PATCH] fix: drop widget controls that look like they do something
they do not #52
The Month widget drew back and forward arrows, and the Vacation widget
an on/off switch. A widget cannot page through months or switch the
vacation reply, so both only opened the app, which the rest of the
widget already does. The arrows are gone; the switch becomes a chevron,
and the Active/Inactive pill under the title still says which state
the reply is in.
---
src/widgets/layouts/calendar.tsx | 16 ++--------------
src/widgets/layouts/hubs.tsx | 29 +++++------------------------
2 files changed, 7 insertions(+), 38 deletions(-)
diff --git a/src/widgets/layouts/calendar.tsx b/src/widgets/layouts/calendar.tsx
index ef25e63e..c6f1d6de 100644
--- a/src/widgets/layouts/calendar.tsx
+++ b/src/widgets/layouts/calendar.tsx
@@ -500,17 +500,6 @@ const MONTH_CELL_MAX = 48;
const MONTH_CHIPS_TOP = 13;
const MONTH_CHIPS_BOTTOM = 8;
-function NavButton({ p, iconName }: { p: WidgetPalette; iconName: IconName }) {
- return (
-
-
-
- );
-}
-
function MonthDay({
p,
cell,
@@ -604,12 +593,11 @@ export const MonthLayout: Layout = ({ s, p, f, now, width, height }) => {
paddingRight: 8,
}}
>
+ {/* No month arrows: a widget cannot page, and arrows that only open
+ the app promise what they do not do. */}
-
-
-
{weeks[0].map((cell) => (
diff --git a/src/widgets/layouts/hubs.tsx b/src/widgets/layouts/hubs.tsx
index 99deeb3b..4bc00d0e 100644
--- a/src/widgets/layouts/hubs.tsx
+++ b/src/widgets/layouts/hubs.tsx
@@ -4,7 +4,7 @@
import React from 'react';
import { FlexWidget, SvgWidget, TextWidget } from 'react-native-android-widget';
-import { links, open, toggleTask, type WidgetClick } from '../clicks';
+import { links, open, toggleTask } from '../clicks';
import { dueKind, nextEvent, sortTasks, tasksDueNow, upcomingTimed } from '../derive';
import { addDays, sameDay, startOfDay, type Fmt } from '../format';
import { ring, type IconName } from '../icons';
@@ -681,27 +681,6 @@ export const AttachmentsLayout: Layout = ({ s, p, f, now, width, height }) => {
/* ------------------------------------------------------------------------ */
/** The settings switch (`h-[22px] w-10 rounded-full`), drawn only; taps open settings. */
-function Switch({ p, on, label, click }: { p: WidgetPalette; on: boolean; label: string; click: WidgetClick }) {
- return (
-
-
-
- );
-}
-
export const VacationLayout: Layout = ({ s, p, f, width, height }) => {
const click = open(links.settings('vacation'));
const v = s.vacation;
@@ -720,7 +699,7 @@ export const VacationLayout: Layout = ({ s, p, f, width, height }) => {
const pad = 14;
const avail = height - 2 - 2 * pad;
const titleLines = textWidth(title, 14, 0.58) > width - 2 - 2 * pad ? 2 : 1;
- // Switch row, title (~17dp a line plus font padding), status pill.
+ // Icon row, title (~17dp a line plus font padding), status pill.
const base = 22 + titleLines * 17 + 2 + 19;
let gapTop = 12;
let gapPill = 6;
@@ -739,7 +718,9 @@ export const VacationLayout: Layout = ({ s, p, f, width, height }) => {
-
+ {/* Not a switch: the widget cannot turn replies on or off, it opens
+ the settings that do. The pill below says which state it is in. */}
+