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

improve Enum documentation #1312

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

techmannih
Copy link
Contributor

What kind of change does this PR introduce?
improve Enum documentation
Issue Number:

@techmannih techmannih requested a review from a team as a code owner January 14, 2025 12:43
Copy link

github-actions bot commented Jan 14, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
website ✅ Ready (View Log) Visit Preview cc0acf7

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (219521e) to head (cc0acf7).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1312   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines          396       396           
  Branches       106       106           
=========================================
  Hits           396       396           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

@techmannih
Copy link
Contributor Author

techmannih commented Jan 15, 2025

@benjagm @valeriahhdez review this PR

@DhairyaMajmudar
Copy link
Member

@techmannih pls. attach some screenshots and screencasts showing your changes

@techmannih
Copy link
Contributor Author

@DhairyaMajmudar sure,

20250201090654.mp4

Copy link
Contributor

@valeriahhdez valeriahhdez left a comment

Choose a reason for hiding this comment

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

Instead of replacing one example with another, I suggest adding your example to the document. Please provide an introductory statement to your example.

@techmannih
Copy link
Contributor Author

@benjagm please review this now.

@benjagm benjagm requested review from gregsdennis and jdesrosiers and removed request for jdesrosiers March 5, 2025 22:18
### Extended Example: Accepting Multiple Data Types

Enums can be used without explicitly setting a data type, allowing different types of values.
In the following example, the schema is extended to include `null` (to represent an "off" state) and the number 42.
Copy link
Member

Choose a reason for hiding this comment

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

What would the number 42 mean? If we're explaining null, then it seems we should explain 42 as well. Alternatively leave out the explanation.

Copy link
Member

Choose a reason for hiding this comment

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

Now you've just removed 42 from the text, but it's still in the sample instance.

My point wasn't to remove the value. It was to either remove the description of null or add a description to 42.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we are using both in the example, so I think we need to have both. what do you think?

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.

[📝 Docs]: Improve Enum documentation
5 participants