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

Erratum for Example 79 to correct width and height properties #630

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

evanp
Copy link
Collaborator

@evanp evanp commented Dec 20, 2024

Example 79 includes an Image with width and height properties that are only allowed for Link objects. This erratum changes the example to move the width and height to the url property.

Example 79 includes an Image with width and height properties that are only allowed for Link objects. This erratum changes the example to move the width and height to the url property.
@@ -80,3 +80,27 @@ This document includes errata for the [Activity Streams](https://www.w3.org/TR/a
- Unlike `latitude` and `longitude`, the domain of the `altitude` term is the `Object` type. The `altitude` term should be included in the list of properties of an `Object`. Because `altitude` is primarily documented as a property of a `Place`, publishers should not include `altitude` on objects that are not of type `Place`, and consumers should accept objects with this property that aren't of type `Place`.

- The domain of the `attributedTo` property is both `Link` and `Object`. `attributedTo` should be included in the list of properties of a `Link`.

- Example 79 has an `Image` object with `width` and `height` properties, which
are only allowed on `Link` objects. One alternative is to use a `Link` object
Copy link
Contributor

@gobengo gobengo Dec 20, 2024

Choose a reason for hiding this comment

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

Suggested change
are only allowed on `Link` objects. One alternative is to use a `Link` object
only indicate `Link` in their Domain. One alternative is to use a `Link` object

I dont believe there is any normative text anywhere in the as2 TR that justifies a conclusion that these properties "are only allowed on Link objects".

I think a more appropriate resolution to the confusion here would be to add Image or Object to https://github.com/w3c/activitystreams/blob/main/vocabulary/index.html#L5531 , as I suggested 5 years ago.

Choose a reason for hiding this comment

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

Hmmm, I just re-read some stuff and I'm kind of convinced here that maybe the domain of width and height should be Image | Link? If you'll indulge the wonkery, I read this sentence from section 4.2 explaining link, and comparing examples 11 and 12:

Formally, the former example establishes an unqualified direct relationship with the image resource [i.e. a bare URL] while the latter creates a qualified, indirect relationship that allows additional properties about the relationship to be specified.

If we read example 80 as a "qualified, indirect" reference to the image (resizing it from a bigger note1.png to 16x16, and resizing note2.png for the 32x32 version), then it makes a lot more sense why width and height would be set there (although the example would support this interpretation more obviously if they were both resizing note-256-by-256.png 😅 ). This would also explain why icon is a distinct property, as opposed to just an image-- it's a qualified relationship and representational hint (i.e. show the 16x16 or the 32x32 depending on the window size/CSS/etc).

Just a theory... will try to make the next issue triage if it's worth discussing further.

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