#microformats 2020-12-10

2020-12-10 UTC
[tw2113_Slack_], [Raphael_Luckom], [tantek], iwaim, maxwelljoslyn, sebbu and [snarfed] joined the channel
#
btrem
edited /menu-examples (+204) "/* T.S. McHugh's Irish Pub */ Adds menu details for items with more complex pricing schemes."
(view diff)
[tantek], craftyphotons__, [tw2113_Slack_], iwaim_, KartikPrabhu, [KevinMarks], jeremy, ethanyoo, [Raphael_Luckom], [hibs], ToddontheHusting, [Murray], [chrisaldrich], gRegorLove, [fluffy], [pfefferle], [schmarty], [Emma_Humphries] and [manton] joined the channel; KartikPrabhu left the channel
#
btrem
edited /menu-brainstorming (+555) "Adds idea for dealing with menu sections."
(view diff)
ethanyoo and btrem joined the channel
#
btrem
I am marking up a food menu to try out different ideas for h-menu, and tried the include-pattern using the object element. I was unpleasantly surprised:
#
btrem
I linked an h-card to menu items, but in Firefox, it actually copies the h-card contents in the place where the <object> element is. That actually makes sense from the point of view of the element, but definitely not what I expected.
#
btrem
And I imagine now what authors would want.
#
btrem
...not what authors would want.
#
[tantek]
btrem, yeah with HTML5 and more modern HTML, we should re-assess and update the include-pattern accordingly
#
btrem
I've been looking into this today. May I suggest the <link> element instead?
#
[tantek]
not sure that would work either unfortunately
#
btrem
It's already allowed for microdata. (:
#
[tantek]
as those are document scoped
#
[tantek]
no one actually implements that for microdata AFAIK
#
btrem
No, not in <body>. At least, I don't think so.
#
[tantek]
making it a special element thing will make it harder on web authors
#
btrem
We don't care about microdata implementations, do we?
#
[tantek]
well the lack of implementation (for something so old) is a good signal that it's not a good idea
#
[tantek]
there's been work on HTML includes since then that we should take a closer look at
#
btrem
What should I be looking at?
#
tantek
edited /include-pattern (+106) "warning, only for classic microformats"
(view diff)
#
btrem
The pity is that for include-pattern, <link> would probably be intuitive to new authors. Use <link> to link e.g. an h-card to another microformat. Shame.
#
[tantek]
<link> is not intuitive for authors in general, unless you're using it for a stylesheet
#
btrem
Yeah, I see your point. That's why I said for "new authors". Experienced web authors who are new to mf might get confused by a <link> in the body.
#
btrem
I already saw the wiki include-pattern page. That's why I tried the <object> element. I was asking about "work on HTML includes since then". Is there work outside of the mf community on linking data on the same page?
#
btrem
I suppose the problem with <link> applies to <meta> as well. It, too, is normally not used in <body> even though it is permitted.
#
[tantek]
permitted is not the same as "it works", that's the problem.
#
[tantek]
the short answer to your question is to research what additions have been made to https://html.spec.whatwg.org/multipage/ since 2010 and see if any of those additions would be useful
#
[tantek]
I realize that's a pretty big effort, however that kind of thoroughness is actually what's needed here.
#
[tantek]
we've been able to ignore the "include-pattern" so far in the evolution of microformats2 because there haven't been any use-cases that required it
#
[tantek]
so I'd advise also trying to coming up with -brainstorming solutions that do not require any form of include
#
btrem
Ok, good advice. Honestly, I've got two different menus, one using <table> markup, the other using <dl> markup. I can simply make sure the h-card is inside a section to solve the problem. But that might not work for web authors. So I was trying out include patterns.
#
btrem
I suppose a web author could always add an h-card inside an h-menu and use display: none if the layout doesn't work with the h-card visible in that place. Clumsy, but it would work.
#
[KevinMarks]
why do you need to include an h-card? if it's a layout issue, could you use grid to move elements around the page?
#
[KevinMarks]
we have examples of putting the containing h-* on the body, though that can be confusing too.
#
btrem
When I first brought up the idea of an h-menu format, someone (me? [tantek]? [KevinMarks]?) said that a menu could be linked to the restaurant via an embedded h-card.
#
btrem
It was me.
#
btrem
https://chat.indieweb.org/microformats/2020-12-03 "So much the better if a menu mf could contain an h-card for the restaurant. Then a page can be parsed for the restaurant name, phone number, and menu items."
#
btrem
https://chat.indieweb.org/microformats/2020-12-03 "So much the better if a menu mf could contain an h-card for the restaurant. Then a page can be parsed for the restaurant name, phone number, and menu items."
#
btrem
[tantek] agreed: exactly!kind of like how h-resume contains an h-card for the person!
#
[KevinMarks]
I am assuming that in general a menu is a page (if your menu is many web pages, that may be OK too, but Gordon Ramsay will swear at you)
#
[KevinMarks]
so the page can contain the menu and a h-card for the restaurant too, but it may not need to be the full complex h-card with geo etc in.
#
[KevinMarks]
having that in the page footer is probably a good practice, but it need not be in the menu.
#
btrem
To hell with Gordon Ramsay! (Actually, even though I worked for /decades/ in restaurants, I don't know who he is, except that he's a "celebrity chef". :-D
#
btrem
In which case, the h-menu class would have to be on the <body> element.
#
btrem
Which I could deal with, though as you said, that can be confusing.
#
[KevinMarks]
I have watched a few Kitchen Nightmares (the UK ones are better) and it mostly him saying "clean your **** kitchen. Trim your menu back from 10 pages to a couple of pages of good things made from fresh ingredients." and then his crew tidying and redecorating front of house.
#
[KevinMarks]
He did do a good series for Channel 4 which was a masterclass in cooking techniques.
#
[KevinMarks]
So maybe theres a parallel in Restaurant Website Nightmares
#
btrem
This is not a universal view by any means, but a fair few restaurant lifers hate celebrity chefs in general.
#
btrem
:-D "Restaurant Website Nightmares"
#
btrem
that'll be the mf tv program(me). :)
#
btrem
Hosted by you! Or [tantek].
#
btrem
But not "Restaurant Website Nightmares", just "Website Nightmares".
#
btrem
"clean [up] your **** [markup]." It'll be a hit!
#
[KevinMarks]
Since moving back to North Yorkshire, I've been documenting restaurants and food shops in Google (because they all look at TripAdvisor)
#
[KevinMarks]
Google Local that is.
#
[KevinMarks]
Or they set up a facebook page and think that's enough (which is understandable given the FB UX)
#
[KevinMarks]
which reminds me, we should iterate on http://microformats.org/wiki/opening-hours too
#
[KevinMarks]
Google Local does a decent job of this - I have fixed a lot of places hours myself, but they can claim it and edit, which has been useful recently for those who grasp it.
#
btrem
I didn't know that existed. *Yes* we should work on that. I suspect that opening hours would be very useful to h-menu consumers.
#
btrem
I had mixed results with Google Local. I was sort of miffed that I used an open-hours markup (I think of Google's making!) and Google ignored it.
#
btrem
I don't know if I'm too pie-in-the-sky, but it would be nice for local businesses to publish their info on their website and have e.g. Yelp or Google pick it up.
#
btrem
So they wouldn't have to open accounts in every damn service/search engine/etc. and update each one whenever they change something in their business. Like hours, or menu, or whatever.
#
[KevinMarks]
as a "local expert" or something, I have enough edit points to change places hours (with a photo of them from the premises)
#
btrem
A good way to know if your proposed microformat properties work is to try to use them. Fortunately, I still have two (old) html menus from two different restaurants to try. It's a good way to quickly come across problems. ;-)
#
btrem
Which brings up a question: restaurants often have different sizes for items, e.g., small or large salad, 12" or 16" pizza, schooner or pint of beer. h-product doesn't have an obvious way to handle this. Any thoughts?
#
btrem
Also no way to handle add-ons: add bacon to your burger, $2.00. Add mushrooms to your pizza, 1 pound (sorry, don't have a key for pounds sterling!).
#
btrem
I'm suspicious of the google website builder. Beware of Romans bearing gifts.
#
[KevinMarks]
option-3 (I have a Uk keyboard now so # is option 3 and £ is shift 3)
#
btrem
Open Table had a free mobile website builder that had the nice side-effect of locking you the restauranteur into their service. Which made me think it was not a side effect at all. :-/
#
[KevinMarks]
well, the question is how detailed do you need to parse the extras out?
#
btrem
Yeah, that is the question? For the website that's read only, not much. But if it were a menu that you could order from that'd be different. And if we were hoping to get e.g. Open Table or GrubHub to pick up the menu without the owner having to reenter the data, then it would matter.
#
[KevinMarks]
if you have a price for an item, you could have the menu show burger £5 with bacon + £2 but mark that up as 2 items that parse to [{"name":"burger","price":"£5"},{"name":"bacon burger","price":"£7"}]
#
btrem
I take it this didn't come up when h-product was developed? No issues with sizes on clothing or whatever?
#
[KevinMarks]
like how we deal with dates, or use abbr
#
btrem
So think about how the json should look, and work backwards from there? That's a thought.
KartikPrabhu joined the channel
#
[KevinMarks]
well, don't overdo that or you do end up with schema again. It is a back and forth between trying to keep as much information in the plaintext as possible, and adding structure hints as to what is important.
btrem joined the channel
#
btrem
WFT freenode?! It just dumped me off. lol
#
[KevinMarks]
the big temptation is to define an abstract data structure and insist that people publish in that.
#
btrem
Yeah, I definitely want to avoid the schema.org thing. Ok, thanks, I'll give this some thought.
#
btrem
I was trying to figure out how to deal with prix fixe menus, too. There's no way to specify choice of in mf. But for now, I'm strongly inclined to KISS. Just apply a price to the whole menu, and put all the choices, for each course, in one large e-description.
#
[KevinMarks]
well prix fixe usually have cheeky supplements too
#
[KevinMarks]
they're there for the upsell