Skip to content

Conversation

@WojcikMike
Copy link
Contributor

@WojcikMike WojcikMike commented Jun 8, 2018

fixes #612
This is how the screen looks in current version:
image

And this is the new presentation:
image

I decided to remove line wrapping, as normally we display the data in 2 lines. If the name is to long then it is being shortened by ellipsis and the name is available using a tooltip.

I decided to use css to shorten the text so that it automatically works with any width of the container. It seems like the easiest solution to fix the problem.

Next steps could be to display only the actual type of the message ignoring the namespace and showing it in a tooltip. That would give us more space.

@WojcikMike WojcikMike requested review from a team and sergioc June 8, 2018 11:21
@sergioc
Copy link
Contributor

sergioc commented Jun 11, 2018

I decided to use css to shorten the text so that it automatically works with any width of the container. It seems like the easiest solution to fix the problem.

Then it's just a bug fix. I've implemented that before and there was a regression somewhere.

Still the solution that @HEskandari was better. Truncate at the beginning so that you can see the end which is what varies among message types. Otherwise you only see repetition. Also his solution involved striping all segments (names between periods) of the message type name as as soon as the characters in a segment would begin to truncate.

Will you also address the parsing of "properties" into that second line of grey text?

@WojcikMike
Copy link
Contributor Author

Then it's just a bug fix. I've implemented that before and there was a regression somewhere.

Yes it is a bug fix, and regression could have happened.

Still the solution that @HEskandari was better. ...

Yes and no. It is better in the sense that presented information, in this case, are more meaningful. However css solution is not bound to any given number of character, so when you have more narrow screen and only 15 chars fit it will apply. With javascript you have to depend on the usage of this algorithm to char length (if the string is longer than 20 than do the magic). So you are writing for 1 given size, and any change in zoom setting or making the screen more narrow still cause bad rendering of the page.

Also his solution involved striping all segments (names between periods) of the message type name as as soon as the characters in a segment would begin to truncate.

I don't understand this, could you provide an example? I couldn't find anything in the closed PR that would relate to stripping any of the segments.

Will you also address the parsing of "properties" into that second line of grey text?

The problem exists when there is inheritance hierarchy which needs to be handled in SC. We can't do anything about it.

@WojcikMike
Copy link
Contributor Author

After the last changes this is how it looks:
image
And the tooltip now looks as follows:
image

- fix name column width
- ensure error icons fit
- truncate “properties”
- truncate instance name
- truncate endpoint name
@sergioc
Copy link
Contributor

sergioc commented Jun 20, 2018

Feedback

  • on endpoints screen, the ellipsis need to be the same color as the endpoint name (dark blue)
  • Message type name tooltip doesn't include all properties

image

  • Message type name tooltip should also display when hovering properties (sometimes only a property is truncated and nothing else, so the natural thing to do is hover the truncated property)
  • Remove unnecessary padding before truncation ellipsis (for better alignment, maybe fit extra character for name)

image

  • tooltip not showing for instance names in endpoint details
  • tooltip should only show if something is truncated (otherwise it adds noise when scanning the page with the mouse cursor)

@WojcikMike
Copy link
Contributor Author

@sergioc regarding your feedback:

on endpoints screen, the ellipsis need to be the same color as the endpoint name (dark blue)

I need your help with that., to change the color of the ellipsis you need to set css color property to the color that you want to get. The color need to be set on the container that you configure ellipsis on. The problem is that this container is div with class lead. The class lead has color set to black with !important. Could you help with that?

Message type name tooltip doesn't include all properties

fixed

Message type name tooltip should also display when hovering properties

done

Remove unnecessary padding before truncation

I can't reproduce it, it might be related to string length, depending on the width of the chars there might be some space left. There is no padding on this element. I doubt that we will be able to fix it. Or it could be browsers specifid.

tooltip not showing for instance names in endpoint details

Done

tooltip should only show if something is truncated

This is very hard to achieve, Overall we are using CSS to truncate text, so to check it there are hacks in javascript but due to amount of places that we now use ellipsis on it would be really messy and performance would suffer. I suggest to not do it.

@sergioc
Copy link
Contributor

sergioc commented Jun 21, 2018

This is very hard to achieve, Overall we are using CSS to truncate text, so to check it there are hacks in javascript but due to amount of places that we now use ellipsis on it would be really messy and performance would suffer. I suggest to not do it.

Can you detect if there's an ellipsis in the content, and if not, hide the tooltip?

@WojcikMike
Copy link
Contributor Author

Can you detect if there's an ellipsis in the content, and if not, hide the tooltip?

The suggested approach is to compare offsetWidth with scroll width, which would indicate if the ellipsis kicked in or not. The problem is that we would have to do it for every row, So when moving your mouse through the screen there would be quite a few activities happening in the background to determine if tooltip should be visible or not. On endpoint details screen there are 2 lists each showing tooltip on every row. Plus few other places.

@sergioc
Copy link
Contributor

sergioc commented Jun 21, 2018

Fixed endpoint ellipsis color. Just need to use a more specific selector with important to override .lead with important.

@WojcikMike WojcikMike merged commit a879c23 into master Jun 22, 2018
@WojcikMike WojcikMike deleted the fixing_long_names branch June 22, 2018 08:03
WilliamBZA pushed a commit that referenced this pull request Feb 17, 2023
* Fixing security issues related to old npm being used

* Changing the way how the data is displayed to include tooltip of the data and not wrapping lines.

* Adding service to parse type hierarchy names in the monitored details screen.

* Applying conditional styles to IE/EDGE

* Implementing following changes:
- fix name column width
- ensure error icons fit
- truncate “properties”
- truncate instance name
- truncate endpoint name

* Made a change to include more data in a tooltip. Moving the tooltip to show also when hovered on additional parameters.

* Added tooltip on the instance name

* blue endpoint ellipsis
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.

Long endpoint and Message type names break UI

4 participants