Skip to content

Conversation

@pkuczynski
Copy link
Member

@pkuczynski pkuczynski commented Aug 5, 2025

Currently two examples are joined and it looks quite confusing.

Screenshot 2025-08-05 at 12 27 39

@pkuczynski pkuczynski requested a review from a team as a code owner August 5, 2025 10:28
@pkuczynski pkuczynski self-assigned this Aug 5, 2025
@pkuczynski pkuczynski requested a review from ST-DDT August 5, 2025 10:28
@netlify
Copy link

netlify bot commented Aug 5, 2025

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit 9352293
🔍 Latest deploy log https://app.netlify.com/projects/fakerjs/deploys/6891e931993e5f00083757f9
😎 Deploy Preview https://deploy-preview-3585.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov
Copy link

codecov bot commented Aug 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.96%. Comparing base (61e4c45) to head (9352293).
⚠️ Report is 25 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #3585   +/-   ##
=======================================
  Coverage   99.96%   99.96%           
=======================================
  Files        2894     2894           
  Lines      222262   222262           
  Branches      930      931    +1     
=======================================
  Hits       222195   222195           
  Misses         67       67           
Files with missing lines Coverage Δ
src/faker.ts 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pkuczynski
Copy link
Member Author

Initial attempt does not look as intended:

Screenshot 2025-08-05 at 12 56 23

@pkuczynski
Copy link
Member Author

Still not perfect, but I think a little bit more clear

image

Is there a way to split examples into two boxes?

@pkuczynski
Copy link
Member Author

Removing second @example tag was the only way to achieve a bit of clarity. Still I think being able to break into two separate boxes would be best:

image

@ST-DDT
Copy link
Member

ST-DDT commented Aug 5, 2025

Is there a way to split examples into two boxes?

Yes, that would require some changes to the api-docs scripts.

Class-Level:

${examples.length === 0 ? '' : `<div class="examples">${codeToHtml(examples.join('\n'))}</div>`}

Method-Level:

examples: codeToHtml(examples.join('\n')),

Note: The later might have impact on the refresh examples button.

@matthewmayer
Copy link
Contributor

matthewmayer commented Aug 6, 2025

I think it's a bit tricky to read partly because of the other commented out code. (Like the CJS imports and the seed). So comments are being used both as a header and to show optional alternatives.

Maybe some of the commented lines could be removed or split to another example.

@xDivisionByZerox xDivisionByZerox added c: docs Improvements or additions to documentation p: 1-normal Nothing urgent labels Sep 27, 2025
@xDivisionByZerox xDivisionByZerox added this to the vAnytime milestone Sep 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: docs Improvements or additions to documentation p: 1-normal Nothing urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants