Skip to content

clean-pinned-issues - Native alignment#9313

Merged
fregante merged 4 commits into
mainfrom
clean-alignment
May 1, 2026
Merged

clean-pinned-issues - Native alignment#9313
fregante merged 4 commits into
mainfrom
clean-alignment

Conversation

@fregante
Copy link
Copy Markdown
Member

Follows #9284 (comment)

Test URLs

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

Native

Notice the ... top-aligned

Screenshot 1

#9284

Screenshot

This PR

Also notice the title not wrapping below the left-hand icon

pr

Further proposals

I'd go one step further and avoid wrapping the right-hand text Screenshot 2
or _always_ wrap it, but it looks weird sometimes Screenshot 3

@fregante fregante added the bug label Apr 30, 2026
@SunsetTechuila
Copy link
Copy Markdown
Member

SunsetTechuila commented Apr 30, 2026

Also notice the title not wrapping below the left-hand icon

This is a downgrade because the space is used far less efficiently

I'd go one step further and avoid wrapping the right-hand text

Issue title is more important than its metadata, so we absolutely shouldn't prefer wrapping it over the metadata. Especially considering that it cannot go under the metadata when wrapped

@SunsetTechuila
Copy link
Copy Markdown
Member

If you like the way native vertical issues look, then why not just make them always enabled? This will simplify the feature a lot

@SunsetTechuila
Copy link
Copy Markdown
Member

SunsetTechuila commented Apr 30, 2026

This could be the entire feature:

div[class^='IssueIndexPage-module__middlePaneGrid'] {
    container-type: inline-size;

    /* Element whose width is tracked */
    > div:not([class]) {
        max-width: 767px; /* Enable native vertical sorting */
    }
}

ul[aria-label="Drag and drop pinned issues list."] {
    flex-direction: column !important;
    width: 100cqw; /* Restore original width */
    row-gap: 0;
}

[class*="PinnedIssues-module__container"] {
    max-width: 100% !important;
    &:not(:only-child) {
        &:first-child {
            border-bottom-left-radius: 0;
            border-bottom-right-radius: 0;
        }
        &:not(:first-child, :last-child) {
            border-radius: 0;
            border-top-color: transparent;
        }
        &:last-child {
            border-top-color: transparent;
            border-top-left-radius: 0;
            border-top-right-radius: 0;
        }
    }
}

@fregante
Copy link
Copy Markdown
Member Author

This is a downgrade

Not an upgrade:

Screenshot

If you look around GitHub, the style is everywhere. This is currently in my viewport alone:

Screenshot 7 Screenshot 6 Screensntly ihot 5 Screenshot 4Screenshot 8 Screenshot 9 Small

It's so common even MDN has a page for it: https://developer.mozilla.org/en-US/docs/Web/CSS/How_to/Layout_cookbook/Media_objects

Issue title is more important than its metadata

Agreed, I was trying to find ways to make it look more consistent, but neither proposal is ideal.

Especially considering that it cannot go under the metadata when wrapped

I think it is possible via flex-wrap but the issue is that each row would wrap at different times, so it would look wonky with some dates on the top right, others on the bottom left.

If you like the way native vertical issues look

I only used it as an example of where the button should appear—which is also where it appears in several other GitHub components:

Screenshot 10

This could be the entire feature:

It does look good, but it's also twice as tall on desktop.

@fregante
Copy link
Copy Markdown
Member Author

This could be the entire feature:

It does look good, but it's also twice as tall on desktop.

This is the shortest I can make it by reducing some padding:

Screenshot 11

but it still looks more noisy and wider than:

Screenshot 12

@fregante
Copy link
Copy Markdown
Member Author

The pinned list style attempts to match the list below, which uses the same alignment:

Screenshot 15

@fregante fregante merged commit f153dea into main May 1, 2026
10 checks passed
@SunsetTechuila SunsetTechuila deleted the clean-alignment branch May 7, 2026 12:20
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