Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

Fix Bug 1480106, on mobile, show browser name istead of icon #776

Merged
merged 2 commits into from
Aug 30, 2018
Merged

Fix Bug 1480106, on mobile, show browser name istead of icon #776

merged 2 commits into from
Aug 30, 2018

Conversation

schalkneethling
Copy link

This fixes the problem on mobile viewports. sprints issue #390 - mdn/sprints#390

@Elchi3 r?

Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

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

Just one nit that needs fixing (r+wc) and I left two general comments that are just fyi.

I've tested in Firefox and Chrome Desktop with large and small resolutions and it works as intended. Good work!

case 'ie':
return browserNameKey.toUpperCase();
case 'webview_android':
return 'Webview Android';
Copy link
Member

Choose a reason for hiding this comment

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

Webview -> WebView

Copy link
Author

Choose a reason for hiding this comment

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

Updated.

* @param {String} browserNameKey - The browser name
* @returns Correctly formatted browser name
*/
function getFormattedBrowserName(browserNameKey) {
Copy link
Member

Choose a reason for hiding this comment

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

This function is OK for now. In the future, the formatted name should come from the compat data package.
(the export is browsers.browserNameKey.name), but we're missing two browsers still (see mdn/browser-compat-data#2690 and mdn/browser-compat-data#1712)

Copy link
Author

Choose a reason for hiding this comment

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

Ah yes, that will make this much simpler.

@@ -496,7 +533,7 @@ function writeCompatCells(supportData) {
output += ' bc-has-history';
}

output += `">${supportInfo}`;
output += `"><span class="bc-browser-name">${browserName}</span>${supportInfo}`;
Copy link
Member

Choose a reason for hiding this comment

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

Having this hidden for now works for me. Note that we want to remove icons and use text everywhere and not just on mobile in the future. See #616. I'm not sure when we want to do this, though. Maybe now isn't the time for it. So this is OK with me 👍

Copy link
Author

Choose a reason for hiding this comment

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

Agreed. The scope of this was mobile specific, as that is where we will mostly see the use case of people turning of custom fonts.

@Elchi3
Copy link
Member

Elchi3 commented Aug 30, 2018

Looks great now! Not merging, as I guess it requires merging with the Kuma PR at the same time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants