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

Clean up how field values are displayed #855

Merged
merged 3 commits into from
May 12, 2019

Conversation

drjonnicholson
Copy link
Contributor

@drjonnicholson drjonnicholson commented Mar 19, 2019

This PR fixes some minor presentation issues with enums etc.

@coveralls
Copy link

coveralls commented Mar 19, 2019

Coverage Status

Coverage decreased (-0.8%) to 81.745% when pulling 8b216c7 on drjonnicholson:cleanup-field-values into 2f65f05 on Rebilly:master.

@RomanHotsiy
Copy link
Member

Ah, actually for enum and default values I am intentionally persisting double quotes to clearly distinguish string type.

Just a few examples:

  • 200 (number) vs "200" (string)
  • true (bool) vs "true" (string)

Does it make sense?

@drjonnicholson
Copy link
Contributor Author

I get you, you're making sure the type is a bit more explicit through the value.

Personally I though that, since the type is displayed on the line above, it is clear enough without them. To me this made it cleaner / more readable, but honestly I'm fine if it stays as is (minus the trailing spaces on the enum values hah!)

@RomanHotsiy
Copy link
Member

RomanHotsiy commented May 6, 2019

Personally I though that, since the type is displayed on the line above, it is clear enough without them.

Yes, but sometimes it can get unclear. Check out your own enum example above and notice null value at the end.

(minus the trailing spaces on the enum values hah!

This is definitely an issue. Could you update your PR to address only this issue?
Thanks!

@drjonnicholson
Copy link
Contributor Author

Fair point well made 👍

I've reverted to the stringify method, I believe this has been reverted to be easy to read and should still resolve the spacing issue. I'll update the PR description accordingly.

@drjonnicholson
Copy link
Contributor Author

Original Description


This is a simple PR to clean up other field/enum values as done in #847.

Examples from RC4:

Defaults
redoc-defaults
with this PR becomes:
image

Enums
redoc-enums
with this PR becomes:
image

Pinging @RomanGotsiy as you helped with the other PR.

@RomanHotsiy RomanHotsiy merged commit 5c91590 into Redocly:master May 12, 2019
@RomanHotsiy
Copy link
Member

thanks!

@drjonnicholson drjonnicholson deleted the cleanup-field-values branch May 19, 2019 16:03
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