Refined-github: The tags dropdown seems to align weirdly

Created on 21 Apr 2019  Â·  13Comments  Â·  Source: sindresorhus/refined-github

The tags dropdown seems to align weirdly...

image

_Originally posted by @jerone in https://github.com/sindresorhus/refined-github/pull/1896#issuecomment-485262710_

That's due to https://github.com/sindresorhus/refined-github/commit/ca8b1e13f78c50a5a3283982fba41e8be49e12c0 and I don't know how to fix it since they dropped the .issues-listing class I was relying on.

PR welcome

bug help wanted

All 13 comments

@bfred-it I'll look into it.

I found a solution just now

That's great. What's your approach?

Actually it's just this

/* For `widen-search-field`: Move extra buttons to the right on Releases */
.subnav-links {
    margin-right: auto;
}

Which works for one:

But it would require even more CSS if there are 2:

So a proper solution for widen-search-field would be appreciated (i.e. a selector alternative to .issues-listing)

I kind of did the same but using flex-grow: 1.

.subnav-links {
    flex-grow: 1;
}

.subnav-links + .float-right {
    order: 1;
}

Screen Shot 2019-04-22 at 12 13 42 AM

That works too. Send a PR?

On it...

@bfred-it Should I drop your change? The build is failing because of the duplicate selector.

Didn't mean to spam with commits but don't know something weird happened and I had to force-push and merge again.

For the record, the distance between the buttons still seems to be messed up in several ways.

With no API key entered:

Screenshot of the "Draft a new release" button snuggling up to the "Tags" button on the left


With API key entered:

Screenshot of the "Draft a new release" button snuggling up to the "Select tag" button on the right

Confirmed. This seems only to happen when you have admin rights to the repo, hence the "Draft a new release" button.

Yep. The first screenshot is due to the expanded search bar — the parent element is now a flex container and therefore the floats collapse. This was fixed with a margin-left: auto on the right part, but that's only included when the Select Tag feature is enabled (i.e. when an API key is entered).

The collapsing in the second screenshot was handled in the tag selection PR, the "Select Tag" button actually has a margin — but to the wrong side (right instead of left).

Should be easy to fix, I'll attach a PR if I can find the time to do so today.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

olso picture olso  Â·  3Comments

MilesBHuff picture MilesBHuff  Â·  3Comments

durka picture durka  Â·  3Comments

fregante picture fregante  Â·  3Comments

sindresorhus picture sindresorhus  Â·  3Comments