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

enhance text rendering in genesis topology diagram #17

Open
VasylTretiakov opened this issue Jan 17, 2020 · 8 comments
Open

enhance text rendering in genesis topology diagram #17

VasylTretiakov opened this issue Jan 17, 2020 · 8 comments

Comments

@VasylTretiakov
Copy link

VasylTretiakov commented Jan 17, 2020

  1. us-east-1-sandbox environment name has overlapping letters
  2. tier string in operations tier environment name extends beyond the matching rectangle's right boundary
    us-east-1-sandbox
@jhunt
Copy link
Contributor

jhunt commented Jan 17, 2020

This looks like an issue with your browser. Can you provide more information about your OS, browser vendor, screen size / resolution, etc.?

@jhunt
Copy link
Contributor

jhunt commented Jan 17, 2020

For reference, here's what it looks like for me on a recent vintage of Firefox on macOS, at 1440x990 (and I lose about 300px in the horizontal to some browser chrome):

Screen Shot 2020-01-17 at 8 38 09 AM

@VasylTretiakov
Copy link
Author

VasylTretiakov commented Jan 17, 2020

Interesting. All my tests are done from latest stable Chrome on Android and Linux using devices with 1920x1080 (FHD) screens.
oneplus_3t_chrome

galaxy_tab_s3_chrome

@VasylTretiakov
Copy link
Author

VasylTretiakov commented Jan 17, 2020

Internet Explorer 11 with Windows10 looks even worse due to small image being displayed.

win10_ie11

Proceeding to Edge, image size seems proper, but character overlapping is obvious.

win10_edge

Checking latest Firefox on Windows 10 also reveals the issues
win10_firefox

Thus, considering all tests are done on 1920x1080 resolution, it seems the issue with character overlap is mainly caused by resolution, while some browsers also render image in a disproportional way (but technically that's another issue which can be discussed in a separate topic).

@jhunt
Copy link
Contributor

jhunt commented Jan 18, 2020

This is all SVG, so if you'd like to take a look at the raw SVG sources and submit a PR to fix those, I'd be happy to review it.

@VasylTretiakov
Copy link
Author

I found the svg in data/pages/docs/about.yml

What I see is that the discussed eu-east-1-sandbox text is split into three strings:

  • eu-east-1-sandb
  • o
  • x

All the three strings are positioned in a similar spot, so all the three parts are overlapping.

<text class="cls-2" transform="matrix(0.75, -0.43, 0.87, 0.5, 1644.46, 719.99)">us-east-1-qa</text>
<text class="cls-2" transform="matrix(0.75, -0.43, 0.87, 0.5, 938.73, 1501.8)">
     us-east-1-sandb
     <tspan class="cls-3" x="419.7" y="0">o</tspan>
     <tspan x="451.83" y="0">x</tspan>
</text>

This explains the visual artifacts I was reporting on 1920x1080 resolution while for your resolution of 1440x990 the disconnected letters seem to be in the right spots.

Appending o and x back to the eu-east-1-sandb string fixes the issue.

<text class="cls-2" transform="matrix(0.75, -0.43, 0.87, 0.5, 1644.46, 719.99)">us-east-1-qa</text>
<text class="cls-2" transform="matrix(0.75, -0.43, 0.87, 0.5, 938.73, 1501.8)">us-east-1-sandbox</text>

@VasylTretiakov VasylTretiakov changed the title "us-east-1-sandbox" environment name does not fit into genesis topology diagram "us-east-1-sandbox" environment name in genesis topology diagram is not rendered properly Jan 18, 2020
@VasylTretiakov
Copy link
Author

VasylTretiakov commented Jan 18, 2020

For operations tier extending beyond the matching rectangle, I was thinking of splitting the string into two single-word ones and putting them under each other.

For example (ignoring text positioning precision), like so


<text class="cls-2" transform="matrix(0.75, -0.43, 0.87, 0.5, 1711.42, 1222.99)">operations</text>
<text class="cls-2" transform="matrix(0.75, -0.43, 0.87, 0.5, 1771.42, 1252.99)">tier</text>

On my screen this produces the following result which looks nicer to me.

genesis_operations_tier_split

But I am not sure how this setup would look on your screen.

@VasylTretiakov VasylTretiakov changed the title "us-east-1-sandbox" environment name in genesis topology diagram is not rendered properly enhance text rendering in genesis topology diagram Jan 18, 2020
@VasylTretiakov
Copy link
Author

VasylTretiakov commented Feb 6, 2020

@jhunt , would you like to review the suggestions in the two previous comments?

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

No branches or pull requests

2 participants