Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2ab8b85

Browse files
authored
1 parenta3c6f87 commit2ab8b85

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

‎src/cards/top-languages-card.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
import{langCardLocales}from"../translations.js";
1414

1515
constDEFAULT_CARD_WIDTH=300;
16-
constMIN_CARD_WIDTH=230;
16+
constMIN_CARD_WIDTH=280;
1717
constDEFAULT_LANGS_COUNT=5;
1818
constDEFAULT_LANG_COLOR="#858585";
1919
constCARD_PADDING=25;
@@ -317,7 +317,6 @@ const renderTopLanguages = (topLangs, options = {}) => {
317317

318318
letfinalLayout="";
319319
if(layout==="compact"||hide_progress==true){
320-
width=width+50;// padding
321320
height=
322321
calculateCompactLayoutHeight(langs.length)+(hide_progress ?-25 :0);
323322

‎tests/renderTopLanguages.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,23 +216,23 @@ describe("Test renderTopLanguages", () => {
216216
);
217217
expect(queryAllByTestId(document.body,"lang-progress")[0]).toHaveAttribute(
218218
"width",
219-
"120",
219+
"100",
220220
);
221221

222222
expect(queryAllByTestId(document.body,"lang-name")[1]).toHaveTextContent(
223223
"javascript 40.00%",
224224
);
225225
expect(queryAllByTestId(document.body,"lang-progress")[1]).toHaveAttribute(
226226
"width",
227-
"120",
227+
"100",
228228
);
229229

230230
expect(queryAllByTestId(document.body,"lang-name")[2]).toHaveTextContent(
231231
"css 20.00%",
232232
);
233233
expect(queryAllByTestId(document.body,"lang-progress")[2]).toHaveAttribute(
234234
"width",
235-
"60",
235+
"50",
236236
);
237237
});
238238

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp