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
Merged

Conversation

turt2live
Copy link
Member

Fixes #2060
Fixes #772
Fixes #888

@turt2live turt2live added the Matrix 1.0 Spec PRs that need review for 1.0 label Jun 3, 2019
@turt2live
Copy link
Member Author

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

Apparently you can't have an optional path parameter.
@turt2live turt2live requested a review from a team June 3, 2019 03:33
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.
Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

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)

Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

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

Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Member

Choose a reason for hiding this comment

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

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

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.

Copy link
Member

Choose a reason for hiding this comment

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

OK - fair enough if we're sure.

specification/modules/content_repo.rst Outdated Show resolved Hide resolved
specification/modules/content_repo.rst Outdated Show resolved Hide resolved
@turt2live turt2live requested a review from dbkr June 5, 2019 16:37
Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

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

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Matrix 1.0 Spec PRs that need review for 1.0
Projects
None yet
4 participants