`conversation-activity-filter` - Fix sticky header and mobile alignment by digvijay-555 · Pull Request #10228 · refined-github/refined-github · GitHub
Skip to content

conversation-activity-filter - Fix sticky header and mobile alignment - #10228

Draft
digvijay-555 wants to merge 1 commit into
refined-github:mainfrom
digvijay-555:fix-activity-filter-header-alignment
Draft

digvijay-555 wants to merge 1 commit into
refined-github:mainfrom
digvijay-555:fix-activity-filter-header-alignment

Conversation

@digvijay-555

Copy link
Copy Markdown
Contributor

Follow-up to #10187

Description

Fixes edge cases discovered after #10187:

  1. Sticky Header: Added observer coverage for prTitleArea and sticky header variants. Applied flex truncation (min-width: 0, max-width: 18vw for branch names) to ensure long bylines do not push the <action-menu> off-screen or behind side panels on reduced viewport widths. 2. Mobile & Narrow Issue Layout: Targets [class*="menuActionsContainer"] so the button renders in mobile context actions as well as desktop, keeping the primary button (New issue) at the start ([New issue] [👁 ▾] [📋]).
  2. PR Narrow Layout: Preserves natural left-aligned [Merge] [Code] buttons with the filter button on their right.

Test URLs

Screenshots

Desktop Sticky header PR view

image

Action button on right side of buttons

image

@fregante

fregante commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

@digvijay-555
digvijay-555 force-pushed the fix-activity-filter-header-alignment branch from 70ef2d6 to e022204 Compare October 15, 2026 18:29
@github-actions

Copy link
Copy Markdown

Please don't force-push to this PR, it makes it harder to see what changed since the last review.

We merge commits rather than squash, so we care more about reviewability than a clean history. Feel free to push dirty commits.

@digvijay-555

digvijay-555 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

This is WAY too much code. I just want a couple of extra rules, not a whole app worth of CSS. It just needs to change the order, keep it simple

You're right, I over-complicated it trying to solve truncation edge cases on narrow widths.

I've stripped all of that out and simplified it to just a couple of simple order and alignment rules as requested:

  • Uses order: 2 and margin-left: auto in the PR sticky header so it sits cleanly after the title.
  • Uses order: -1 on narrow screens so primary buttons maintain their natural order.

@digvijay-555
digvijay-555 marked this pull request as ready for review October 16, 2026 19:09
/* Align activity filter after title in the PR sticky header */
[class*='StickyPullRequestHeader'] [data-component='TitleArea'] > action-menu,
[class*='prHeader'] [data-component='TitleArea'] > action-menu,
[class*='prTitleArea'] > action-menu {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What are these for? From what I can tell this is not needed

}

/* On narrow layouts, keep primary buttons at the start */
@media (max-width: 1012px) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

From my tests this value should be 1075px

order: -1;
}

[data-component='PH_Actions'] > action-menu {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is this?

mount(ConversationActivityFilter, {
target: anchor,
anchor: anchor.firstElementChild!,
anchor: anchor.firstElementChild ?? undefined,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Unnecessary change

Comment on lines +147 to +150
':is([data-component="PageHeader"][data-has-nav], [class*="PageHeader"][data-has-nav]) [data-component="PH_Actions"]',
// PR view (sticky header)
'[class*="prTitleArea"]',
':is([class*="StickyPullRequestHeader"], [class*="prHeader"]) [data-component="TitleArea"]',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do not use :is() in here. Each of these are already selectors. Also why are these so many different selectors? There are like 3 for sticky header and 2 for the main one. I don’t think we need more than 1 and 1

@fregante

fregante commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

@fregante
fregante marked this pull request as draft October 20, 2026 07:55

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants