Fix dropdown menu positions when scrolling (#22916)
* Update react-overlays to latest version * Fix breaking changes in dropdown menus * Use react-overlays built-in arrow positioning feature * Re-implemented `.dropdown-menu__arrow` to have a defined width and height to improve positioning * Moved wrapping div (`.dropdown-menu` from `DropdownMenu` to `Dropdown`) * Wrap button in a span to solve issue with ref * Temporarily remove animations * Fix breaking changes in emoji picker * Wrap EmojiPickerMenu in a div where react-overlays’ ref is added * Fix breaking changes in language dropdown * Fix breaking changes in privacy dropdown * Fix breaking changes in search form * Add animations back using `@keyframes` * Fix arrow color in light theme * Fix linting issue * Remove unused `mounted` state * Remove `placement` state from components and redux And remove the placement state from props of the menu components. * Remove abolution position to fix flip issue * Remove z-index to fix modals and overlay positions * Fix lint issues * Set placement in privacy and language components Copy the placement state into the `PrivacyDropdown` and `LanguageDropdown` components, to apply correct styling to the buttons depending on which placement the Overlay has. * Move `placement` state to correct component
Showing
- app/javascript/mastodon/actions/dropdown_menu.js 2 additions, 2 deletionsapp/javascript/mastodon/actions/dropdown_menu.js
- app/javascript/mastodon/components/dropdown_menu.js 40 additions, 62 deletionsapp/javascript/mastodon/components/dropdown_menu.js
- app/javascript/mastodon/components/edited_timestamp/containers/dropdown_menu_container.js 2 additions, 3 deletions...ts/edited_timestamp/containers/dropdown_menu_container.js
- app/javascript/mastodon/containers/dropdown_menu_container.js 2 additions, 3 deletions...javascript/mastodon/containers/dropdown_menu_container.js
- app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js 19 additions, 20 deletions...odon/features/compose/components/emoji_picker_dropdown.js
- app/javascript/mastodon/features/compose/components/language_dropdown.js 41 additions, 40 deletions...mastodon/features/compose/components/language_dropdown.js
- app/javascript/mastodon/features/compose/components/privacy_dropdown.js 42 additions, 43 deletions.../mastodon/features/compose/components/privacy_dropdown.js
- app/javascript/mastodon/features/compose/components/search.js 24 additions, 27 deletions...javascript/mastodon/features/compose/components/search.js
- app/javascript/mastodon/reducers/dropdown_menu.js 2 additions, 2 deletionsapp/javascript/mastodon/reducers/dropdown_menu.js
- app/javascript/styles/mastodon-light/diff.scss 2 additions, 16 deletionsapp/javascript/styles/mastodon-light/diff.scss
- app/javascript/styles/mastodon/components.scss 63 additions, 24 deletionsapp/javascript/styles/mastodon/components.scss
- package.json 1 addition, 1 deletionpackage.json
- yarn.lock 66 additions, 33 deletionsyarn.lock
... | ... | @@ -98,7 +98,7 @@ |
"react-intl": "^2.9.0", | ||
"react-motion": "^0.5.2", | ||
"react-notification": "^6.8.5", | ||
"react-overlays": "^0.9.3", | ||
"react-overlays": "^5.2.1", | ||
"react-redux": "^7.2.9", | ||
"react-redux-loading-bar": "^5.0.4", | ||
"react-router-dom": "^4.1.1", | ||
... | ... |
Please register or sign in to comment