Closed Bug 857702 Opened 12 years ago Closed 12 years ago

re-add hCard and h-card support

Categories

(Participation Infrastructure :: Phonebook, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
2013-09-26

People

(Reporter: williamr, Assigned: fxa90id)

Details

(Whiteboard: [kb=1112213] microformats, hcard)

We should re-add hCard and h-card support. Tantek has already submitted a pull request: https://github.com/mozilla/mozillians/pull/446 Tanktek, is any testing needed? If not, we can mark this as qa-. Thanks for the pull request!
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2013-04-18
There are two ways to verify this support: 1. Client-side: Install the Operator for Firefox toolbar extension[1], turn on its debug mode, go to a Mozillians profile page with all the fields filled out, verify that Operator's "Debug" option under its toolbar "Contacts" button/menu shows the data from the page's profile fields accurately. [1] https://addons.mozilla.org/en-us/firefox/addon/operator/ 2. Server-side (will only work with public Mozillians profiles). Use the H2VX[2] service to convert a Mozillians's profile URL to a vCard for adding to your local address book. Verify that the fields filled out in the Address Book entry correspond to the respective fields in the Mozillians profile. This test can potentially be automated by saving the .vcf file that is returned by H2VX and then checking that subsequent builds generate the same .vcf file. [2] http://h2vx.com/vcf/ Additionally, I made very conservative changes to the address portion of the Mozillians profile. With maybe a bit more conditionalizing of the code and another div or two it would be possible to export full fidelity address information as well. However I wanted to at least restore the previous level of hCard support before making further changes. If we're open to more changes to better implement address information support, please open a bug on "Add better hCard address information support" for Mozillians profiles, assign it to me and I'll see what I can do in the code (same file likely).
Whiteboard: microformats, hcard
Tantek - help me understand a bit of what I'm seeing especially what the expected results are. I'm following option 1 in comment 2 for the testing approach. Naively looking at the pull request I see enhancements made to first name, email, nickname, url, address, note, and photo. I should note that working with hcard/h-card formats is a new experience for me. When I view https://mozillians.allizom.org/en-US/u/mbrandt/ the data being extracted is: object category { 0=staff 1=qa 2=python 3=test 4=qa 5=cowboy } object email { object 0 { value=mbrandt@mozilla.com } } fn=Matt Brandt object n { object given-name { 0=Matt } object family-name { 0=Brandt } } object nickname { 0=mbrandt } object note { object 0 { bambi was a baby deer lost in the woods. His friends were other woodland creatures. } } object url { 0=http://secretmustache.com/ } BEGIN:VCARD PRODID:-//kaply.com//Operator 0.8//EN SOURCE:https://mozillians.allizom.org/en-US/u/mbrandt/ NAME:Mozillians: Matt Brandt VERSION:3.0 N;CHARSET=UTF-8:Brandt;Matt;;; FN;CHARSET=UTF-8:Matt Brandt CATEGORIES;CHARSET=UTF-8:staff,qa,python,test,qa,cowboy UID: URL:http://secretmustache.com/ EMAIL:mbrandt@mozilla.com NOTE;CHARSET=UTF-8:bambi was a baby deer lost in the woods. His friends were other woodland creatures. NICKNAME;CHARSET=UTF-8:mbrandt END:VCARD What field should be extracted? I don't see an address or photo.
:mbrandt, good points. This code went live today, and the hcard is valid. However, the photo and the address are not a part of the hcard payload. I have a couple theories for why: 1) The photo isn't a part of the payload because it's not in the .hcard container; it's just after. 2) The address isn't a part of the payload because the individual components of the address -- country, region, city -- aren't marked up as such (http://www.microformats.org/wiki/microformats-2#h-adr). Tantek hints at this issue in comment 2; I think we should make it work. These should be quick fixes for someone who knows about hcards! Meanwhile, the site is not broken.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee: nobody → michaljev
Whiteboard: microformats, hcard → [kb=1112213] microformats, hcard
:fxa90id asks "Do you want me to add note field and categories?"
We already have hCard categories, which lists the string 'Groups' followed by the number of groups you're in. If I understand this correctly the contact card will be filled in the different categories of your phonebook, based on the 'Categories' string. So maybe it does make sense just to list 'Mozillians' under the categories field. Thoughts?
Flags: needinfo?(williamr)
Flags: needinfo?(hoosteeno)
fxa90id what you plan to add in the 'note' field?
Flags: needinfo?(michaljev)
(In reply to Giorgos Logiotatidis [:giorgos] from comment #6) > So maybe it does make sense just to list 'Mozillians' under the categories > field. Yes, I agree this makes sense.
Flags: needinfo?(williamr)
in comment#3 was note, so I was just thinking
Flags: needinfo?(michaljev)
I think in Note should be Bio description :) if someone have, and I agree with adding to categories only Mozillians.
(In reply to Michał Frontczak[:fxa90id] from comment #10) > I think in Note should be Bio description :) if someone have, and I agree > with adding to categories only Mozillians. As long as the note field can hold lots of text, this sounds good to me. Thanks!
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
Verified on stage. Thanks :fxa90od!
Status: RESOLVED → VERIFIED
Flags: needinfo?(hoosteeno)
Target Milestone: 2013-04-18 → 2013-09-26
You need to log in before you can comment on or make changes to this bug.