InteractiveMechanics / nmai-nk360-interactives

0 stars 0 forks source link

[x] Caption text displaying in two different places #668

Closed amberreeves closed 6 years ago

amberreeves commented 6 years ago

There is a field ""caption"": in the json file that is set to display in two different locations - the Caption field in the side bar above the discussion questions and the caption field under the quote. It is exactly the same text and it is not entered in more than the 1 field in the json file.

We can see where it is in the index file but, when we tried to hide it in an individual instance, after it was compiled by Grunt, it wasn't enough. It must need to change somewhere else but we haven't figured out where

jmaj commented 6 years ago

Do they want us to remove the caption that is showing up on the right side?

amberreeves commented 6 years ago

please see issues #168 for the order of items to display in the sidebar.

The caption field in the side bar will contain some miscellaneous text. This is an optional, open field that the client can use if/when they need space for a source caption, and that does not display when there is no text entered for it. There are currently zero sources in any of the instances we created that have text for this field. So it should not be displaying at all.

The caption field under an image or quote in the white annotation space is text describing the image or quote, or whatever. Many of the sources in the instances we've created include text for this field.

These are two separate fields with very different content. But right now, we're seeing the same text displaying both fields. Can you look into why this is happening? Is it the JSON format, or the text entered in JSON, or a bug with how the fields are pulling in?

mtedeschi commented 6 years ago

We currently have: "image_caption": "", "caption": "",

... in the JSON file. Both of these are added into the annotation area. We also need a "caption" field that goes into the column to the left. Let's make that "resource_caption" instead, so we don't need to change anything in the JSON file.

jmaj commented 6 years ago

Wait the current caption field is the item that goes in the left already

jmaj commented 6 years ago

Based on the previous issue


{
            "id": 1,
            "title": "Darrin Old Coyote (Crow)",
            "image_url": "",
            "image_caption": "",
            "image_credit": "",
            "body": "“The <span data-pronounce='/nk360/shared/lib/im/audio/PL_Crow.mp3'>Crow</span> Nation, we’re Apsáalooke Nation. That’s what we refer to ourselves as, Apsáalooke. The Apsáalooke, we come from a warrior tradition. It wasn’t about, one day they woke up and said, from now on we’re going to be warriors . . . they wanted to protect their homeland from being invaded by whoever it was—whether it be <span data-pronounce='/nk360/shared/lib/im/audio/PL_Blackfeet.mp3'>Blackfeet</span> to the north or the <span data-pronounce='/nk360/shared/lib/im/audio/PL_Arapaho.mp3'>Arapahos</span> and <span data-pronounce='/nk360/shared/lib/im/audio/PL_Sioux.mp3'>Sioux</span>—and so they basically had to train themselves to become warriors. And for Indian people, warriors meant protecting. Protecting the family, protecting the home. And they would be the front lines, protecting their homeland and what they believed in. And they never backed down.”",
            "source": "Darrin Old Coyote (Crow), NMAI Interview, August 2016",
            "caption": "Darrin Old Coyote was the twenty-first chairman of the <span data-pronounce='/nk360/shared/lib/im/audio/PL_Crow.mp3'>Crow</span> Nation. His Apsáalooke name is Ishbilxe Itche and he is a member of the Piegan clan and a child of the Ties in a Bundle and Whistling Water clans. As a tribal chairman, Mr. Old Coyote has a deep commitment to building the tribal economy and strengthening Crow <span data-toggle='tooltip' title='The authority of a nation or state to govern itself.'>sovereignty</span>.",
            "audio_url": "",
            "video_url": "",
            "source_type": "Quote",
            "excerpt": "“The Crow Nation, we’re Apsáalooke Nation. That’s what we refer to ourselves as, Apsáalooke. The Apsáalooke, we come from a warrior tradition.”",
            "thumbnail_image": "",
            "question_text": "According to Darrin Old Coyote, what qualities do Crow Nation leaders exhibit?"
        }

caption is for the left sidebar, we need a new json value for the right side of caption correct?

amberreeves commented 6 years ago

@mtedeschi and @jmaj can you two talk through this? i dont know how else to explain how these fields work. happy to draw it out or whatever works, but let me know if you can resolve it.

jmaj commented 6 years ago

I just need to know if the current caption above is for the left or right side.

mtedeschi commented 6 years ago

The current "caption" is for the right side (the annotation area side). The new "resource_caption" is for the left side.

jmaj commented 6 years ago

resource_caption has been added to the five json files we have, they'll need to add it in there other annotation json files as well.

amberreeves commented 6 years ago

Sent to Laurie

You can go in and make any text edits you'd like to the JSON files now. Just wait to redeploy them until our changes are pushed up. I'm hoping that will be Monday, but I will keep you updated.

We've added another field to the JSON structure to better accommodate the sidebar caption field (see line 10 in the warranty spreadsheet). This field has been added to all sources in all instances we've created and to the template JSON file. You can go in and add it to all instances you've created (to those sources that will use it, and for consistencies sake across all instances), although it does not have to be added if it's not being used (if there aren't any sources that use it right now, you might not want to spend the time doing this, up to you).