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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

rocs.hu-berlin.de - Location abbreviation text overlapp each other #51616

Open
softvision-oana-arbuzov opened this issue Apr 14, 2020 · 9 comments
Labels
browser-firefox browser-firefox-mobile engine-gecko The browser uses the Gecko rendering engine priority-normal severity-important A non-core broken piece of functionality, not behaving the way you would expect. type-covid19
Milestone

Comments

@softvision-oana-arbuzov
Copy link
Member

URL: http://rocs.hu-berlin.de/corona/docs/model/visual_analytics/

Browser / Version: Firefox Preview Nightly 200408 (馃 77.0a1-20200407093520)
Operating System: Samsung Galaxy S6 Edge (Android 7.0) - 1440 x 2560 pixels (~577 ppi pixel density)
Tested Another Browser: Yes Chrome

Problem type: Design is broken
Description: Items are overlapped
Steps to Reproduce:

  1. Navigate to http://rocs.hu-berlin.de/corona/docs/model/visual_analytics/
  2. Scroll down the page to the first graphic.
  3. Observe location abbreviation text the graphic.

Expected Behavior:
The text has a fair size, thus no locations are overlapped.

Actual Behavior:
The text is displayed too large, thus overlapping the locations.

Notes:

  1. Screenshot attached.
  2. The issue is not reproducible on Chrome 80.0.3987.162.

Watchers:
@softvision-oana-arbuzov
@softvision-sergiulogigan
@cipriansv

View the screenshotScreenshot
Browser Configuration
  • None

From webcompat.com with 鉂わ笍

@webcompat-bot webcompat-bot added this to the needstriage milestone Apr 14, 2020
@webcompat-bot webcompat-bot added browser-firefox engine-gecko The browser uses the Gecko rendering engine priority-normal labels Apr 14, 2020
@softvision-oana-arbuzov softvision-oana-arbuzov added the severity-important A non-core broken piece of functionality, not behaving the way you would expect. label Apr 14, 2020
@softvision-oana-arbuzov softvision-oana-arbuzov changed the title rocs.hu-berlin.de - design is broken rocs.hu-berlin.de - Location abbreviation text overlapp each other Apr 14, 2020
@miketaylr
Copy link
Member

Firefox:

<g class="button" transform="translate(30,540)">
  <circle r="10" style="stroke: black; fill: darkred;"></circle>
  <text transform="translate(0,30)" style="text-anchor: middle">CAN</text>
</g>

Chrome:

<g class="button" transform="translate(30,540)">
  <circle r="10" style="stroke: black; fill: darkred;"></circle>
  <text transform="translate(0,30)" style="text-anchor: middle; font-size: 10px;">CAN</text>
</g>

Note the missing font-size: 10px; in Firefox. 馃

@miketaylr
Copy link
Member

http://rocs.hu-berlin.de/corona/interactives/event_horizon/eh_sg.js

buttons.append("text").text(function(d){return d.root}).style("text-anchor","middle")
	.attr("transform","translate(0,30)").style("font-size",10)

Guessing that if it was "10px" vs 10 this would work.

@miketaylr
Copy link
Member

Here's where d3.js's style is defined:

https://github.com/d3/d3-selection/blob/v1.4.1/src/selection/style.js#L19

It seems that Blink and WebKit are happy to accept a unitless value for CSSStyleDeclaration.setProperty: https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/setProperty

@miketaylr
Copy link
Member

When a number is passed as the value, jQuery will convert it to a string and add px to the end of that string. If the property requires units other than px, convert the value to a string and add the appropriate units before calling the method.

It seems like jQuery tried to pre-empt this difference, maybe.

@miketaylr
Copy link
Member

I'm guessing Firefox bails at step 6 of https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty

If component value list is null, then return.

@miketaylr
Copy link
Member

I can't find any existing Bugzilla core bugs for this, but we should probably try outreach here -- the site is doing the wrong thing per-spec. They should just use "10px" instead of 10 and it will work for all browsers.

@miketaylr
Copy link
Member

I sent an email to the contact noted on the page.

@softvision-oana-arbuzov
Copy link
Member Author

softvision-oana-arbuzov commented Apr 16, 2020

I think a similar issues occurs on Desktop page.

URL: http://rocs.hu-berlin.de/corona/
image

Firefox:

<text transform="translate(445,9.431137724550897)" style="text-anchor: end; font-weight: bold; fill: darkred;">74877</text>

Chrome:

<text transform="translate(445,9.431137724550897)" style="text-anchor: end; font-weight: bold; fill: darkred; font-size: 10px;">74877</text>

Tested with:
Browser / Version: Firefox Nightly 77.0a1 (2020-04-15)
Operating System: Windows 10 Pro

@softvision-oana-arbuzov
Copy link
Member Author

Here also:
URL: http://rocs.hu-berlin.de/corona/docs/forecast/results_by_country/
image

Firefox:

<rect class="buttonbackground" style="fill: white;" x="-2" y="-17.350939750671387" width="69.67643737792969" height="23.188674926757812" rx="1" ry="1"></rect>

Chrome:

<rect class="buttonbackground" x="-2.78125" y="-11.21875" width="61.8125" height="15.53125" rx="1" ry="1" style="fill: white;"></rect>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser-firefox browser-firefox-mobile engine-gecko The browser uses the Gecko rendering engine priority-normal severity-important A non-core broken piece of functionality, not behaving the way you would expect. type-covid19
Projects
None yet
Development

No branches or pull requests

3 participants