-
Notifications
You must be signed in to change notification settings - Fork 169
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
Add frontend media documentation #4313
Conversation
frontend/src/types/media.ts
Outdated
audio_set?: AudioSet | ||
/** A raw list of strings representing musical genres. */ | ||
genres?: string[] | ||
length?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not actually know what this length
is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be removed.
length
is a query parameter, not a property of an AudioDetail
.
lengths: "length", |
Full-stack documentation: https://docs.openverse.org/_preview/4313 Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again. You can check the GitHub pages deployment action list to see the current status of the deployments. Changed files 🔄: |
Removing myself and Staci from reviewing this as we don't have enough subject-matter expertise or context for it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start for this implementation. I added several suggestions, but don't wan't to block.
I feel like it's wasteful to re-write the comments for each layer of the stack instead of re-using the docs from catalog/API. I don't know what the best implementation of this would be.
* | ||
* Corresponds to the `source_name` field of provider results | ||
* from the API's `/stats/` endpoints. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
frontend/src/types/media.ts
Outdated
audio_set?: AudioSet | ||
/** A raw list of strings representing musical genres. */ | ||
genres?: string[] | ||
length?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be removed.
length
is a query parameter, not a property of an AudioDetail
.
lengths: "length", |
Thanks @obulat! I agree with your suggestions and the redundancy of this approach. I'll apply your suggestions. Once we get this merged (which will be an improvement over the current lack of docs) we can consider ways of reducing redundancy like having root TypeScript types that are transpiled to Python or something |
Agree, that's why I approved here :) |
Co-authored-by: Olga Bulat <obulat@gmail.com>
@dhruvkb could I get a review here this week? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I have a small nit about punctuation but that is leaning a lot towards personal preference so I'll not block.
/** the raw name of the creative work, as returned by the API */ | ||
|
||
/** The raw name of the creative work, as returned by the API. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit/personal preference: This isn't a sentence so it shouldn't start with an uppercase letter and should not end with a fullstop. I'm basing this on how dictionaries present definitions.
Fixes
Fixes #4025 by @dhruvkb
Description
Adds new comments to media properties in documentation/meta/media_properties/frontend.md, and publishes the generated documentation changes.
I tried to provide information relevant to the context of using these properties in the frontend, rather than purely generic information. I am very open to suggestions on what is useful and consider this a PR that will generate a lot of positive feedback as a "conversation starter" rather than a perfect implementation.
Testing Instructions
Review the produced docs.
Checklist
Update index.md
).main
) or a parent feature branch.just catalog/generate-docs
for catalogPRs) or the media properties generator (
just catalog/generate-docs media-props
for the catalog or
just api/generate-docs
for the API) where applicable.Developer Certificate of Origin
Developer Certificate of Origin