Making WordPress.org

Opened 10 years ago

Last modified 12 months ago

#1077 assigned defect (bug)

Fix anchors in the bbPress & BuddyPress Codex theme so that anchors are not behind the toolbar

Reported by: netweb's profile netweb Owned by:
Milestone: Priority: low
Component: buddypress.org Keywords: needs-patch
Cc:

Description

We should fix anchors in the Codex theme so that going to foo#bar puts bar at the top of the visible screen, rather than behind the toolbar

There's 3 suggested fixes for this mentioned in #BuddyPress on Slack:

https://wordpress.slack.com/archives/buddypress/p1433336799000531

Attachments (2)

1077.png (82.7 KB) - added by SergeyBiryukov 7 years ago.
1077.2.png (65.0 KB) - added by SergeyBiryukov 7 years ago.

Download all attachments as: .zip

Change History (19)

This ticket was mentioned in Slack in #buddypress by netweb. View the logs.


10 years ago

#2 @dd32
7 years ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 6370:

BuddyPress.org & bbPress.org: Add a CSS :target block to make anchors scroll to the correct position.
For example: https://codex.buddypress.org/participate-and-contribute/#test-report-bugs

Fixes #1077.

#3 follow-up: @dd32
7 years ago

  • Keywords needs-patch removed

Ended up using the solution from https://www.itsupportguides.com/knowledge-base/tech-tips-tricks/how-to-offset-anchor-tag-link-using-css/ which seems to work pretty well.

I applied it globally to the bb-base theme rather than just the codex, as the only pages which don't use the overlayed header I could find didn't seem negatively affected by it being global.

#4 @dd32
7 years ago

In 6371:

BuddyPress.org & bbPress.org: Bump the CSS versions for cache-bust following r6370.

See #1077.

#5 in reply to: ↑ 3 @SergeyBiryukov
7 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to dd32:

I applied it globally to the bb-base theme rather than just the codex, as the only pages which don't use the overlayed header I could find didn't seem negatively affected by it being global.

It does affect the forums in an unexpected way:

  1. Go to https://ru.wordpress.org/support/topic/помогите-найти-строку/#post-271548
  2. Try to select the text of the previous (one-line) post for quoting.
  3. The post cannot be selected, as it's covered by an invisible :target:before element.

Can we make that selector more specific, or the wporg-support theme should override it?

Last edited 7 years ago by SergeyBiryukov (previous) (diff)

@SergeyBiryukov
7 years ago

@SergeyBiryukov
7 years ago

#6 @SergeyBiryukov
7 years ago

This also causes an issue with creating bbPress and BuddyPress Trac tickets, as reported by @netweb:

Steps to reproduce:

Now if you try to click Preview again, or Create Ticket nothing happens.

See 1077.2.png.

#7 @netweb
7 years ago

Thanks for tracking this bug down and adding the Trac info Sergey :+1:

This ticket was mentioned in Slack in #meta-tracdev by sergey. View the logs.


7 years ago

This ticket was mentioned in Slack in #buddypress by djpaul. View the logs.


7 years ago

#10 @netweb
7 years ago

In 6412:

BuddyPress/bbPress: Revert [6370]

The [6370] commit had some unexpected consequences of adding invisible :target:before elements on the bb's Trac and support forums.

See #1077.

#11 @netweb
7 years ago

In 6413:

BuddyPress/bbPress: Bump the CSS version for cache-bust following [6412].

See #1077.

#12 @netweb
7 years ago

Once I've some time to fix my #meta environment I'll refresh a patch for this, for now, I've reverted [6370] in [6412]

#13 @dd32
7 years ago

  • Keywords needs-patch added
  • Priority changed from normal to low

#16 @dufresnesteven
5 years ago

Does it make sense to just address it for the toc-heading for now? We already have a target declaration we can tie into.

https://wordpress.org/support/wp-content/plugins/support-helphub/inc/table-of-contents-lite/assets/css/style.css?ver=4

/* Highlight current heading and adjust scroll position for fixed toolbar */
.toc-heading:target {
	border-left: 5px solid #0073aa;
	padding-left: 0.278rem;
	margin-left: -0.556rem;
}

#17 @dd32
12 months ago

  • Owner dd32 deleted
  • Status changed from reopened to assigned
Note: See TracTickets for help on using tickets.