Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gallery redesign WIP: Initial PR #12576

Merged
merged 33 commits into from
Apr 26, 2016
Merged

Gallery redesign WIP: Initial PR #12576

merged 33 commits into from
Apr 26, 2016

Conversation

NataliaLKB
Copy link
Contributor

@NataliaLKB NataliaLKB commented Apr 15, 2016

What does this change?

@zeftilldeath designed what galleries should look like, this is the initial PR implementing the design.

What is the value of this and can you measure success?

This will start as a 0% A/B test while we iterate. Next week the aim is to start rolling it out an audience

What is next?

These will all be done in future prs

  • Use picture element instead of srcset. We will refactor the scala img helper to reuse that, but outside this PR
  • Try to eliminate jank, at least where pictures are loading. Had a talk with @OliverJAsh yesterday about how to do this.
  • Add animation for when you scroll down (ask myself or @zeftilldeath for the video if you want to see)
  • On mobile, option to only see images and not captions.
  • Set a limit for caption length on both mobile and desktop
  • Fastly Change persistent cookie for optin so that people in the business can take a look without adding a header (https://github.com/guardian/fastly-edge-cache/pull/614)
  • Fix 100vh jumping on mobile across immersives. talked to @gtrufitt about this
  • MPU slot styling

Does this affect other platforms - Amp, Apps, etc?

No

Screenshots

Mobile:
image
image

Desktop:
image
image

Request for comment

@OliverJAsh


@*

TODO:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a lot of todos in the code for future iteration. Apologies in advance if it is confusing!

@paperboyo
Copy link
Contributor

OMG!!111ONE! 😍

"Try to eliminate junk" & "Fix 100vh jumping on mobile" - maybe FulscreenAPI? Anyway: 🍻 for whomever succeeds!

Maybe also worth looking at the very small related #6144?

At the end, when all is done and everybody's drinking 🍾, we may think of joining galleries from the same series? Maybe? Like in this screenshot (or even without the disruptive endslate altogether): #5934 (comment)?

swipe...swipe...swipe...swipe...ad_impression...swipe...swipe...swipe...swipe...ad_impression...swipe...swipe...swipe...swipe...

@jamesgorrie
Copy link
Contributor

@akash1810 Look at this beauty (not talking about @paperboyo )...





Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace

position: relative;
background-position: center center;
-webkit-background-size: cover;
background-size: cover;
Copy link

@sammorrisdesign-zz sammorrisdesign-zz Apr 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't autoprefixer mean we don't have to add the -webkit rule?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, haven't written much scss in the project so far. Will remove now!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed. Thank you for reviewing! More comments, the better 👍

@sammorrisdesign-zz
Copy link

There are a bunch of sass whitespace and consistency things but I'm not going to be a pedant.

Only other thing I could think of is that the header is called immersive and the body is called new. Probably will be clearer to give it a single name.

Otherwise it's great that we're sorting these galleries out and it looks good. Probably will be better to get someone who knows what they're doing with scala for that side of things though.

@NataliaLKB
Copy link
Contributor Author

@sammorrisdesign, do let me know about the sass whitespace and consistency things! Its useful to me, and easy to fix.

Regarding naming, once galleries are replaced, the new prefix can be removed.

@sammorrisdesign-zz
Copy link

But aren't the immersiveGalleryHead and newGalleryBody linked together? I'm just thinking in terms of someone coming to this fresh, they might not realise they are linked.

}
}


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double return inconsistent with single return below. I think we tend to have single lines after blocks. But should at least be consistent in same file.

@NataliaLKB NataliaLKB force-pushed the gallery-redesign branch 3 times, most recently from 32dfbd2 to dbc35b1 Compare April 18, 2016 14:17
@NataliaLKB
Copy link
Contributor Author

But aren't the immersiveGalleryHeadTonal and newGalleryBody linked together? I'm just thinking in terms of someone coming to this fresh, they might not realise they are linked.

Thats fair. I will look first to seeing I can get rid of immersiveGalleryHeadTonal, and using the immersiveHeader.

case _ => NotFound
}
}

val HTTPS = OptInFeature("https_opt_in")
val Header = OptInFeature("new_header_opt_in")
val gallery = OptInFeature("gallery_redesign_opt_in")
Copy link
Member

@johnduffell johnduffell Apr 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just be careful about splitting the cache too much, otherwise the backend has to serve the same content twice

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its true, but we need to be able to test the value of this before we roll it out to everyone.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will you incorporate opting in into the a/b test somehow? otherwise it seems like opting in won't give you the new gallery :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean in fastly? I have branch I pushed up waiting to go! Just want to get this out before I make another PR. If that isn't what you mean, come talk to me? Not sure I follow.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This was discussed in person and the fastly change that makes this possible has already been made in a separate PR ready to go :)

@NataliaLKB NataliaLKB force-pushed the gallery-redesign branch 2 times, most recently from fde0481 to 56fff0f Compare April 19, 2016 09:36
Map("content--advertisement-feature" -> gallery.commercial.isAdvertisementFeature,
"paid-content--advertisement-feature" -> gallery.commercial.isAdvertisementFeature
),
"content", "content--media", "content--gallery", "tonal", "new-gallery", "content--immersive", s"tonal--${toneClass(gallery)}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need content--immersive? Seems to me like it just creates more work for us as we need to override its styles later on.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a note, Olly has separated this out into content--immersive for shared styles and content--immersive-article only used for immersive articles

@paperboyo
Copy link
Contributor

Oh, apart from already cited #6144 it might be prudent to add #12215 & (at least half of) #12216 to the grand plan. There is also #9957, but my personal opinion is that currently zooming in is very broken on mobile, because it zooms in both the image and the UI (including captions, up to a point of no return). If we can’t make it so that only the image zooms in and the Lightbox’s UI stays put, there is not much point in having it at all, so no point extending it (“fixing”) for iOS...

@@ -9,7 +9,7 @@
@fragments.newHeader()
} else {
<header id="header"
class="l-header u-cf @if(page.metadata.hasSlimHeader) {l-header--is-slim l-header--no-navigation} js-header"
class="l-header u-cf @if(page.metadata.hasSlimHeader) {l-header--is-slim l-header--no-navigation} @if(mvt.ABGalleryRedesignVariant.isParticipating && page.metadata.contentType.toLowerCase == "gallery"){l-header--is-slim l-header--no-navigation l-header--new-gallery} js-header"
Copy link
Contributor

@desbo desbo Apr 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to avoid repetition of mvt.ABGalleryRedesignVariant.isParticipating && page.metadata.contentType.toLowerCase == "gallery", you might want to move it to a method inside the test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed this to shouldShow method which includes the check of whether you are on a gallery or not.

@NataliaLKB
Copy link
Contributor Author

@desbo @sndrs would one of you be able to give another look? I believe all the comments have been addressed.


// Overwriting media tone header so that you can see the image instead
.tonal__header {
background-color: rgb(0, 0, 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't have any other rgb colours in the codebase. for the sake of consistency, should they be #000000? they'll work fine so it's not a blocker.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, actually changing them to $multimedia-support-5

@sndrs
Copy link
Member

sndrs commented Apr 26, 2016

👍 do it!

23c2931e00000578-0-image-m-33_1417770875109

@NataliaLKB NataliaLKB merged commit 113bb01 into master Apr 26, 2016
@NataliaLKB NataliaLKB deleted the gallery-redesign branch April 26, 2016 14:50
@johnduffell
Copy link
Member

johnduffell commented Apr 26, 2016

haha @sndrs very appropriate!

@dominickendrick
Copy link
Contributor

🚀 🎸 📷

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.

10 participants