Skip to content

Restore toggle-files-button#4559

Merged
fregante merged 5 commits intorefined-github:mainfrom
cheap-glitch:fix-toggle-files-button
Jul 16, 2021
Merged

Restore toggle-files-button#4559
fregante merged 5 commits intorefined-github:mainfrom
cheap-glitch:fix-toggle-files-button

Conversation

@cheap-glitch
Copy link
Contributor

Fixes #4547

Test URLs

Screenshot

image


function addButton(): void {
const filesHeader = select('.Box-header--blue .Details > :last-child > ul');
const filesHeader = select('.Box-header .Details > :last-child > ul');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sadly I don't think there's much we can do about this brittle selector.

  • replace .Box-header with .hx_commit-tease (it seems to be a unique class name on the relevant pages)
  • use the select + closest strategy, maybe with [title^="View all commits by"] to reach the .Details directly

Copy link
Member

Choose a reason for hiding this comment

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

.octicon-history?

@cheap-glitch cheap-glitch marked this pull request as ready for review July 12, 2021 08:26
@fregante fregante changed the title Fix selector in toggle-files-button Restore toggle-files-button Jul 16, 2021
@fregante fregante merged commit afa8da1 into refined-github:main Jul 16, 2021
@cheap-glitch cheap-glitch deleted the fix-toggle-files-button branch July 16, 2021 07:50
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.

The button for toggle-files-button doesn't show up

3 participants