From feac3f069dad26853ade0144fcc34e9762ff8fcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5var=20Aamb=C3=B8=20Fosstveit?= Date: Wed, 6 May 2020 13:30:05 +0200 Subject: [PATCH] Participant list is now animated on events, fixes #302 --- app/package.json | 1 + .../ParticipantList/ParticipantList.js | 57 +++++++++++-------- 2 files changed, 33 insertions(+), 25 deletions(-) diff --git a/app/package.json b/app/package.json index ec92c5b..fae4e97 100644 --- a/app/package.json +++ b/app/package.json @@ -27,6 +27,7 @@ "react": "^16.10.2", "react-cookie-consent": "^2.5.0", "react-dom": "^16.10.2", + "react-flip-toolkit": "^7.0.9", "react-intl": "^3.4.0", "react-redux": "^7.1.1", "react-router-dom": "^5.1.2", diff --git a/app/src/components/MeetingDrawer/ParticipantList/ParticipantList.js b/app/src/components/MeetingDrawer/ParticipantList/ParticipantList.js index 411c745..07e5d24 100644 --- a/app/src/components/MeetingDrawer/ParticipantList/ParticipantList.js +++ b/app/src/components/MeetingDrawer/ParticipantList/ParticipantList.js @@ -7,6 +7,7 @@ import classnames from 'classnames'; import { withStyles } from '@material-ui/core/styles'; import { withRoomContext } from '../../../RoomContext'; import PropTypes from 'prop-types'; +import { Flipper, Flipped } from 'react-flip-toolkit'; import { FormattedMessage } from 'react-intl'; import ListPeer from './ListPeer'; import ListMe from './ListMe'; @@ -110,32 +111,38 @@ class ParticipantList extends React.PureComponent defaultMessage='Participants' /> - { participants.map((peer) => ( -
  • roomClient.setSelectedPeer(peer.id)} - > - { spotlights.includes(peer.id) ? - + { participants.map((peer) => ( + +
  • roomClient.setSelectedPeer(peer.id)} > - - - : - - } -
  • - ))} + { spotlights.includes(peer.id) ? + + + + : + + } + + + ))} + );