Skip to content

sticky-sidebar - Restore feature#8979

Merged
SunsetTechuila merged 14 commits into
mainfrom
sticky-sidebar
Mar 11, 2026
Merged

sticky-sidebar - Restore feature#8979
SunsetTechuila merged 14 commits into
mainfrom
sticky-sidebar

Conversation

@SunsetTechuila

@SunsetTechuila SunsetTechuila commented Feb 14, 2026

Copy link
Copy Markdown
Contributor

restores feature on PR (#8946) and repo root pages + cleanup

Test URLs

https://github.com/refined-github/refined-github

#755

Screenshot

image image

@@ -27,26 +20,15 @@ Exclusively use simple sums and use `0px` instead of `0`
/* It needs to be on the same element as above for calc() to work */
--rgh-sticky-notification-header-height: 69px;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We can use --base-sticky-header-height GH variable. sticky-comment-header already does

[id^='my-forks-menu'] {
z-index: initial !important; /* This affects the social buttons. It seems to have no effect but it constantly causes trouble with other features. */
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Outdated

Comment on lines -45 to -48
/* Hides the last divider (on pull requests) to avoid https://user-images.githubusercontent.com/10238474/62282128-af6fb980-b457-11e9-8b18-c29687b88da1.gif */
.rgh-sticky-sidebar + .border-top {
display: none;
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Outdated

Comment on lines -31 to -34
/* required to make `sticky` work for the issue Sidebar */
.rgh-sticky-sidebar-container {
display: unset !important;
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Outdated

Comment thread source/features/sticky-sidebar.tsx Outdated
'.Layout-sidebar #partial-discussion-sidebar', // Old `isConversation`
'div[data-testid="issue-viewer-metadata-pane"]', // `isConversation`
'#discussion_bucket #partial-discussion-sidebar', // `isDiscussion`
'div[data-testid="issue-viewer-metadata-pane"]', // Issue `isConversation`. TODO: Remove after March 2026

@SunsetTechuila SunsetTechuila Feb 14, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Issue sidebar is natively sticky for at least 5 months: #8696

@SunsetTechuila SunsetTechuila marked this pull request as draft February 26, 2026 01:50
@SunsetTechuila SunsetTechuila changed the title sticky-sidebar - Restore on PR conversation page sticky-sidebar - Restore feature Feb 26, 2026
@SunsetTechuila SunsetTechuila marked this pull request as ready for review February 26, 2026 02:02
@SunsetTechuila

Copy link
Copy Markdown
Contributor Author

@fregante ready to be reviewed

@fregante

fregante commented Mar 1, 2026

Copy link
Copy Markdown
Member

This is one of those I'm not sure about since it's toggling a native class. Why that change? Does the sidebar stick natively or not? I'm confused there

@SunsetTechuila

SunsetTechuila commented Mar 1, 2026

Copy link
Copy Markdown
Contributor Author

it's toggling a native class

is-stuck doesn't do anything by itself

Does the sidebar stick natively or not?

It doesn't

@fregante

fregante commented Mar 1, 2026

Copy link
Copy Markdown
Member

Your previous comment suggests that it's natively enabled on issues and the includes still targets issues. That should be updated too.

Also again it's not clear why you switched from the rgh class to a non rgh class. Why? Can that change be reverted?

@SunsetTechuila

SunsetTechuila commented Mar 1, 2026

Copy link
Copy Markdown
Contributor Author

it's natively enabled on issues and the includes still targets issues.

That's right

That should be updated too.

What should be updated, and in what way?

Also again it's not clear why you switched from the rgh class to a non rgh class. Why?

For me, adding the rgh-sticky-sidebar class to the sidebar and toggling is-stuck makes more sense than adding rgh-sticky-sidebar-container and toggling rgh-sticky-sidebar. Don't you agree?

@fregante

fregante commented Mar 2, 2026

Copy link
Copy Markdown
Member

What should be updated, and in what way?

The feature shouldn't run on issues.

Don't you agree?

No. If you use GitHub's classes it's because they do something. If the behavior is entirely controlled by us, then we use rgh- classes.

It's true that technically we're replicating GitHub's behavior, but especially for that reason we should not reuse their classes in order to avoid future conflicts.

@SunsetTechuila

SunsetTechuila commented Mar 3, 2026

Copy link
Copy Markdown
Contributor Author

I expect sidebars to be rewritten soon. Let's see if they become natively sticky. If they do, I'll close this PR; if not, I'll update it

@SunsetTechuila SunsetTechuila marked this pull request as draft March 4, 2026 05:55
@SunsetTechuila SunsetTechuila marked this pull request as ready for review March 11, 2026 14:21
@SunsetTechuila

Copy link
Copy Markdown
Contributor Author

I expect sidebars to be rewritten soon.

It seems I overestimated their development speed

@SunsetTechuila SunsetTechuila merged commit 99d7d5f into main Mar 11, 2026
8 checks passed
@SunsetTechuila SunsetTechuila deleted the sticky-sidebar branch March 11, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants