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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add in more language support for code renderer #3118

Merged
merged 3 commits into from
Aug 14, 2024

Conversation

nicholas-codecov
Copy link
Contributor

Description

This PR adds in support for some more languages that we have seen appear in our Sentry issue, there will likely be follow up[ PRs adding in more languages when they're detected via Sentry.

Notable Changes

  • Add in prismjs package
  • Add in some more language support that we've seen in Sentry issues.

@codecov-staging
Copy link

codecov-staging bot commented Aug 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3118   +/-   ##
=======================================
  Coverage   98.28%   98.28%           
=======================================
  Files         918      918           
  Lines       14136    14144    +8     
  Branches     3907     3883   -24     
=======================================
+ Hits        13894    13902    +8     
  Misses        237      237           
  Partials        5        5           
Files Coverage Δ
src/shared/utils/prismLanguageMapper.ts 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 54.05% <ø> (ø)
Layouts 98.78% <ø> (ø)
Pages 99.02% <ø> (ø)
Services 99.47% <ø> (ø)
Shared 99.70% <100.00%> (+<0.01%) ⬆️
UI 94.45% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d2e970b...16f2230. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Aug 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.28%. Comparing base (d2e970b) to head (16f2230).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3118   +/-   ##
=======================================
  Coverage   98.28%   98.28%           
=======================================
  Files         918      918           
  Lines       14136    14144    +8     
  Branches     3882     3829   -53     
=======================================
+ Hits        13894    13902    +8     
  Misses        237      237           
  Partials        5        5           
Files Coverage Δ
src/shared/utils/prismLanguageMapper.ts 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 54.05% <ø> (ø)
Layouts 98.78% <ø> (ø)
Pages 99.02% <ø> (ø)
Services 99.47% <ø> (ø)
Shared 99.70% <100.00%> (+<0.01%) ⬆️
UI 94.45% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d2e970b...16f2230. Read the comment docs.

Copy link

codecov-public-qa bot commented Aug 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.28%. Comparing base (d2e970b) to head (16f2230).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3118   +/-   ##
=======================================
  Coverage   98.28%   98.28%           
=======================================
  Files         918      918           
  Lines       14136    14144    +8     
  Branches     3882     3913   +31     
=======================================
+ Hits        13894    13902    +8     
  Misses        237      237           
  Partials        5        5           
Files Coverage Δ
src/shared/utils/prismLanguageMapper.ts 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 54.05% <ø> (ø)
Layouts 98.78% <ø> (ø)
Pages 99.02% <ø> (ø)
Services 99.47% <ø> (ø)
Shared 99.70% <100.00%> (+<0.01%) ⬆️
UI 94.45% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d2e970b...16f2230. Read the comment docs.

@codecov-staging
Copy link

Bundle Report

Bundle size has no change ✅

Copy link

codecov bot commented Aug 13, 2024

Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time.

❌ Failed Test Results:

Completed 4410 tests with 1 failed(1 known flakes hit), 4409 passed and 0 skipped.

View the full list of flaky tests

App

  • Class name: App cloud routing renders the AccountSettings page
    Test name: App cloud routing renders the AccountSettings page

    Error: Unable to find an element with the text: /AccountSettings/i. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.

    Ignored nodes: comments, script, style
    <body>
    <div>
    <div
    class="mt-16 flex flex-1 items-center justify-center"
    >
    <span
    class="relative flex size-20"
    >
    <span
    class="absolute inline-flex size-full rounded-full bg-ds-pink opacity-50 motion-safe:animate-ping"
    />
    <span
    class="relative inline-flex size-20 rounded-full bg-white"
    >
    <img
    alt="Codecov Logo"
    class="p-1"
    src="codecov_logo.png"
    />
    </span>
    </span>
    </div>
    <footer
    class="flex-none"
    >
    <nav
    class="container flex items-center justify-center border-t border-ds-gray-tertiary px-3 py-6 text-white"
    >
    <ul
    class="flex flex-1 items-center justify-center gap-4"
    >
    <a
    class="
    font-sans cursor-pointer

    hover:underline

    focus:ring-2
    text-ds-blue inline-flex items-center gap-1"
    data-cy="owner"
    data-marketing="owner"
    href="/gh/codecov"
    >
    <svg
    aria-labelledby="codecovLogoTitleId codecovLogoDescId"
    height="23px"
    role="img"
    viewBox="0 0 25 23"
    width="25px"
    xmlns="http://www.w3.org/2000/svg"
    >
    <title
    id="codecovLogoTitleId"
    >
    Codecov Logo
    </title>
    <desc
    id="codecovLogoDescId"
    >
    An umbrella logo.
    </desc>
    <g
    fill="none"
    fill-rule="evenodd"
    stroke="none"
    stroke-width="1"
    >
    <g
    fill="currentColor"
    transform="translate(-708.000000, -37.000000)"
    >
    <path
    d="M732.5,48.9622237 C732.015555,49.2124622 731.506824,49.4261695 731.053915,49.7235559 C730.626903,50.0040468 730.292545,49.9912609 729.836644,49.7517534 C726.560854,48.0303366 722.586997,49.5495763 721.39171,52.9606735 C720.924644,54.2934901 720.934197,55.6380652 721.487931,56.9352639 C721.702588,57.4382523 721.707422,57.8638403 721.455589,58.3140869 C721.14402,58.8710729 720.818754,59.4205245 720.483936,60 C718.505985,57.9488894 717.914499,54.4898451 719.14938,51.6301401 C720.007317,49.6433015 721.423246,48.1927861 723.397629,47.2936629 C725.36453,46.3980786 727.410043,46.3391721 729.485942,46.865335 C729.843665,44.0382798 725.361653,40.0246467 721.443273,39.5775966 C715.773685,38.9307667 711.599674,42.9836708 710.941202,46.8818882 C713.968841,46.1522924 716.717025,46.6293666 719.126015,48.6279636 C718.670805,49.3625824 718.247016,50.0467426 717.794222,50.7773658 C717.628482,50.6569271 717.467115,50.5457354 717.312194,50.42621 C715.21201,48.8061671 712.963925,48.6138077 710.610411,49.7997006 C710.182134,50.0154628 709.88311,50.0050742 709.498109,49.7654526 C709.018383,49.4668104 708.501019,49.2273029 708,48.9623379 C708,48.7192915 708,48.4763593 708,48.2333129 C708.109918,47.6610294 708.211779,47.0870335 708.331136,46.5165766 C709.55819,40.6488729 715.266911,36.4503009 721.45064,37.0585447 C726.654198,37.5704376 730.957118,41.2668204 732.12835,46.3376881 C732.273143,46.9647683 732.377076,47.6010955 732.5,48.2331987 C732.5,48.4761309 732.5,48.7191773 732.5,48.9622237 Z"
    fill="#68737e"
    id="Path"
    />
    </g>
    </g>
    </svg>
    </a>
    <li
    class="flex justify-center"
    >
    <span
    class="text-ds-gray-quinary"
    >
    © 2024 Sentry
    </span>
    </li>
    <li
    class="flex justify-center"
    >
    <a
    class="
    font-sans cursor-pointer

    hover:underline

    focus:ring-2
    text-ds-gray-quinary inline-flex items-center gap-1"
    data-cy="terms"
    data-marketing="terms"
    href="https://about.codecov.io/terms-and-conditions"
    target="_blank"
    >
    Terms
    </a>
    </li>
    <li
    class="flex justify-center"
    >
    <a
    class="
    font-sans cursor-pointer

    hover:underline

    focus:ring-2
    text-ds-gray-quinary inline-flex items-center gap-1"
    data-cy="privacy"
    data-marketing="privacy"
    href="https://about.codecov.io/privacy"
    target="_blank"
    >
    Privacy
    </a>
    </li>
    <li
    class="flex justify-center"
    >
    <a
    class="
    font-sans cursor-pointer

    hover:underline

    focus:ring-2
    text-ds-gray-quinary inline-flex items-center gap-1"
    data-cy="security"
    data-marketing="security"
    href="https://about.codecov.io/security"
    target="_blank"
    >
    Security
    </a>
    </li>
    <li
    class="flex justify-center"
    >
    <a
    class="
    font-sans cursor-pointer

    hover:underline

    focus:ring-2
    text-ds-gray-quinary inline-flex items-center gap-1"
    data-cy="gdpr"
    data-marketing="gdpr"
    href="https://about.codecov.io/gdpr"
    target="_blank"
    >
    GDPR
    </a>
    </li>
    <li
    class="flex justify-center"
    >
    <a
    class="
    font-sans cursor-pointer

    hover:underline

    focus:ring-2
    text-ds-gray-quinary inline-flex items-center gap-1"
    data-cy="pricing"
    data-marketing="pricing"
    href="https://about.codecov.io/pricing"
    target="_blank"
    >
    Pricing
    </a>
    </li>
    </ul>
    </nav>
    </footer>
    <div
    class="fixed bottom-0 flex w-full flex-col justify-center pb-8"
    />
    <div
    style="position: fixed; z-index: 9999; top: 16px; left: 16px; right: 16px; bottom: 16px; pointer-events: none;"
    />
    </div>
    </body>
    at waitForWrapper (.../gazebo/gazebo/node_modules/@.../dom/dist/wait-for.js:163:27)
    at findByText (.../gazebo/gazebo/node_modules/@.../dom/dist/query-helpers.js:86:32)
    at Object.<anonymous> (.../gazebo/src/App.spec.tsx:364:35)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at listOnTimeout (node:internal/timers:545:9)
    at processTimers (node:internal/timers:519:7)

Copy link

codecov bot commented Aug 13, 2024

Bundle Report

Changes will increase total bundle size by 27.08kB ⬆️

Bundle name Size Change
gazebo-production-array-push 5.85MB 27.08kB ⬆️

@codecov-releaser
Copy link
Contributor

codecov-releaser commented Aug 13, 2024

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
4f052a5 Tue, 13 Aug 2024 15:21:26 GMT Expired Expired
16f2230 Tue, 13 Aug 2024 21:01:37 GMT Cloud Enterprise

Copy link
Contributor

@suejung-sentry suejung-sentry left a comment

Choose a reason for hiding this comment

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

thanks for doing this!
nice that we have our bundle analysis feature to tell us this new dependency isn't too big! :)

@nicholas-codecov
Copy link
Contributor Author

Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time.

❌ Failed Test Results:

Completed 4410 tests with 1 failed(1 known flakes hit), 4409 passed and 0 skipped.

View the full list of flaky tests

The tests are all passing, for some reason this isn't updating and I've poked @joseph-sentry about this.

Merged via the queue into main with commit e82a881 Aug 14, 2024
60 of 61 checks passed
@nicholas-codecov nicholas-codecov deleted the add-in-more-language-support-for-code-renderer branch August 14, 2024 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants