about summary refs log tree commit diff
path: root/app/javascript/mastodon/components/dropdown_menu.js
AgeCommit message (Collapse)Author
2023-02-20Rename JSX files with proper `.jsx` extension (#23733)Renaud Chaput
2023-01-30Upgrade ESlint to v8 (#23305)Nick Schonning
2023-01-11Fix dropdown menu positions when scrolling (#22916)Peter Simonsson
* 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
2022-02-09Add edit history to web UI (#17390)Eugen Rochko
* Add edit history to web UI * Change history reducer to store items per status * Fix missing loading prop
2021-02-11Add dropdown for boost privacy in boost confirmation modal (#15704)Claire
* Various dropdown code quality fixes * Prepare support for privacy selection in boost modal * Add dropdown for boost privacy in boost confirmation modal
2020-11-05Bump detect-passive-events from 1.0.5 to 2.0.1 (#15003)dependabot[bot]
* Bump detect-passive-events from 1.0.5 to 2.0.1 Bumps [detect-passive-events](https://github.com/rafgraph/detect-passive-events) from 1.0.5 to 2.0.1. - [Release notes](https://github.com/rafgraph/detect-passive-events/releases) - [Commits](https://github.com/rafgraph/detect-passive-events/compare/v1.0.5...v2.0.1) Signed-off-by: dependabot[bot] <support@github.com> * Migrate to detect-passive-events v2 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2020-08-21Fix scrolling issues when closing some dropdown menus (#14606)ThibG
2020-04-28Fix page incorrectly scrolling when bringing up dropdown menus (#13574)ThibG
Fixes #13573 For some reason (I suspect this may be related to focusing the item before it got drown by the browser), Firefox scrolls to top when bringing up dropdown menus with pre-selected items. This commit uses the “preventScroll” option as, due to the placement behavior, the menu should be visible anyway and not trigger scrolling.
2020-04-21Fix and refactor keyboard navigation in dropdown menus (#13528)ThibG
Fixes #13527 - Fixes caught keyboard events being needlessly propagated - Let up/down arrows wrap around like the tab key does - Refactor common code
2019-10-24Add noopener and/or noreferrer (#12202)BSKY
2019-08-07Improve focus handling with dropdown menus (#11511)ThibG
- Focus first item when activated via keyboard - When the dropdown menu closes, give back the focus to the actual element which was focused prior to opening the menu
2019-08-06Improve dropdown menu keyboard navigation (#11491)ThibG
* Allow selecting menu items with the space bar in status dropdown menus * Fix modals opened by keyboard navigation being immediately closed * Fix menu items triggering modal actions * Add Tab trapping inside dropdown menu * Give focus back to last focused element when status dropdown menu closes
2019-07-19Added logout to dropdown menu (#11353)koyu
* Added logout to dropdown menu * Triggering build-and-test with empty commit as it seems it failed due to some internal failure * Looks fine, ready to review * Added changes from review * method can be null without any problems * Also target can be null
2018-09-13Only focus first element of dropdown menus if using keyboard (#8679)ThibG
* Only focus first item of dropdown if it was opened via keyboard * Improve keyboard VS mouse navigation of dropdown menus
2018-08-23Update state when opened dropdown is unmounted (fixes #8397) (#8398)ThibG
2018-08-19Make dropdown animations respect their placement (#8292)cpsdqs
* Make dropdown animations respect their placement Also fix the corner radius on the privacy dropdown button when using top placement * Fix code style issue
2018-05-04Dropdowns accessibility (#7318)ThibG
* Mark currently selected privacy setting in privacy dropdown * Prevent Enter keypresses from triggering dropdown display toggle twice * Give focus to first/selected item of dropdown menus * Implement keyboard navigation in privacy dropdown * Implement keyboard navigation in generic dropdown menus
2018-04-20Fix #6157: boosting own private toots (#7200)mayaeh
* Fix boosting own private toots. * Run yarn manage:translations and update Japanese translations.
2018-03-07Remove pointer events on the entire UI when a dropdown menu is open (#6648)Akihiko Odaki
* Remove pointer events on the entire UI when a dropdown menu is open This prevents operations to change the location of the menu such as scrolling. * Fix mistake from merge
2018-03-05Place dropdown menu top if it is closer to the bottom of the viewport (#6641)Akihiko Odaki
2017-11-25Rename ariaLabel property of Dropdown to title (#5813)Akihiko Odaki
DropdownMenu has ariaLabel property, but it is actually applied to title property of IconButton. Keep it consistent.
2017-10-16Add option to reduce motion (#5393)Nolan Lawson
* Add option to reduce motion * Use HOC to wrap all Motion calls * fix case-sensitive issue * Avoid updating too frequently * Get rid of unnecessary change to _simple_status.html.haml
2017-10-06Import only Spring/Motion from react-motion (#5236)Nolan Lawson
2017-10-06import only Overlay from react-overlays (#5235)Nolan Lawson
2017-09-24Dropdown triangles a bit nicer, smoother scrolling on touch (#5062)Eugen Rochko
2017-09-22Make dropdowns render into portal, expand animation (#5018)Eugen Rochko
* Make dropdowns render into portal, expand animation * Improve actions modal style
2017-07-29Improve accessibility (part 6) (#4435)Sorin Davidoi
* fix(status_action_bar): Use aria-pressed for reblog and favourite button * fix(column_back_button): Keyboard accessible * fix(status_content): Make focusable and accessible * fix(dropdown_menu): Use aria-expanded instead of aria-pressed * fix(emoji_picker_dropdown): Use aria-expanded instead of aria-hidden * feat(icon_button): Add aria-expanded * fix(privacy_dropdown): Use aria-expanded instead of aria-hidden
2017-07-28Improve accessibility (part 4) (#4408)Sorin Davidoi
* fix(dropdown_menu): Keyboard navigation * fix(icon_button): Add aria-pressed attribute * fix(privacy_dropdown): Make accessible * fix(emoji_picker_dropdown): Make accessible * fix(icon_button): Support tabIndex * fix(actions_modal): Remove icon from tab order * fix(dropdown_menu): Add role=group * fix(setting_toggle): Toggle via space key * fix(dropdown_menu): Remove redundant handling of Space key * fix(emoji_picker_dropdown): Remove redundant Space key handling * fix(privacy_dropdown): Remove redundant Space key handling * fix(status): Switch to article and add aria-posinset, aria-setsize * fix(status_list): Use role=feed and pass more ARIA props to Status * chore(eslint): jsx-a11y/role-supports-aria-props
2017-07-27fix(dropdown_menu): Open as modal on mobile (#4295)Sorin Davidoi
* fix(dropdown_menu): Open as modal on mobile * fix(dropdown_menu): Open modal on touch * fix(dropdown_menu): Show status * fix(dropdown_menu): Max dimensions and reduce padding * chore(dropdown_menu): Test new functionality * refactor: Use DropdownMenuContainer instead of DropdownMenu * feat(privacy_dropdown): Open as modal on touch devices * feat(modal_root): Do not load actions-modal async
2017-07-11Redesign the landing page, mount public timeline on it (#4122)Eugen Rochko
* Redesign the landing page, mount public timeline on it * Adjust the standalone mounted component to the lacking of router * Adjust auth layout pages to new design * Fix tests * Standalone public timeline polling every 5 seconds * Remove now obsolete translations * Add responsive design for new landing page * Address reviews * Add floating clouds behind frontpage form * Use access token from public page when available * Fix mentions and hashtags links, cursor on status content in standalone mode * Add footer link to source code * Fix errors on pages that don't embed the component, use classnames * Fix tests * Change anonymous autoPlayGif default to false * When gif autoplay is disabled, hover to play * Add option to hide the timeline preview * Slightly improve alt layout * Add elephant friend to new frontpage * Display "back to mastodon" in place of "login" when logged in on frontpage * Change polling time to 3s
2017-06-23Use Class and Property Decorators (#3730)Yamagishi Kazutoshi
ref https://tc39.github.io/proposal-decorators/
2017-06-23Remove unused variables (#3906)Yamagishi Kazutoshi
2017-06-20Upgrade React Router (#3677)Sorin Davidoi
* chore(yarn): Remove react-router * chore(yarn): Remove react-router-scroll * chore(yarn): Remove history * chore(yarn): Add react-router-dom * chore: Remove usages of react-router-scroll * refactor: Upgrade to react-router-web * refactor: Use fork of react-router-scroll This reverts commit 2ddea9a6c8d39fc64b7d0b587f3fbda7a45a7fa2. * fix: Issues mentions in the PR feedback
2017-06-06Improve ESLint rules for JSX (#3608)Yamagishi Kazutoshi
* Add react/no-string-refs ESLint rule * Add react/jsx-boolean-value ESLint rule * Add react/jsx-closing-bracket-location ESLint rule * Add react/jsx-indent ESLint rule * Add react/jsx-curly-spacing ESLint rule * Add react/jsx-equals-spacing ESLint rule * Add react/jsx-first-prop-new-line ESLint rule * Add react/jsx-no-duplicate-props ESLint rule * Add react/jsx-tag-spacing ESLint rule
2017-06-06Add quotes ESLint rules (#3602)Yamagishi Kazutoshi
* Add quotes ESLint rule * Add jsx-quotes ESlint rule * Sort ESLint rules
2017-05-22Fix "Edit profile" on the account action bar (#3222)unarist
2017-05-20Improve eslint rules (#3147)Yamagishi Kazutoshi
* Add semi to ESLint rules * Add padded-blocks to ESLint rules * Add comma-dangle to ESLint rules * add config/webpack and storyboard * add streaming/ * yarn test:lint -- --fix
2017-05-20Performance improvements (#3168)Sorin Davidoi
* refactor(components/status_list): Avoid quering scrollTop if not necessary * refactor(components/dropdown_menu): Do not render items if not expanded * refactor: Cherry-pick react-motion imports * refactor(compose/privacy_dropdown): Do not render options if not open * refactor(components/column_collapsable): Do not render children if collapsed
2017-05-20Add account media gallery view to web UI (#3120)Eugen Rochko
* Add account media gallery view to web UI * Link media view from account dropdown * Adjust link
2017-05-19Avoid useless renders (#3141)Sorin Davidoi
* feat(eslint): Set react/jsx-no-bind: error * refactor(notifications/setting_toggle): Do not use bind * refactor(components/dropdown_menu): Do not use bind * refactor(components/autosuggest_textarea): Do not use bind * refactor(compose/privacy_dropdown): Do not use bind * refactor(compose/upload_form): Do not use bind * refactor(components/status): Do not use bind * refactor(components/onboarding_modal): Do not use bind * refactor: PR feedback * chore(notifications/setting_toggle): Lint * refactor: PR feedback
2017-05-12Use ES Class Fields & Static Properties (#3008)Yamagishi Kazutoshi
Use ES Class Fields & Static Properties (currently stage 2) for improve class outlook. Added babel-plugin-transform-class-properties as a Babel plugin.
2017-05-03Replace sprockets/browserify with Webpack (#2617)Eugen Rochko
* Replace browserify with webpack * Add react-intl-translations-manager * Do not minify in development, add offline-plugin for ServiceWorker background cache updates * Adjust tests and dependencies * Fix production deployments * Fix tests * More optimizations * Improve travis cache for npm stuff * Re-run travis * Add back support for custom.scss as before * Remove offline-plugin and babili * Fix issue with Immutable.List().unshift(...values) not working as expected * Make travis load schema instead of running all migrations in sequence * Fix missing React import in WarningContainer. Optimize rendering performance by using ImmutablePureComponent instead of React.PureComponent. ImmutablePureComponent uses Immutable.is() to compare props. Replace dynamic callback bindings in <UI /> * Add react definitions to places that use JSX * Add Procfile.dev for running rails, webpack and streaming API at the same time