Unverified Commit 32976d8b authored by Haraldo Filho's avatar Haraldo Filho Committed by GitHub
Browse files

fix: wakatime compact card bargraph rendering (#885)

* fix: wakatime compact card bargraph rendering at the right side

* Updated snapshots
parent 8e994304
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -6,3 +6,5 @@ package-lock.json
.vscode/
.idea/
coverage
vercel_token
+9 −9
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
    const compactProgressBar = languages
      .map((lang) => {
        // const progress = (width * lang.percent) / 100;
        const progress = ((width - 50) * lang.percent) / 100;
        const progress = ((width - 25) * lang.percent) / 100;

        const languageColor = languageColors[lang.name] || "#858585";

+19 −19
Original line number Diff line number Diff line
@@ -258,7 +258,7 @@ exports[`Test Render Wakatime Card should render correctly with compact layout 1
            data-testid=\\"lang-progress\\"
            x=\\"0\\"
            y=\\"0\\"
            width=\\"6.291999999999999\\" 
            width=\\"6.6495\\"
            height=\\"8\\"
            fill=\\"#858585\\"
          />
@@ -266,9 +266,9 @@ exports[`Test Render Wakatime Card should render correctly with compact layout 1
          <rect
            mask=\\"url(#rect-mask)\\"
            data-testid=\\"lang-progress\\"
            x=\\"6.291999999999999\\" 
            x=\\"6.6495\\"
            y=\\"0\\"
            width=\\"0.44\\" 
            width=\\"0.465\\"
            height=\\"8\\"
            fill=\\"#2b7489\\"
          />
@@ -276,9 +276,9 @@ exports[`Test Render Wakatime Card should render correctly with compact layout 1
          <rect
            mask=\\"url(#rect-mask)\\"
            data-testid=\\"lang-progress\\"
            x=\\"6.731999999999999\\" 
            x=\\"7.1145\\"
            y=\\"0\\"
            width=\\"0.30800000000000005\\" 
            width=\\"0.32550000000000007\\"
            height=\\"8\\"
            fill=\\"#cb171e\\"
          />