TheScienceMuseum / collectionsonline

Science Museum Group Collection Online
https://collection.sciencemuseumgroup.org.uk
MIT License
47 stars 3 forks source link

Description boxes for key result pages #779

Closed jamieu closed 7 years ago

jamieu commented 7 years ago

This builds on the work around nice urls and titles for key result pages (https://github.com/TheScienceMuseum/collectionsonline/issues/668)

Obviously we need some design (below is simply a rough mockup of idea) and some wider thought around what goes within that block.

But the basic idea is that for each Category, Museum and Gallery SERP 'landing' page we allow a short chunk of rich test to be displayed at the top of the first page or results.

Initially this will just be the title and a description paragraph and some links, but would be good to allow room for linking to related articles (within the group sites) and/or show sub-catergories for large categories based on date or materials (ie. pre-internet / post-internet for communications or metal vs plastic medical instruments).

Need to decide what to show if we are filtering by both a category and gallery (which description block do we show (for now lets go with the category taking priority).

This will also help with SEO as it creates nice results summaries for each category, museum and gallery within google.

The Thumbnail and Description fields (where available) should also be passed to the existing/relevant Twitter/OpenGraph/Schema.org metadata fields (I think we already pass the machine generated page title which we should keep as is) --> see this old ticket: https://github.com/TheScienceMuseum/collectionsonline/issues/570.

category-boxes

galley-summary

iteles commented 7 years ago

699 and #698 lead up to this issue.

tobystokes commented 7 years ago

did you have a spec doc for this, or was it my imagination? The pics above will service, if that indicates all possible contents. Would be good to know what might be optional

jamieu commented 7 years ago

The above will suffice for now (in giving an idea of content).

But @emilyfildes and I have had various conversations re. exactly what it should include, will have a read though my notes and update this issue.

jamieu commented 7 years ago

@tobystokes here goes, feel free to make suggestions!

But these are the ones we know we can produce content for & would like to feature. We won't have content for every field in every case; have marked these fields as optional

Category

Museum

Gallery

Note: In the backend, along with the other details above, we should also store a 'matching' Wikipedia URL for common categories. Although we will likely never display it explicitly, it will enable us (at a later date) to pull back a list synonyms for the category from Wikipedia.

samhstn commented 7 years ago

@jamieu In regards to display box preference for when multiple filters are selected.

When a user selects both Gallery and Museum we should show information on the gallery in the description box and not about the Museum (could you clarify this).

When a user selects both a Museum and a Category which one should take preference and be shown in the description box?

The same question for when a user selects both Gallery and Category.

jamieu commented 7 years ago

I think Category should take priority over Gallery/Museum when we have both.

On Mon, 3 Jul 2017 at 12:43, Sam Houston notifications@github.com wrote:

Assigned #779 https://github.com/TheScienceMuseum/collectionsonline/issues/779 to @jamieu https://github.com/jamieu.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/TheScienceMuseum/collectionsonline/issues/779#event-1148016006, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFk5Ytjcfg8woYZ26tYd_QMe50CTKvoks5sKNPmgaJpZM4L1AP0 .

jamieu commented 7 years ago

And Gallery over museum, when we have both:

So in this order of priority:

Category Gallery Museum

On Mon, 3 Jul 2017 at 12:47, Jamie Unwin jamieunwin@gmail.com wrote:

I think Category should take priority over Gallery/Museum when we have both.

On Mon, 3 Jul 2017 at 12:43, Sam Houston notifications@github.com wrote:

Assigned #779 https://github.com/TheScienceMuseum/collectionsonline/issues/779 to @jamieu https://github.com/jamieu.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/TheScienceMuseum/collectionsonline/issues/779#event-1148016006, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFk5Ytjcfg8woYZ26tYd_QMe50CTKvoks5sKNPmgaJpZM4L1AP0 .

samhstn commented 7 years ago

Great thanks @jamieu

samhstn commented 7 years ago

@tobystokes see #902

I've added a description box based on each of the json files in the description-boxes directory.

The description box should appear when you select a search filter for which we have inputted data for in a file in the description-boxes directory

The template file to work from can be found here: https://github.com/TheScienceMuseum/collectionsonline/pull/902/files#diff-ba85b27e1227349b4197e0b205136bfd

jamieu commented 7 years ago

Looking good 👍 I'll start to add some entries to the description-boxes/*.json files.

btw. its correct in the config file "sub-categories": [. But in the HTML is should probably be titled Popular Categories or 'Sub-Categories' (not Popular Objects). I'm sure @tobystokes will fix this while tweaking the CSS anyway, so just flagging it up.

Likewise 'View this gallery' should probably say "Visit this gallery".

Also Toby did you want decide on having it below or above the tabs, my pref. I think is above the tabs but below the search box?

screen shot 2017-07-04 at 17 09 21
jamieu commented 7 years ago

@shouston3 looks great so far 👍

I have added in some real text for all three description-boxes .json files.

In most cases the title will be the same as the name of the category or gallery we are matching on. In those cases it's pointless us explicitly adding a title element in the JSON. But would be good to have consistency on display re. titles, so could we make the title fall back to the category or gallery name in those cases?

Although I'm also not seeing the entry for galleries ie. 'Making the Modern World' or 'TV Heaven Gallery' http://localhost:8000/search/museum/science%20museum/gallery/making%20the%20modern%20world%20gallery?page[size]=50

http://localhost:8000/search/museum/national%20media%20museum/gallery/tv%20heaven%20gallery?page[size]=50

Despite an entry being in the gallery.json file https://github.com/TheScienceMuseum/collectionsonline/blob/description-boxes/description-boxes/gallery.json

Seems to be defaulting to the 'Museum description text' instead?

  "Making the Modern World": {
    "description": "Discover remarkable objects from 250 years of science and technology. Come face-to-face with iconic items, from Stephenson’s Rocket to the Apollo 10 command module and the first Apple computer."
  },
  "TV Heaven Gallery": {
    "description": "How has the small screen shaped our lives? Explore the development, significance and cultural impact of the most influential invention of the 20th century: television."
  },

Haven't checked (due to above) but worth checking "Who am I?" displays/matches OK despite the ?. http://localhost:8000/search/museum/science%20museum/gallery/who%20am%20i?%20gallery?page[size]=50

tobystokes commented 7 years ago

I've just moved it to where we expect it to be output. I see @jamieu hasn't added titles because they == the category name (always?)

samhstn commented 7 years ago

@jamieu If you rename "Making the Modern World" to "Making The Modern World Gallery" it should work.

Also, if the description box does not come through for a filter which you've added, there should be a message for what the key in the json file should be. You can see this in the developer tools of your bowser.

For instance when "Making the Modern World" didn't show I got the following logs in the console of my developer tools:

Gallery didn't match, ensure the exact gallery title was used
gallery title should match:  Making The Modern World Gallery

Which is telling me that the key in the json file that it is looking for is "Making The Modern World Gallery"

samhstn commented 7 years ago

@jamieu I couldn't find TV Heaven Gallery in the On Display filters. I have the following:

screen shot 2017-07-05 at 15 33 20
samhstn commented 7 years ago

The key for the json file is something that isn't used (shown on the page) and that is only a reference for fetching the rest of the data.

The "title" key is what you want to show on the page which can freely be changed (without affecting the fetched data).

jamieu commented 7 years ago

Ah yes, well spotted re. "Making The Modern World Gallery" (I did check see if they were the same and completely missed that). http://localhost:8000/search/museum/national%20media%20museum?page[size]=50

Good, forward thinking re. the 'debug output' will check that from now on.

btw. the TV Heaven Gallery is on the right here under NSMM https://collection.sciencemuseum.org.uk/search/museum/national%20media%20museum?page[size]=50

jamieu commented 7 years ago

Looking good to me so far, @tobystokes let me know who you think you've finished your design bits.

tobystokes commented 7 years ago

done - though if you put in a load of new category images, i'd like to review. (or if you need me to make/format/ category images, to be hosted in repo, then send me pics. ( @emilyfildes ?)

jamieu commented 7 years ago

This might just be me but when I go direct to the page (via a bookmark) I don't see the boxes?

Although if I de-select and reselect the filter (or another one) on an already loaded search results page I do see it? Initial load vs AJAX?

--

emilyfildes commented 7 years ago

Hello @tobystokes

We were planning on getting gallery images (and will be collating these this week) - but probably no images for the categories at the moment.

Happy to share the gallery images when we have them.

Thanks!

jamieu commented 7 years ago

Looks good 👍

I can add the images as we get them (may talk to you @tobystokes if they look like we could run some kind of grading/filter across them).

tobystokes commented 7 years ago

yeah, if you stick to standard aspect ratio of 4:3 for them all, they shouldn't need any further treatment.