Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions css/components/search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@
margin-left: 5px;
margin-bottom: 1rem !important;
}

.list-item__anchor:hover {
border: none !important;
}
}

// Short viewports (keyboard up): reclaim fixed chrome so the result list keeps a usable
Expand Down
4 changes: 4 additions & 0 deletions css/layouts/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,10 @@ header {
.header-menu__content {
width: 350px !important;
}

button {
background-color: transparent !important;
}
}
}
}
Expand Down
27 changes: 27 additions & 0 deletions src/nmcfiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,39 @@ function setupUploadButtonFix(): void {
observer.observe(document.body, { childList: true, subtree: true })
}

/**
* Move Files settings from the fixed footer into the main navigation list.
*/
function setupFilesSettingsNavigationPosition(): void {
const move = (): void => {
const settingsItem = document.querySelector<HTMLElement>('[data-cy-files-navigation-settings-button]')
const deletedFilesItem = document.querySelector<HTMLElement>('[data-cy-files-navigation-item="trashbin"]')
const navigationList = deletedFilesItem?.closest('ul.app-navigation-list')

if (!settingsItem || !deletedFilesItem || !navigationList) return
if (settingsItem.parentElement === navigationList && deletedFilesItem.nextElementSibling === settingsItem) return

deletedFilesItem.after(settingsItem)
}

move()

const observer = new MutationObserver(move)
observer.observe(document.body, { childList: true, subtree: true })
}

if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', setupUploadButtonFix)
} else {
setupUploadButtonFix()
}

if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', setupFilesSettingsNavigationPosition)
} else {
setupFilesSettingsNavigationPosition()
}

/**
* Move the text editor link bubble tooltip to document.body to escape
* the CSS stacking context and appear above the app navigation.
Expand Down
Loading