[GH-ISSUE #465] UX improvements for the usage examples popup #351

Closed
opened 2026-02-25 23:42:08 +03:00 by kerem · 4 comments
Owner

Originally created by @immanuelfodor on GitHub (Dec 29, 2020).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/465

  • The usage examples popup hides most parts of the check title. It would be great to move the popup lower or display the check title in the popup's title, too. Use case: while working with a long crontab file, it's easy to forget which check was open in the browser when switching between apps. The only way to remember now is to close then open the examples popup.
  • The check interval is not reflected in the Crontab example. It would be great to show the actual cron setup not just a dummy timing for both cron and simple types.
  • The copy to clipboard button over the Crontab entry doesn't copy the comment above the line, so there is no need to tabulate the parts of the timing upon copy. Please send one single space between the parts to the clipboard to avoid the need of manual formatting: 8 6 * * * /home/user/backup.sh && ...
  • It would be great to display /usr/bin/curl in the example instead of just curl for envs that doesn't have the usr-bin on the crontab's PATH.
  • The Crontab curl command differs from the Bash tab's example, so you have no way of simply copying just the fsS-dev-null variant. When extending existing crontabs, there is no need for the timing and dummy backup command, you just need the curl command. And copying part of the line manually with the mouse from a box that is even scroll-able is not that easy. Please give another copyable block just with the curl command on the Crontab tab (the Bash tab also displays two blocks, so it's not unprecedented).

image

Originally created by @immanuelfodor on GitHub (Dec 29, 2020). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/465 - The usage examples popup hides most parts of the check title. It would be great to move the popup lower or display the check title in the popup's title, too. Use case: while working with a long crontab file, it's easy to forget which check was open in the browser when switching between apps. The only way to remember now is to close then open the examples popup. - The check interval is not reflected in the Crontab example. It would be great to show the actual cron setup not just a dummy timing for both cron and simple types. - The copy to clipboard button over the Crontab entry doesn't copy the comment above the line, so there is no need to tabulate the parts of the timing upon copy. Please send one single space between the parts to the clipboard to avoid the need of manual formatting: `8 6 * * * /home/user/backup.sh && ...` - It would be great to display `/usr/bin/curl` in the example instead of just `curl` for envs that doesn't have the usr-bin on the crontab's PATH. - The Crontab `curl` command differs from the Bash tab's example, so you have no way of simply copying just the fsS-dev-null variant. When extending existing crontabs, there is no need for the timing and dummy backup command, you just need the `curl` command. And copying part of the line manually with the mouse from a box that is even scroll-able is not that easy. Please give another copyable block just with the `curl` command on the Crontab tab (the Bash tab also displays two blocks, so it's not unprecedented). ![image](https://user-images.githubusercontent.com/21174107/103298369-7778f700-49fa-11eb-9a3b-ebe20a5b9017.png)
kerem closed this issue 2026-02-25 23:42:08 +03:00
Author
Owner

@cuu508 commented on GitHub (Dec 30, 2020):

Thanks, this is great feedback!

Here's a mockup with a few changes:

image

  • Show check's name in the modal dialog's title. With the name being visible there, we don't need to shift the dialog down, right?
  • updated the crontab snippet to use the configured schedule. This also eliminates the extra spaces.
  • added a second snippet with just the "&& ..." part

To do: for simple checks, where possible, convert "Period: 5 minutes" to a corresponding cron expression, "*/5 * * * *".

It would be great to display /usr/bin/curl in the example instead of just curl for envs that doesn't have the usr-bin on the crontab's PATH.

I've assumed that /usr/bin/ will typically be included in PATH. In what environment that is not the case?

Is it safe to assume /usr/bin/curl is what the user wants? What if they've installed a custom curl binary in /usr/local/bin/?

I'm leaning towards the "least surprise" principle here and specifying just "curl". If it's on PATH, it will work. If it's not on PATH, you will find that out and then make a deliberate decision which curl binary to use.

<!-- gh-comment-id:752398449 --> @cuu508 commented on GitHub (Dec 30, 2020): Thanks, this is great feedback! Here's a mockup with a few changes: ![image](https://user-images.githubusercontent.com/661859/103343460-cc694b80-4a94-11eb-9197-8baf5b58165a.png) * Show check's name in the modal dialog's title. With the name being visible there, we don't need to shift the dialog down, right? * updated the crontab snippet to use the configured schedule. This also eliminates the extra spaces. * added a second snippet with just the "&& ..." part To do: for simple checks, where possible, convert "Period: 5 minutes" to a corresponding cron expression, "*/5 * * * *". > It would be great to display /usr/bin/curl in the example instead of just curl for envs that doesn't have the usr-bin on the crontab's PATH. I've assumed that `/usr/bin/` will typically be included in PATH. In what environment that is not the case? Is it safe to assume `/usr/bin/curl` is what the user wants? What if they've installed a custom curl binary in `/usr/local/bin/`? I'm leaning towards the "least surprise" principle here and specifying just "curl". If it's on PATH, it will work. If it's not on PATH, you will find that out and then make a deliberate decision which curl binary to use.
Author
Owner

@immanuelfodor commented on GitHub (Dec 30, 2020):

Woooow, wonderful mockup, no one could ask for more, this is it, all changes are perfect! 🎉 🏆

Todo: yes, that would be great for all the possible slider positions. Otherwise, there is surely a cron expression added, so you wouldn't have to convert awkward periods, just the ones available on the slider :)

Curl: Now I've run through all my different OS variants with the following simple cron: * * * * * echo "$PATH" > /tmp/path.txt and then checked the results with date && cat /tmp/path.txt. All of them contained the /usr/bin to my surprise, even Debian and CentOS being the most restrictive with just /usr/bin:/bin. I'm sorry, I remembered some place where just /bin was available out of the box, and I've been prepending /usr/bin to curl since then just to make sure there are no surprises. I can let this point go, you're right, the user can decide in this case.

<!-- gh-comment-id:752409631 --> @immanuelfodor commented on GitHub (Dec 30, 2020): Woooow, wonderful mockup, no one could ask for more, this is it, all changes are perfect! :tada: :trophy: Todo: yes, that would be great for all the possible slider positions. Otherwise, there is surely a cron expression added, so you wouldn't have to convert awkward periods, just the ones available on the slider :) Curl: Now I've run through all my different OS variants with the following simple cron: `* * * * * echo "$PATH" > /tmp/path.txt` and then checked the results with `date && cat /tmp/path.txt`. All of them contained the `/usr/bin` to my surprise, even Debian and CentOS being the most restrictive with just `/usr/bin:/bin`. I'm sorry, I remembered some place where just `/bin` was available out of the box, and I've been prepending `/usr/bin` to curl since then just to make sure there are no surprises. I can let this point go, you're right, the user can decide in this case.
Author
Owner

@cuu508 commented on GitHub (Dec 30, 2020):

Now thinking about it, I think there are relatively few slider positions that cleanly map to a cron expression. For example, on the slider we can select periods like "every 59 minutes" or "every 23 hours" but I don't think there's a corresponding cron expression that would fit precisely. Here are the ones I think would work:

Period Cron Expression
1 minute * * * * *
2 minutes */2 * * * *
3 minutes */3 * * * *
4 minutes */4 * * * *
5 minutes */5 * * * *
6 minutes */6 * * * *
10 minutes */10 * * * *
12 minutes */12 * * * *
15 minutes */15 * * * *
20 minutes */20 * * * *
30 minutes */30 * * * *
1 hour 0 * * * *
2 hours 0 */2 * * *
3 hours 0 */3 * * *
4 hours 0 */4 * * *
6 hours 0 */6 * * *
8 hours 0 */8 * * *
12 hours 0 */12 * * *
1 day 0 0 * * *

For the rest we could default to "* * * * *" and add another FIXME comment.

<!-- gh-comment-id:752417372 --> @cuu508 commented on GitHub (Dec 30, 2020): Now thinking about it, I think there are relatively few slider positions that cleanly map to a cron expression. For example, on the slider we can select periods like "every 59 minutes" or "every 23 hours" but I don't think there's a corresponding cron expression that would fit precisely. Here are the ones I think would work: | Period | Cron Expression | | ------ | --------------- | | 1 minute | * * * * * | | 2 minutes | */2 * * * * | | 3 minutes | */3 * * * * | | 4 minutes | */4 * * * * | | 5 minutes | */5 * * * * | | 6 minutes | */6 * * * * | | 10 minutes | */10 * * * * | | 12 minutes | */12 * * * * | | 15 minutes | */15 * * * * | | 20 minutes | */20 * * * * | | 30 minutes | */30 * * * * | | 1 hour | 0 * * * * | | 2 hours | 0 */2 * * * | | 3 hours | 0 */3 * * * | | 4 hours | 0 */4 * * * | | 6 hours | 0 */6 * * * | | 8 hours | 0 */8 * * * | | 12 hours | 0 */12 * * * | | 1 day | 0 0 * * * | For the rest we could default to "* * * * *" and add another FIXME comment.
Author
Owner

@immanuelfodor commented on GitHub (Dec 30, 2020):

Of course, this solution is still better and more useful than the previous hardcoded example. Thank you!

<!-- gh-comment-id:752494861 --> @immanuelfodor commented on GitHub (Dec 30, 2020): Of course, this solution is still better and more useful than the previous hardcoded example. Thank you!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#351
No description provided.