Make WordPress Core

Opened 4 years ago

Last modified 2 months ago

#50446 new defect (bug)

Twenty Fifteen: Regression in updated sticky sidebar code

Reported by: mechter's profile mechter Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.4.2
Component: Bundled Theme Keywords: dev-feedback
Focuses: Cc:

Description

Hi all,

the behavior of the sticky scrollbar in the Twenty Fifteen default theme changed unexpectedly upon updating the theme to version 2.6.

Steps to reproduce: Create a page where both the sidebar and the content are long enough (relative to the window height) to cause scrolling, the content being longer than the sidebar. Scroll down, past the point where the sidebar stops scrolling. Scroll back up.

Behavior up to 2.5: The sidebar immediately starts scrolling up.

Behavior in 2.6: The sidebar remains fixed until you scroll back up beyond the point where it initially stopped when scrolling down.

The original behavior seems to allow for more efficient navigation, and since this change was not mentioned in the changelog for version 2.6, I believe this is a bug.

This regression seems to have been introduced in #46308 and previously discussed in #37536. @DvanKooten, @whyisjake, please have a look?

Change History (6)

#1 @mechter
4 years ago

Just to clarify: It's not the regression that's been discussed in #37536, but the proposed change that led to the regression. I couldn't find an edit button, hence this comment.

#2 @SergeyBiryukov
4 years ago

  • Component changed from Themes to Bundled Theme

#3 @karmatosed
3 months ago

  • Keywords close reporter-feedback added

I am tempted to close this as the change has now been sat for a while. I realize it originally was an issue for you @mechter but what is your feelings now if any on reflection? My instinct is that now this change has for many become their experience and I am reluctant to change it again.

For now, I am going to add the recommendation to close but that gives space for feedback and reconsidering. Thank you.

#4 @mechter
2 months ago

  • Keywords close reporter-feedback removed

Hi @karmatosed. If I understand correctly, you would like to close this ticket because by now everyone has gotten used to the new behavior. That seems to imply it's an issue of personal preference or getting used to a new way of doing things, which is not the case.

Version 2.6 of the Twenty Fifteen theme introduced a regression that worsens user experience. When sidebar and content are longer than the height of the viewport (which would be common for blogs) users who have read an article now have to scroll all the way up again to access the top sidebar elements (which typically include the main navigation). Since this defeats the purpose of having a sticky sidebar in the first place, I would argue that even today, four years later, anyone using Twenty Fifteen would still benefit from having this bug fixed.

I have removed the close keyword just so that the ticket won't get pruned accidentally. If I have not convinced you that this is a valid bug and still relevant, perhaps a second opinion would be helpful. In any event, I have done my part and said my piece, so if you all feel that this bug is not worth fixing, go ahead and close as wontfix.

PS: It seems the ID 46308 in my original post links to an unrelated issue with the same ID rather than the changeset. Here's the correct link to see the changes that introduced the regression: https://core.trac.wordpress.org/changeset/46308/

#5 @karmatosed
2 months ago

  • Keywords dev-feedback added

@mechter thank you for your insights. My considerations were the following:

  • This hasn't been reported by anyone else: which absolutely might just mean people are accepting the issue.
  • This has now become the expected behavior due to the amount of time.

Now, I am absolutely willing to have a longer discussion on if this is desirable, so let's ensure that happens by adding a keyword to get more thoughts on this for you. My recommendation stays the same, but that absolutely is just one opinion and this is now about getting a wider range of those for this case.

#6 @mechter
2 months ago

@karmatosed Okay, so only one person noticed this and cared enough to report it. That doesn't seem so unusual to me. It's certainly enough to warrant taking a look.

Regarding your second consideration, I suggest you do just that: Take a look for yourself, so you can see what it's actually like. Please visit the demo site at https://twentyfifteendemo.wordpress.com using a JavaScript-enabled browser. Make the browser window wide enough that you see the sidebar on the left, and reduce the height of the window so that you can see only the top three navigation menu items. This is to simulate a long sidebar. Notice the first nav item is called "About Twenty Fifteen". Scroll down a bit. Notice the sidebar scrolling together with the content. Scroll down further. Notice how at some point the sidebar becomes sticky, giving you quick access to its contents as you continue to scroll down. Pretend you're reading a long article. When you have scrolled all the way to the bottom of the page, imagine you wanted to learn more about Twenty Fifteen, and you recall the "About Twenty Fifteen" link from before. Scroll up a little. Before the change in question, sidebar and content would have scrolled up together until the top of the sidebar was reached, at which point it would have become sticky again. This would have allowed you to access the navigation item you are looking for right about now. As you keep scrolling all the way to the top of the page, ask yourself whether anyone could actually miss having to do this, even if they have come to expect it by now.

As for further discussion, I hope that, after the practical demonstration above, we are now on the same page as to the validity of the bug and the relevance of fixing it even today. In any case, I'm grateful you responded to the ticket, as it has gotten a bit stale. Perhaps our discussion will catch the attention of someone with the knowledge, time, and motivation to create a patch. The tricky part is fixing the bug without accidentally introducing another regression in the process. The people who introduced the bug had reasons to make changes that a new patch should probably take into consideration. I have mentioned the authors of those changes in the original report, hoping they'd be notified and quickly address the issue, but they haven't responded yet. In the spirit of getting a wider range of opinions, I'll mention them again: @DvanKooten, @whyisjake. Also, would you like to share your thoughts on this, @iamtakashi? Having originally designed the Twenty Fifteen theme and currently working for Automattic would seem to put you in a good position to fix this bug.

Note: See TracTickets for help on using tickets.