Skip to content

fix: timestamp tooltip on relative datetime labels#1796

Merged
pedrolamas merged 1 commit intofluidd-core:developfrom
pedrolamas:pedrolamas/fix-1772
Feb 23, 2026
Merged

fix: timestamp tooltip on relative datetime labels#1796
pedrolamas merged 1 commit intofluidd-core:developfrom
pedrolamas:pedrolamas/fix-1772

Conversation

@pedrolamas
Copy link
Member

Adds a tooltip with the absolute timestamp when a relative timestamp label is shown.

Fixes #1772

Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
@pedrolamas pedrolamas added this to the 1.36.3 milestone Feb 23, 2026
@pedrolamas pedrolamas requested a review from Copilot February 23, 2026 13:08
@pedrolamas pedrolamas added the GH - Bug Something isn't working label Feb 23, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds absolute timestamp tooltips to Spoolman UI where relative timestamps are shown, improving usability when the relative label becomes stale after the underlying data stops updating (Fixes #1772).

Changes:

  • Add tooltip support on the Spoolman card for first_used / last_used fields.
  • Add tooltips in the spool selection table for first_used / last_used columns showing absolute datetime.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/components/widgets/spoolman/SpoolmanCard.vue Wraps relative time labels with a tooltip that displays the absolute timestamp.
src/components/widgets/spoolman/SpoolSelectionDialog.vue Adds tooltips to table cells to show absolute timestamps for first/last used.

</span>
</template>

<template v-else-if="getTooltipField(field) != null">
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getTooltipField(field) is evaluated twice (once in the v-else-if and again inside the tooltip content), which means formatDateTime(...) runs redundantly on every render. Consider branching on field/activeSpool.first_used|last_used in the template (or returning the raw Date from a helper) so the formatted tooltip string is computed once per render.

Suggested change
<template v-else-if="getTooltipField(field) != null">
<template
v-else-if="
(field === 'first_used' && activeSpool.first_used) ||
(field === 'last_used' && activeSpool.last_used)
"
>

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Granted, that is correct, however I don't expect this to have a large impact so leaving as is.

@pedrolamas pedrolamas merged commit 4fa9537 into fluidd-core:develop Feb 23, 2026
8 checks passed
@pedrolamas pedrolamas deleted the pedrolamas/fix-1772 branch February 23, 2026 13:15
@thijstriemstra
Copy link
Contributor

thijstriemstra commented Feb 23, 2026

this won't work on mobile/touchscreen though? but its a step in right direction i guess. havent tested it yet though so could be wrong.

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

Labels

GH - Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spoolman last used timestamp

3 participants