r/cssnews • • Jun 22 '17

DOM Change: Posts

Today we deployed a DOM change that affects posts. We added a wrapping div with the class name top-matter to posts.

<div class="top-matter">
    <p class="title>
        <a />
    </p>
    <!-- existing post dom -->
</div>

I'd also like to apologize for not releasing this information until after the feature was deployed. We try our best to notify the mods ahead of time regarding changes like these, we will try harder in the future.

edit: The commit that contained this change was reverted due to an issue with ads on Firefox. Therefore, this is no longer valid. We will update this post when it is redeployed out.

edit 2: This change will be getting deployed again on Monday (6/26) morning.

edit 3: This has been redeployed back out.

18 Upvotes

24 comments sorted by

8

u/kwwxis Jun 22 '17

FYI css mods: looks like this change breaks RES - adds an extra expando button. The RES team is already aware of the issue.

7

u/d3fect Jun 22 '17

Yep, I believe a fix is incoming shortly for RES.

3

u/aladyjewel Jun 22 '17

Yepperoo!

Technical detail: RES fails to find (and remove) Reddit's expando button. The patch improves RES finding the button, so all the new expando bugs will be fixed.

1

u/cleroth Jun 23 '17 edited Jun 15 '26

This content was anonymized and mass deleted with Redact

1

u/MajorParadox Jun 23 '17

Random question: Would this change have stopped a hover zoom extension from working on reddit uploaded images? It started working again, and I see now that this change was reverted, so thought it might be likely.

Side note: I still find it weird the link to a reddit image is the comment when the link to any image hosted elsewhere is the image. To this day, I still copy/paste cute animal gifs to share in slack and realize I copied the comments link, have to go back, expand the image, and copy the link from there.

2

u/xfile345 Jun 23 '17

Would this change have stopped a hover zoom extension from working on reddit uploaded images?

I think Hover Zoom doesn't work with reddit-uploaded images because the link in the post title doesn't link to an image at all, but just links to the comment page of that post, so there's no picture for the browser extension to load. This change shouldn't have any effect on whether or not Hover Zoom works.

Hover Zoom should work while hovering on the title within a comment page, but it doesn't appear to be designed to work on any listing page like /new or /top or a front page due to the way Reddit links photos uploaded directly to Reddit.

1

u/MajorParadox Jun 23 '17

But it does work for me usually on a list page if I hover over the title which has a link to the comments. Only it stopped working yesterday and thought this change might be the cause.

Either way, I don't really understand why the title acts like a self post.

→ More replies (2)

1

u/Maltroth Jun 27 '17

Didn't even know that subreddit existed, had to search the new class reddit-wide to finally find this post.

Thought I was going crazy with the deploys/reverts.

1

u/LackingAGoodName Jun 23 '17

If anybody has any issues with Naut after this change please let me know :)

0

u/RT-Pickred Jun 22 '17

Pretty cool news.

5

u/[deleted] Jun 22 '17

7

u/kwwxis Jun 22 '17 edited Jun 22 '17

A web page is basically made up of a bunch of boxes within boxes.

The boxes that make up the post title, the "submit X minutes ago by Y" text, the expando button, and the "5 comments source share ..." buttons were previously stored in a box called the "entry" box.

But now those boxes are stored within a box called the "top-matter" box. And that "top-matter" box is stored within the "entry" box instead.

Before :   entry -> [post title and company]
After  :   entry -> top-matter -> [post title and company]

CSS and JavaScript targets specific boxes to make pretty and do stuff to based on the name and location of these boxes. But the post title, expando button, etc. are no longer in the box that RES expects them to be in! So things are acting up.

Hope that makes sense.

3

u/Overlord_Odin Jun 22 '17

Ok, but why is that an improvement?

→ More replies (5)