Skip to content
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

Avoid misplacement of profile-gists-link #6251

Merged
merged 1 commit into from
Feb 1, 2023

Conversation

fregante
Copy link
Member


const count = await getGistCount(user.name);
if (count > 0) {
link.append(<span className="Counter">{count}</span>);
}
}

async function init(signal: AbortSignal): Promise<void> {
observe('nav[aria-label="User profile"]', appendTab, {signal});
Copy link
Member Author

Choose a reason for hiding this comment

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

Safer selector

);
// There are two UnderlineNav items (responsive…) that point to the same dropdown
const overflowNav = select('.js-responsive-underlinenav .dropdown-menu ul')!;
if (!select.exists('[data-rgh-label="Gists"]', overflowNav)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Avoids this issue:

Screenshot 23

@fregante fregante added the bug label Jan 30, 2023
@fregante fregante merged commit 97efeef into main Feb 1, 2023
@fregante fregante deleted the profile-gist-link-duplicates branch February 1, 2023 05:25
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.

profile-gists-link appears in projects navigation on profile
1 participant