-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix releases-tab
and bugs-tab
#4169
Fix releases-tab
and bugs-tab
#4169
Conversation
releases-tab
and bugs-tabs
releases-tab
and bugs-tab
source/features/bugs-tab.tsx
Outdated
@@ -87,7 +86,7 @@ async function init(): Promise<void | false> { | |||
bugsCounter.title = ''; | |||
|
|||
// Update Bugs’ link | |||
new SearchQuery(bugsLink).add('label:bug'); | |||
new SearchQuery(bugsTab as HTMLAnchorElement).add('label:bug'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you drop this type cast once you change the issuesTab
selector to a.UnderlineNav-item[data-hotkey="g i"]
(i.e. including the tag name a
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought so too, but unfortunately it seems that cloneNode
loses the element type: microsoft/TypeScript#283
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the workaround added in #2670 doesn't work in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it does actually, I just forgot the return value of elementReady()
needed to be coerced. My bad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There’s an issue open on the element-ready repo to implement the selector parser for types, if anyone is interested. Relatively easy PR for that
Looks like it's back to being a list once again xD |
Test URLs
Any repo page
Screenshot
n/a
GitHub changed the layout of the navbar, now it's no longer a list but instead a simple collection of anchor elements. The anchors act both as links and as tabs, so they bear all the meta attributes directly.