Skip to content

feat: Add heartbeat tooltip while hovering over status page heartbeats #5929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Jul 12, 2025

Conversation

peaktwilight
Copy link
Contributor

@peaktwilight peaktwilight commented Jun 15, 2025

This PR introduces a really nice and sleek tooltip component that comes up on hover (and we can use it in other places because it's a standalone vue component)

Important

It kind of builds upon the changes made in #5916 otherwise it bugs out in the time mgmt.
So merge that before looking into this please.

DEMO:
image
imageimage

🔄 Changes

🛠️ Type of change

  • 🎨 User Interface (UI) updates

🔗 Related Issues

📄 Checklist *

  • 🔍 My code adheres to the style guidelines of this project.
  • ✅ I ran ESLint and other code linters for modified files.
  • 🛠️ I have reviewed and tested my code.
  • ⚠️ My changes generate no new warnings.
  • 🔒 I have considered potential security impacts and mitigated risks.
  • 📚 I have read and understood the Pull Request guidelines.

@peaktwilight peaktwilight changed the title Add heartbeat tooltip feat: Add heartbeat tooltip Jun 15, 2025
@peaktwilight
Copy link
Contributor Author

IMPORTANT:
It kind of builds upon the changes made in #5916 otherwise it bugs out in the time mgmt. So merge that before looking into this please.

@CommanderStorm
Copy link
Collaborator

I love the designs. Good work 👏

Will review this and the other PR on Wednesday. I am currently struggling though writing a paper for a university-seminar.

@peaktwilight
Copy link
Contributor Author

I love the designs. Good work 👏

Will review this and the other PR on Wednesday. I am currently struggling though writing a paper for a university-seminar.

thanks man I'm glad you like it and good luck on the paper, no stress at all :)

@CommanderStorm CommanderStorm changed the title feat: Add heartbeat tooltip feat: Add heartbeat tooltip while hovering over status page heartbeats Jun 15, 2025
Copy link
Collaborator

@CommanderStorm CommanderStorm left a comment

Choose a reason for hiding this comment

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

Nice work.
I like the design work 👍🏻

I talked to one of my designer friends (🦖, @twihno) and they really like it too..

>
<div
class="beat"
:class="{ 'empty': (beat === 0), 'down': (beat.status === 0), 'pending': (beat.status === 2), 'maintenance': (beat.status === 3) }"
:class="{ 'empty': (beat === 0 || beat === null || beat.status === null), 'down': (beat.status === 0), 'pending': (beat.status === 2), 'maintenance': (beat.status === 3) }"
Copy link
Collaborator

Choose a reason for hiding this comment

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

depending on discussion in other pr might need to change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah keeping it open for the moment until the other one is reviewed

@CommanderStorm CommanderStorm added this to the 2.0.0-beta.4 milestone Jun 18, 2025
@twihno
Copy link

twihno commented Jun 18, 2025

Small nitpick:
I think it would be better if the border included the arrow

Mockup (OLD/NEW):
grafik

@peaktwilight
Copy link
Contributor Author

Super cool thanks guys for the review and UX suggestions! Will take a look at all of it soon :)

@peaktwilight
Copy link
Contributor Author

Small nitpick: I think it would be better if the border included the arrow

Mockup (OLD/NEW): grafik

great eye, didn't even notice that! will see if there's an elegant way to solve this

@peaktwilight
Copy link
Contributor Author

image border fixed though a rotated square hack

Copy link
Contributor Author

@peaktwilight peaktwilight left a comment

Choose a reason for hiding this comment

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

Review should be ready for review again :)

>
<div
class="beat"
:class="{ 'empty': (beat === 0), 'down': (beat.status === 0), 'pending': (beat.status === 2), 'maintenance': (beat.status === 3) }"
:class="{ 'empty': (beat === 0 || beat === null || beat.status === null), 'down': (beat.status === 0), 'pending': (beat.status === 2), 'maintenance': (beat.status === 3) }"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah keeping it open for the moment until the other one is reviewed

@CommanderStorm
Copy link
Collaborator

It kind of builds upon the changes made in #5916 otherwise it bugs out in the time mgmt.
So merge that before looking into this please

@peaktwilight given that I think the consensus in #5916 is that that needs another testing round, where exactly is this bugging out?

I did not find anything and would merge this one first otherwise if this is outdated.

@peaktwilight
Copy link
Contributor Author

It kind of builds upon the changes made in #5916 otherwise it bugs out in the time mgmt.

So merge that before looking into this please

@peaktwilight given that I think the consensus in #5916 is that that needs another testing round, where exactly is this bugging out?

I did not find anything and would merge this one first otherwise if this is outdated.

I've just tested with the latest version and a fresh db and I believe that it's no longer dependent on the other merge and should work without the other one getting merged first :D

@CommanderStorm CommanderStorm merged commit 5bbbef5 into louislam:master Jul 12, 2025
19 checks passed
@davidwroten
Copy link

I've pulled down the latest from master tonight and have been working on something in a new branch but had noticed the heartbeats are green even when a service is down. When you hover over the heartbeats, the tooltip is correct but the down class is never applied.
image

In HeartbeatBar.vue I see the constants are being imported below the template:

Line 47: import { DOWN, UP, PENDING, MAINTENANCE } from "../util.ts";

if I change DOWN to 0 on line 20:

:class="{ 'empty': (beat === 0 || beat === null || beat.status === null), 'down': (beat.status === 0), 'pending': (beat.status === PENDING), 'maintenance': (beat.status === MAINTENANCE) }"

The heartbeats are displaying properly again.

I changed this back to DOWN as it was before and included the following under computed:

Line 93:    
    computed: {
        DOWN() { return DOWN; },
        PENDING() { return PENDING; },
        MAINTENANCE() { return MAINTENANCE; },

Now the heartbeats are appearing correctly on the dashboard and status pages.
image

@CommanderStorm
Copy link
Collaborator

good work and thanks for debugging it.
Would you like to open an PR and have the fix associated with you?

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.

5 participants