-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Make releases-tab
non dependent of more-dropdown
#3654
Make releases-tab
non dependent of more-dropdown
#3654
Conversation
The dropdown is native, we’re not creating it. Perhaps the only problem is that there’s no native separator in there. |
source/features/releases-tab.tsx
Outdated
'data-menu-item': 'rgh-releases-item' | ||
}) | ||
); | ||
const moreDropdown = select('.dropdown-divider', repoNavigationBar); |
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.
Actually we should just match the logic on line 85, which simply appends it. We only need to slightly modify because we have a divider.
Thankfully we have an helper function that does this exactly. I think the only change needed is:
const moreDropdown = select('.dropdown-divider', repoNavigationBar); | |
appendBefore( | |
select('.js-responsive-underlinenav .dropdown-menu ul'), | |
'.dropdown-divider', // Won't exist if `more-dropdown` is disabled | |
createDropdownItem('Releases', `/${repoUrl}/releases`, { | |
'data-menu-item': 'rgh-releases-item' | |
}) | |
); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
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.
Works perfectly!
…led" This reverts commit d9e74ae.
Co-Authored-By: Fregante <opensource@bfred.it>
PR title needs update then it’s ok if it works |
release-tab
to the more-dropdown
if its enabledrelease-tab
non dependent of more-dropdown
How is it now? |
release-tab
non dependent of more-dropdown
releases-tab
non dependent of more-dropdown
LINKED ISSUES:
Resolves
Release-tab
throws an error ifmore-dropdown
is turned off #3652TEST URLS:
None
SCREENSHOT:
None