Skip to content

Restore toggle-files-button+repo-age in "Repository refresh"#3264

Merged
fregante merged 2 commits intorefined-github:masterfrom
FloEdelmann:restore-commit-tease
Jul 1, 2020
Merged

Restore toggle-files-button+repo-age in "Repository refresh"#3264
fregante merged 2 commits intorefined-github:masterfrom
FloEdelmann:restore-commit-tease

Conversation

@FloEdelmann
Copy link
Member

Follows #3187 and #3225, related to #3081. GitHub updated the design of the "latest commit" box in the "Repository refresh" beta, so our selectors broke.

Restore repo-age

Test URLs:

Make sure to clear the cache to test if the selectors work properly.

Restore toggle-files-button

Test URLs: see above

Screenshot_2020-06-22_23-29-51

@FloEdelmann FloEdelmann changed the title Restore "commit tease" selectors in "Repository refresh" beta Restore "commit tease" selectors in "Repository refresh" layout Jun 23, 2020
const commitInfo = await elementReady<HTMLAnchorElement | HTMLScriptElement>('.commit-tease a[href*="/commit/"], include-fragment.commit-tease');
const commitInfo = await elementReady<HTMLAnchorElement | HTMLScriptElement>([
// "Repository refresh" layout
'.Box-header--blue .hx_avatar_stack_commit + div a[href*="/commit/"]',
Copy link
Member

Choose a reason for hiding this comment

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

Can this selector be improved/shortened?

Copy link
Member Author

Choose a reason for hiding this comment

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

It could be shortened like this:

Suggested change
'.Box-header--blue .hx_avatar_stack_commit + div a[href*="/commit/"]',
'.Box-header--blue a[href*="/commit/"]',

But since .Box-header--blue is quite generic (and I don't know if it is used elsewhere), I opted for more specific selector.

@fregante fregante added the bug label Jul 1, 2020
@fregante fregante changed the title Restore "commit tease" selectors in "Repository refresh" layout Restore toggle-files-button and repo-age in "Repository refresh" layout Jul 1, 2020
@fregante fregante changed the title Restore toggle-files-button and repo-age in "Repository refresh" layout Restore toggle-files-button+repo-age in "Repository refresh" Jul 1, 2020
@fregante fregante merged commit 8765661 into refined-github:master Jul 1, 2020
@FloEdelmann FloEdelmann deleted the restore-commit-tease branch July 1, 2020 15:37
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