Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Admin panel custom sounds, multiple sound playback fix and added single play/pause button #16215

Merged
merged 5 commits into from
Apr 14, 2020

Conversation

ashwaniYDV
Copy link
Contributor

@ashwaniYDV ashwaniYDV commented Jan 11, 2020

Closes #16213 #16208

Before changes

(1) All sounds can be played simultaneously which overlaps with the other ones.
(2) There are seperate buttons for play and pause.

After changes:

(1) One sound can be played at a time.
(2) There is a single button for play and pause which looks consistent with most of the media players and is more handy for admins than having seperate buttons for play and pause.

a1

@ashwaniYDV
Copy link
Contributor Author

ashwaniYDV commented Jan 21, 2020

@sampaiodiego @tassoevan Would you please review :)

@ashwaniYDV ashwaniYDV changed the title Revamped the functionality and UI/UX of admin panel custom sounds [FIX] Admin panel custom sounds, multiple souds playback and single play/pause button Jan 27, 2020
@ashwaniYDV ashwaniYDV requested a review from tassoevan January 27, 2020 16:36
@ashwaniYDV ashwaniYDV changed the title [FIX] Admin panel custom sounds, multiple souds playback and single play/pause button [FIX] Admin panel custom sounds, multiple souds playback fix and added single play/pause button Jan 27, 2020
@gabriellsh
Copy link
Member

Hey! Really cool what you did, works better in my opinion. Just make it so when the sound finishes playing it on its own resets to the play button.

@ashwaniYDV
Copy link
Contributor Author

Hey! Really cool what you did, works better in my opinion. Just make it so when the sound finishes playing it on its own resets to the play button.

@gabriellsh I have done the requested changes. But doing so I encountered some more corner case issues. I have solved them too.
Please review.

Copy link
Member

@gabriellsh gabriellsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could just add this block inside the play event.

document.getElementById(this._id).onended = function() { t.isPlayingId.set(''); this.onended = null; };

Then you don't have to work with settimeout and the process is straightforward.

Obs.: don't forget to remove the event once the audio is stopped.

@ashwaniYDV
Copy link
Contributor Author

ashwaniYDV commented Jan 29, 2020

@gabriellsh Thank you very much. This reduced lots of code and also I don't have to worry about end cases which I faced using the settimeout. 👍
I have done the requested changes.

Copy link
Member

@gabriellsh gabriellsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@ashwaniYDV ashwaniYDV removed the request for review from tassoevan January 30, 2020 13:59
@ashwaniYDV ashwaniYDV changed the title [FIX] Admin panel custom sounds, multiple souds playback fix and added single play/pause button [FIX] Admin panel custom sounds, multiple sound playback fix and added single play/pause button Mar 13, 2020
@CLAassistant
Copy link

CLA assistant check
All committers have signed the CLA.

@ggazzo ggazzo merged commit 130af28 into RocketChat:develop Apr 14, 2020
gabriellsh added a commit that referenced this pull request Apr 14, 2020
…users_and_rooms

* 'develop' of github.com:RocketChat/Rocket.Chat:
  [FIX] Omnichannel SMS / WhatsApp integration errors due to missing location data (#17288)
  [FIX] User search on directory not working correctly (#17299)
  [FIX] Can not save Unread Tray Icon Alert user preference (#16288) (#16313)
  [FIX] Variable rendering problem on Import recent history page (#15997)
  [FIX] Admin panel custom sounds, multiple sound playback fix and added single play/pause button (#16215)
  [FIX] Discussions created from inside DMs were not working (#17282)
  [FIX] translation for nl (#16742)
  [FIX] No maxlength defined for custom user status (#16534)
  [FIX] Directory users email sort button (#16606)
  [FIX] In Create a New Channel, input should be focused on channel name instead of invite users (#16405)
  [FIX] Email not verified message (#16236)
  [FIX] Directory default tab (#17283)
  Update ru.i18n.json (#16869)
  [FIX] Avatar on sidebar when showing real names (#17286)
  Update Apps-Engine to stable version (#17287)
  [NEW][ENTERPRISE] Auto close abandoned Omnichannel rooms (#17055)
  Static props for Administration route components (#17285)
  [NEW] Default favorite channels (#16025)
  Apply $and helper to message template (#17280)
gabriellsh added a commit that referenced this pull request Apr 15, 2020
…mailer

* 'develop' of github.com:RocketChat/Rocket.Chat: (93 commits)
  [FIX] Red color error outline is not removed after password update (#16536)
  [FIX] Change wording to start DM from info panel (#8799)
  New hooks for RouterContext (#17305)
  [FIX] SAML assertion signature enforcement (#17278)
  [FIX] LDAP users lose session on refresh (#17302)
  [NEW] Add MMS support to Voxtelesys (#17217)
  [FIX] Popover component doesn't have scroll (#17198)
  [FIX] Omnichannel SMS / WhatsApp integration errors due to missing location data (#17288)
  [FIX] User search on directory not working correctly (#17299)
  [FIX] Can not save Unread Tray Icon Alert user preference (#16288) (#16313)
  [FIX] Variable rendering problem on Import recent history page (#15997)
  [FIX] Admin panel custom sounds, multiple sound playback fix and added single play/pause button (#16215)
  [FIX] Discussions created from inside DMs were not working (#17282)
  [FIX] translation for nl (#16742)
  [FIX] No maxlength defined for custom user status (#16534)
  [FIX] Directory users email sort button (#16606)
  [FIX] In Create a New Channel, input should be focused on channel name instead of invite users (#16405)
  [FIX] Email not verified message (#16236)
  [FIX] Directory default tab (#17283)
  Update ru.i18n.json (#16869)
  ...
ggazzo added a commit that referenced this pull request Apr 15, 2020
…dm/mailer

* 'adm/mailer' of github.com:RocketChat/Rocket.Chat: (79 commits)
  removed unecessary prop
  Fixed sendMail function
  Removed Log, Success message
  Permissions
  added route component
  [FIX] "Invalid Invite" message when registration is disabled (#17226)
  Added route, error handling.
  [FIX] Red color error outline is not removed after password update (#16536)
  [FIX] Change wording to start DM from info panel (#8799)
  New hooks for RouterContext (#17305)
  [FIX] SAML assertion signature enforcement (#17278)
  [FIX] LDAP users lose session on refresh (#17302)
  [NEW] Add MMS support to Voxtelesys (#17217)
  [FIX] Popover component doesn't have scroll (#17198)
  [FIX] Omnichannel SMS / WhatsApp integration errors due to missing location data (#17288)
  [FIX] User search on directory not working correctly (#17299)
  [FIX] Can not save Unread Tray Icon Alert user preference (#16288) (#16313)
  [FIX] Variable rendering problem on Import recent history page (#15997)
  [FIX] Admin panel custom sounds, multiple sound playback fix and added single play/pause button (#16215)
  [FIX] Discussions created from inside DMs were not working (#17282)
  ...
dudizilla added a commit that referenced this pull request Apr 21, 2020
…nto view-logs

* 'develop' of https://github.com/RocketChat/Rocket.Chat: (31 commits)
  Fixed componentes width (#17322)
  [IMPROVE] Administration -> Mailer Rewrite to React. (#17191)
  Regression: Storybook  added flowrouter group mock (#17321)
  [NEW] Feature/custom oauth mail field and interpolation for mapped fields (#15690)
  [FIX] "Invalid Invite" message when registration is disabled (#17226)
  [FIX] Red color error outline is not removed after password update (#16536)
  [FIX] Change wording to start DM from info panel (#8799)
  New hooks for RouterContext (#17305)
  [FIX] SAML assertion signature enforcement (#17278)
  [FIX] LDAP users lose session on refresh (#17302)
  [NEW] Add MMS support to Voxtelesys (#17217)
  [FIX] Popover component doesn't have scroll (#17198)
  [FIX] Omnichannel SMS / WhatsApp integration errors due to missing location data (#17288)
  [FIX] User search on directory not working correctly (#17299)
  [FIX] Can not save Unread Tray Icon Alert user preference (#16288) (#16313)
  [FIX] Variable rendering problem on Import recent history page (#15997)
  [FIX] Admin panel custom sounds, multiple sound playback fix and added single play/pause button (#16215)
  [FIX] Discussions created from inside DMs were not working (#17282)
  [FIX] translation for nl (#16742)
  [FIX] No maxlength defined for custom user status (#16534)
  ...
@sampaiodiego sampaiodiego mentioned this pull request Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement] Single button for play/pause instead of two
4 participants