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

Refactor documentation for content/media repository #2068

Merged
merged 4 commits into from Jun 11, 2019

Conversation

Projects
None yet
4 participants
@turt2live
Copy link
Member

commented Jun 3, 2019

Fixes #2060
Fixes #772
Fixes #888

@turt2live turt2live added the Matrix 1.0 label Jun 3, 2019

@turt2live

This comment has been minimized.

Copy link
Member Author

commented Jun 3, 2019

Note: this merges the /{filename} download route into the one without it. This is to reduce redundancy, and is pending a more general description on what to do with trailing slashes: #2061

Edit: Or not, because the JSON validator hates that idea.

Split download endpoints back apart
Apparently you can't have an optional path parameter.

@turt2live turt2live requested a review from matrix-org/spec-core-team Jun 3, 2019

The *desired* width of the thumbnail. The actual thumbnail may not
match the size specified.
The *desired* width of the thumbnail. The actual thumbnail may be
larger than the size specified.

This comment has been minimized.

Copy link
@dbkr

dbkr Jun 5, 2019

Member

Do we want to make it illegal to send a smaller size? If we have a thumbnail that is very slightly smaller than requested and one that is much larger, it doesn't seem like it would be unreasonable for the server to decide to send the smaller one.

This comment has been minimized.

Copy link
@turt2live

turt2live Jun 5, 2019

Author Member

We do want to make it illegal - this is covered in the thumbnails section to avoid having the requirement in multiple places.

The rationale being the last paragraph of #2060 (comment)

This comment has been minimized.

Copy link
@dbkr

dbkr Jun 10, 2019

Member

Hmm - so the justification there is that the server will return an image that's a little too small and the client will have to upscale, but, in riot-web at least, if the server returned a version that was too big we'd have to downscale which can still end up introducing artefacts. I thought the intended solution to this was to spec the list of standard sizes a client can request so it can ask for one of them in the knowledge that it ought to get what it asks for.

ICBW but I do seem to remember it being fairly deliberate that servers could return slightly smaller versions as well as slightly larger.

This comment has been minimized.

Copy link
@turt2live

turt2live Jun 10, 2019

Author Member

@ara4n seems to be the other person with strong opinions here, so pinging to drag him into this. Not sure who else has the context on this problem, but would recommend dragging them in as well.

Goal for this PR is to spec safe assumptions clients can make. I do want to avoid sliding into the position of leaving the spec vague and ignoring the problem though.

This comment has been minimized.

Copy link
@ara4n

ara4n Jun 10, 2019

Member

the artefacts from upscaling should always be worse than the artefacts from downscaling, given in upscaling we're trying to interpolate data which otherwise isn't there, whereas downscaling we should be able to get stuff which is at least as good quality.

This comment has been minimized.

Copy link
@uhoreg

uhoreg Jun 10, 2019

Member

If the original image is smaller than the requested thumbnail size, then do we want the server to upscale the image, or just send the original image?

This comment has been minimized.

Copy link
@turt2live

turt2live Jun 10, 2019

Author Member

If the original image is smaller than the requested thumbnail size, then do we want the server to upscale the image, or just send the original image?

Send the original image, otherwise the server makes the image useless to everyone.

This comment has been minimized.

Copy link
@dbkr

dbkr Jun 11, 2019

Member

OK - fair enough if we're sure.

Show resolved Hide resolved event-schemas/schema/core-event-schema/msgtype_infos/image_info.yaml Outdated
Show resolved Hide resolved specification/modules/content_repo.rst Outdated
Show resolved Hide resolved specification/modules/content_repo.rst Outdated

@turt2live turt2live requested a review from dbkr Jun 5, 2019

@dbkr

dbkr approved these changes Jun 11, 2019

Copy link
Member

left a comment

Thanks :)

@turt2live turt2live merged commit 370ae8b into master Jun 11, 2019

8 checks passed

buildkite/matrix-doc Build #312 passed (1 minute)
Details
ci/circleci: build-dev-scripts Your tests passed on CircleCI!
Details
ci/circleci: build-docs Your tests passed on CircleCI!
Details
ci/circleci: build-swagger Your tests passed on CircleCI!
Details
ci/circleci: check-docs Your tests passed on CircleCI!
Details
ci/circleci: validate-docs Your tests passed on CircleCI!
Details
docs Click details to preview the HTML documentation.
Details
swagger Click to preview the swagger build.
Details

@turt2live turt2live deleted the travis/1.0/mxc branch Jun 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.