Skip to content

Feat/calendar time filter - #1698

Open
NaderArea52 wants to merge 4 commits into
nextcloud:masterfrom
NaderArea52:feat/calendar-time-filter
Open

NaderArea52 wants to merge 4 commits into
nextcloud:masterfrom
NaderArea52:feat/calendar-time-filter

Conversation

@NaderArea52

Copy link
Copy Markdown

馃 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Implements #1222 (calendar date selection for the history/time filter).

Changes

Calendar time filter

  • Settings: under "Display time filter slider" you can choose Slider or Calendar, saved in the timeFilterMode option. The slider itself is unchanged.
  • New DateRangeFilter.vue: separate From and To pickers (NcDateTimePicker). Days outside the available data are greyed out, and From can't be after To. Whole days in local time (From 00:00, To 23:59:59).
  • Reset selects everything from the first to the last data point.
  • In calendar mode the selection is saved in the dateFilterStart/dateFilterEnd options and restored on reload. A bound at the edge of the data is saved as open, so new device points stay visible.
  • maxDataTimestamp no longer uses "now" for data types without entries (e.g. no photos, which pushed the range up to today), and it now includes the newest device point.

Fix: device point hover popup
Since the Vue 3 migration, hovering a device history line no longer showed the point info (date, altitude, battery, accuracy), because DeviceHoverMarker wasn't rendered anymore. DevicesLayer renders it again, and the hover marker is interactive again like in 1.6.0. Happy to split this into its own PR.

Notes

  • Frontend only: no migration, no backend changes. The options use the existing saveOptionValue endpoint.
  • Tested in a browser on 1.8.0 (Nextcloud 33, PHP 8.3) with PhoneTrack device data. The branch is rebased on current master and builds with Vite, but I haven't tested the master build in a browser.
  • Unlike my original suggestion in History navigation: calendar, or enter date聽#1222 (calendar for the range plus the slider for fine filtering), the two are separate options for now.
  • Written with the help of an AI coding assistant.
  • I opened History navigation: calendar, or enter date聽#1222 as @BitsMonger; this PR comes from my other account.

- New DateRangeFilter component (NcDateTimePicker date-range) with a
  Reset button that selects the full data range
- Days outside the available data range are grayed out
- Settings: choose between Slider and Calendar (timeFilterMode option)
- maxDataTimestamp now ignores data types without dates (they defaulted
  to now) and includes the newest device point

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Signed-off-by: Area52_Nader <86432017+NaderArea52@users.noreply.github.com>
Replace the single date-range picker with separate From and To date
pickers. From can not be after To, and To can not be before From.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Signed-off-by: Area52_Nader <86432017+NaderArea52@users.noreply.github.com>
The Vue 3 migration stopped rendering DeviceHoverMarker, so hovering a
device history line no longer showed the point info (date, altitude,
battery, accuracy) like in 1.6.0. Render it again from DevicesLayer and
make the hover marker interactive so its tooltip opens on hover.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Signed-off-by: Area52_Nader <86432017+NaderArea52@users.noreply.github.com>
Save the calendar range as dateFilterStart/dateFilterEnd options and
restore it on load when the calendar mode is active. A bound at the
edge of the data (and Reset) is saved as open so new data stays visible.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Signed-off-by: Area52_Nader <86432017+NaderArea52@users.noreply.github.com>
@NaderArea52
NaderArea52 force-pushed the feat/calendar-time-filter branch from 50074d2 to 5abfeee Compare October 14, 2026 18:02

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant