Skip to content

Fixes for the HowTo sample#1919

Merged
danbri merged 6 commits intoschemaorg:masterfrom
dbiollo:patch-1
May 17, 2018
Merged

Fixes for the HowTo sample#1919
danbri merged 6 commits intoschemaorg:masterfrom
dbiollo:patch-1

Conversation

@dbiollo
Copy link
Contributor

@dbiollo dbiollo commented May 14, 2018

  • This makes all children (itemListElement field) of HowToSection be of type HowToStep. Effectively wraps any HowToDirection that was previously a child of HowToSection. My understanding of the design is HowToDirection & HowToTip should only be found inside a HowToStep.
  • Added "position" attribute to all instances of itemListElement
  • Fixed the "...Media" properties of HowToDirection in Microdata example

This seems to fix issues found in Google Structured Data Testing Tool, though not 100% certain about the validity of the before/during/after-Media attributes.

- This makes all children (itemListElement field) of HowToSection be of type HowToStep. Effectively wraps any HowToDirection that was previously a child of HowToSection. My understanding of the design is HowToDirection & HowToTip should only be found inside a HowToStep.
- Added "position" attribute to all instances of itemListElement
- Fixed the "...Media" properties of HowToDirection in Microdata example
@dbiollo
Copy link
Contributor Author

dbiollo commented May 14, 2018

@danbri @RichardWallis - some more fixes for the HowTo samples. Mind taking a look?
Note that I'm not totally sure if the media attributes are totally correct, but now they are consistently specified between JSON-LD, RDFa, Microdata.

@RichardWallis
Copy link
Contributor

@danbri The structure looks fine.

I share your questioning thoughts about the media attributes. They are defined as expecting MediaObject. What is shown in the example are defaulting to URL, which is OK, but not very representative of what might be expected. There again, MediaObject is probably a bit heavyweight in many real world situations, where for example a link to a YouTube video could be expected.

Perhaps adding URL to the expected type for these properties may clarify things for simplistic situations whilst not loosing the potential descriptive power of being able to use MediaObject.

Noticed that <img> was using "href" by mistake - changed to "src" for the URL.
Moved the before/after/during-Media properties into the same HowTo section so it's a bit easier to read.
Update the MediaObject usage - now all 3 examples use the "url" property.
(Verified in Google Structured Testing Tool)
@dbiollo
Copy link
Contributor Author

dbiollo commented May 16, 2018

Here's an update with using MediaObject - url - property (previously it was using the name, at least in Google SDTT). Note that for Microdata, I didn't have to create a wrapper div, though I did for RDFa.
For MediaObject, though, it seems that contentUrl would be a more accurate property?

I'm gonna follow up with a change to contentUrl in this pull request.

I do like the idea of supporting URL for the media properties. Do we want to do that in this release? If so, perhaps a followup pull request after this one?

One thing comes to mind is that with MediaObject, providers could use the subtypes ImageObject or VideoObject which give semantics about what kind of media it is.

@RichardWallis
Copy link
Contributor

@dbiollo Thanks for your efforts here.

By default URL is supported as a value for these properties (in fact the value for any property can be a Text, URL, or Role). I would be in favour of explicitly stating this to help understanding in this area.

As it is simple to do, I suggest we could do it in the upcoming release with this PR.

@danbri what are your thoughts?

Note that the duringMedia example (<img src="proxy.php?url=position-jack.mp4" />) is an image with a video link, so I've left it as a MediaObject. Having a good video example may be useful.
@danbri
Copy link
Contributor

danbri commented May 16, 2018 via email

dbiollo added 3 commits May 16, 2018 08:01
@dbiollo
Copy link
Contributor Author

dbiollo commented May 16, 2018

I've added the Docs for URL, and changed the "duringMedia" example to be just a URL. Please have a look and make sure this is what you meant.

I tested this in Google Structured Data TT and it doesn't seem to recognize the media attributes as URL. Maybe this is b/c the Range change hasn't been published? Not sure if there will be issues or if this will be OK once the schema gets released?

@RichardWallis
Copy link
Contributor

From looking at the sources this looks OK. Probably needs a final look over once it is merged and put up on Webschemas.org.

Yes, the lack of recognition of URL as an expected type in the SDTT, and other testing tools, will be because it does not get updated until after a new release.

@danbri danbri merged commit ad3ee40 into schemaorg:master May 17, 2018
@danbri
Copy link
Contributor

danbri commented May 17, 2018

Merged, I'll get it onto webschemas.org for final tire-kicking tomorrow... Thanks!

@dbiollo
Copy link
Contributor Author

dbiollo commented May 18, 2018

Thanks Dan! Looking forward to trying out the updated webschemas.org!

@danbri
Copy link
Contributor

danbri commented May 18, 2018

done - http://webschemas.org/HowTo and nearby ought to be same as github master branch now

dbiollo added a commit to dbiollo/schemaorg that referenced this pull request May 18, 2018
Neglected to propagate img tag changes to the the html sample in schemaorg#1919
@dbiollo
Copy link
Contributor Author

dbiollo commented May 18, 2018

Uh-oh, the attributes table is missing from http://webschemas.org/HowTo ...

@dbiollo dbiollo deleted the patch-1 branch May 18, 2018 18:51
@RichardWallis
Copy link
Contributor

I’ll take a look.

@RichardWallis
Copy link
Contributor

Fixed now

@dbiollo
Copy link
Contributor Author

dbiollo commented May 21, 2018

Thanks, looks good now!

danbri pushed a commit that referenced this pull request May 22, 2018
* Small fix to howto html samples

Neglected to propagate img tag changes to the the html sample in #1919

* Reduced indenting to consistent 2 spaces

Was pretty hard to read with the bigger font in webschemas.org. This reduces indenting to 2 chars
espinr pushed a commit to espinr/schemaorg that referenced this pull request Jun 7, 2018
* 'master' of https://github.com/schemaorg/schemaorg: (76 commits)
  Added tests for correct operation of traverseForHTML & traverseForJSONLD functions
  Updated for contentRating / Rating tweak.
  Added Rating as expected of contentRating, for schemaorg#1935 Thanks @vholland!
  Noted alias of HTML from rdf:HTML, schemaorg#1634
  alias HTML to rdf:HTML (schemaorg#1634)
  Obvious 404 fixes from issue (schemaorg#1901) (schemaorg#1930)
  Changes to move to https only (for UI, not for vocab URIs) (schemaorg#1932)
  Fix to docs/tree.jsonld causing crash
  2018 -> 2017, fixes schemaorg#1929 Thanks @Aaranged :)
  Removed duplicate entries, and added a summary. schemaorg#1891
  Updated to cover all changes in 3.4.
  More release notes.
  Added lots of release notes, converted from git.
  Update releases.html
  One-liner for creating release note entries.
  Working on conversion of 900+ lines of changes into release note format. For schemaorg#1891 release 3.4.
  Tweaks to image tag, changed "mp4" to "jpg", added alt. /cc schemaorg#1922
  Small fix to howto html samples (schemaorg#1922)
  Fixes for the HowTo sample (schemaorg#1919)
  Fix physician subclass (schemaorg#1911)
  ...

# Conflicts:
#	app.yaml
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