Skip to content
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

[dashboard] Show a tooltip with billing cycle dates when hovering over remaining hours #4398

Merged
merged 1 commit into from
Jun 28, 2021

Conversation

jankeromnes
Copy link
Contributor

Fixes #4223

@gtsiolis
Copy link
Contributor

gtsiolis commented Jun 7, 2021

/werft run

👍 started the job as gitpod-build-jx-remaining-hours-tooltip.2

Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

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

Whoa! Thanks for picking this up @jankeromnes! 🌟

The title attribute seems to work for now. Ideally this would look like a tooltip element as described in #4223 but feel free to leave this out of the scope of this iteration. 🛹

Feel free to forward this to someone to review the frontend here if needed. 🏓

@@ -433,7 +433,7 @@ export default function () {
{!assignedTs && (
<p className="text-base w-96 m-auto">Upgrade your plan to get access to private repositories or more parallel workspaces.</p>
)}
<p className="mt-2 font-semibold text-gray-500">Remaining hours: {typeof(accountStatement?.remainingHours) === 'number'
<p className="mt-2 font-semibold text-gray-500" title={guessCurrentBillingCycle(currentPlan, accountStatement).map(d => d.toLocaleDateString()).join(' - ')}>Remaining hours: {typeof(accountStatement?.remainingHours) === 'number'
Copy link
Contributor

Choose a reason for hiding this comment

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

thought: It took me a while to realize this was added as a title attribute! 😇

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Titles are fantastic! I always hover over UI elements when I need more info, and pretty often I'm not disappointed. 😁

If we already have a tooltip component, I think we could do some JS-hacking to make it work for every element that has a title attribute.

Copy link
Contributor

Choose a reason for hiding this comment

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

Titles are fantastic!

Agree, and title along with aria-label attributes can significantly improve product accessibility. 👀

If we already have a tooltip component ...

We do have first tooltip component implementation! 💬

I think we could do some JS-hacking ...

I'd not expect to see a tooltip element every time we're using the title attribute as this could make the user interface unnecessarily verbose, however, we can try this and see if we need to tone this down. 🏀

@svenefftinge
Copy link
Member

svenefftinge commented Jun 16, 2021

/werft run

👍 started the job as gitpod-build-jx-remaining-hours-tooltip.5

@JanKoehnlein
Copy link
Contributor

JanKoehnlein commented Jun 28, 2021

/werft run

👍 started the job as gitpod-build-jx-remaining-hours-tooltip.6

@JanKoehnlein JanKoehnlein merged commit 5fcaa6d into main Jun 28, 2021
@JanKoehnlein JanKoehnlein deleted the jx/remaining-hours-tooltip branch June 28, 2021 12:36
MatthewFagan pushed a commit to trilogy-group/gitpod that referenced this pull request Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show a tooltip with cycle information when hovering over remaining hours
4 participants