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

Feat: Show monitor ID in Details #4331

Merged
merged 3 commits into from
Jan 28, 2024
Merged

Conversation

chakflying
Copy link
Collaborator

⚠️⚠️⚠️ Since we do not accept all types of pull requests and do not want to waste your time. Please be sure that you have read pull request rules:
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma

Tick the checkbox if you understand [x]:

  • I have read and understand the pull request rules.

Description

Fixes #4274

Type of change

  • User interface (UI)

Checklist

  • My code follows the style guidelines of this project
  • I ran ESLint and other linters for modified files
  • I have performed a self-review of my own code and tested it
  • I have commented my code, particularly in hard-to-understand areas (including JSDoc for methods)
  • My changes generates no new warnings
  • My code needed automated testing. I have added them (this is optional task)

Screenshots (if any)

image

@chakflying chakflying added area:monitor Everything related to monitors area:ui/ux Interface and User Experience issues labels Jan 5, 2024
Copy link
Contributor

@Zaid-maker Zaid-maker left a comment

Choose a reason for hiding this comment

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

Amazing feature

@CommanderStorm
Copy link
Collaborator

CommanderStorm commented Jan 6, 2024

I am not quite convinced the current design fits as is.
I think adding this

  • as a tag (like "web" in the screenshot)
  • or as a grayer, smaller #ID next to the title could work better.

Have you experimented with these approaches?

@chakflying
Copy link
Collaborator Author

chakflying commented Jan 9, 2024

Screenshot 2024-01-06 050644
Screenshot 2024-01-10 022450
Screenshot 2024-01-10 022543
Screenshot 2024-01-10 023628

Personally, I don't like the "Tag that is not a Tag" design, and the font size had to be further reduced to fit in the same layout.

Putting it next to the title looks fine, but because the title is variable length, the location would move around, which is not convenient for finding it, and we have to deal with overflow.

Using # is also undesirable since it makes selecting only the ID for copying harder.

@Saibamen
Copy link
Contributor

Saibamen commented Jan 9, 2024

Using # is also undesirable since it makes selecting only the ID for copying harder.

What? Just double-click on number: #1421343224

This is what will be selected - no # in selection:

image

@Saibamen
Copy link
Contributor

Saibamen commented Jan 9, 2024

Or you can implement copy ID button :)

@CommanderStorm
Copy link
Collaborator

since it makes selecting only the ID for copying harder

Have not tested it, but I think this can be disabled: https://dev.to/smpnjn/how-to-disable-text-selection-with-css-4jan

@chakflying
Copy link
Collaborator Author

chakflying commented Jan 9, 2024

Using # is also undesirable since it makes selecting only the ID for copying harder.

What? Just double-click on number: #1421343224

This is what will be selected - no # in selection:

image

Unfortunately does not work on Firefox Mobile, I guess it depends on browser/OS support.

Using CSS to disable selection is a valid option I guess.

@louislam
Copy link
Owner

Screenshot 2024-01-10 022450

I think I may prefer this, but with smaller font size. Because it does not require a new line when there are no tags.

For highlight issue, I think inline-block should do the trick.
https://jsfiddle.net/louislam/cLw0rbxy/

@chakflying
Copy link
Collaborator Author

Updated design according to suggestions.

image

image

@louislam louislam merged commit 2bccae4 into louislam:master Jan 28, 2024
17 checks passed
@chakflying chakflying deleted the feat/monitor-id branch February 1, 2024 12:57
@CommanderStorm CommanderStorm added this to the 2.0.0 milestone Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:monitor Everything related to monitors area:ui/ux Interface and User Experience issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

View monitor id
5 participants