Top langs card: Increase maximum languages count to 20 (#2832)

This commit is contained in:
Alexandr Garbuzov
2023-06-16 09:27:37 +02:00
committed by GitHub
parent 99aca1b6d5
commit 1997328951
+2 -1
View File
@@ -17,6 +17,7 @@ const MIN_CARD_WIDTH = 280;
const DEFAULT_LANG_COLOR = "#858585";
const CARD_PADDING = 25;
const COMPACT_LAYOUT_BASE_HEIGHT = 90;
const MAXIMUM_LANGS_COUNT = 20;
const NORMAL_LAYOUT_DEFAULT_LANGS_COUNT = 5;
const COMPACT_LAYOUT_DEFAULT_LANGS_COUNT = 6;
@@ -170,7 +171,7 @@ const donutCenterTranslation = (totalLangs) => {
const trimTopLanguages = (topLangs, langs_count, hide) => {
let langs = Object.values(topLangs);
let langsToHide = {};
let langsCount = clampValue(parseInt(langs_count), 1, 10);
let langsCount = clampValue(parseInt(langs_count), 1, MAXIMUM_LANGS_COUNT);
// populate langsToHide map for quick lookup
// while filtering out