Merge pull request #34383 from overleaf/em-fix-new-project-dropdown-alignment

Fix "New project" dropdown shifting to viewport edge in library layout

GitOrigin-RevId: f6b8af3e4d15828847ff69423a1c475efd2e32a9
This commit is contained in:
Eric Mc Sween
2026-06-09 08:07:23 +00:00
committed by Copybot
parent 85dafd4931
commit ad9da31252
2 changed files with 5 additions and 0 deletions
@@ -17,6 +17,7 @@ import {
DropdownMenu,
DropdownToggle,
} from '@/shared/components/dropdown/dropdown-menu'
import type { DropdownProps } from '@/shared/components/types/dropdown-menu-props'
import { useSendProjectListMB } from '@/features/project-list/components/project-list-events'
import type { PortalTemplate } from '../../../../../types/portal-template'
import { useFeatureFlag } from '@/shared/context/split-test-context'
@@ -45,6 +46,7 @@ type NewProjectButtonProps = {
className?: string
trackingKey?: string
showAddAffiliationWidget?: boolean
align?: DropdownProps['align']
}
function NewProjectButton({
@@ -53,6 +55,7 @@ function NewProjectButton({
className,
trackingKey,
showAddAffiliationWidget,
align,
}: NewProjectButtonProps) {
const { t } = useTranslation()
const { templateLinks } = getMeta('ol-ExposedSettings')
@@ -174,6 +177,7 @@ function NewProjectButton({
return (
<>
<Dropdown
align={align}
className={classnames('new-project-dropdown', className)}
onSelect={handleMainButtonClick}
onToggle={nextShow => {
@@ -137,6 +137,7 @@ export function ProjectListDsNav() {
<NewProjectButton
id="new-project-button-projects-table"
showAddAffiliationWidget
align="end"
/>
</OLCol>
)}