From 308f7620d7d3220fb07f113458aa97ade61f3bf7 Mon Sep 17 00:00:00 2001 From: Valerio Bozzolan Date: Fri, 13 Feb 2026 23:18:03 +0100 Subject: [PATCH] Editing Audio in Macro/Meme: show caption with basic info Summary: It might be vaguely useful to know what happens to your audio once you press save. Screenshot after the change: {F6759938} Test Plan: Visit a specific macro/meme from this link: http://phorge.localhost/macro/ Click on Edit Audio. Enjoy the new caption. Reviewers: O1 Blessed Committers, aklapper Reviewed By: O1 Blessed Committers, aklapper Subscribers: aklapper, tobiaswiese, Matthew, Cigaryno Maniphest Tasks: T16451 Differential Revision: https://we.phorge.it/D26723 --- .../PhabricatorMacroAudioController.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/applications/macro/controller/PhabricatorMacroAudioController.php b/src/applications/macro/controller/PhabricatorMacroAudioController.php index fb6eba8401..13f1f4adc0 100644 --- a/src/applications/macro/controller/PhabricatorMacroAudioController.php +++ b/src/applications/macro/controller/PhabricatorMacroAudioController.php @@ -79,6 +79,16 @@ final class PhabricatorMacroAudioController extends PhabricatorMacroController { } } + $suggestion_volume = pht( + 'If you set one of the Play options, audio volume will automatically '. + 'increase when scrolling closer to the Macro, and decrease when '. + 'scrolling away.'); + + $suggestion_click = pht( + 'If the audio does not play, you may need to reload the page and '. + 'interact with it (for example, click somewhere), or check your web '. + 'permissions as modern browsers may block audio autoplay.'); + $form = id(new AphrontFormView()) ->addHiddenInput('behaviorForm', 1) ->setUser($viewer); @@ -108,6 +118,12 @@ final class PhabricatorMacroAudioController extends PhabricatorMacroController { 'Play audio continuously, treating the macro as an audio source. '. 'Best for ambient sounds.')); + $options->setCaption( + implode(' ', array( + $suggestion_volume, + $suggestion_click, + ))); + $form->appendChild($options); $form->appendChild( id(new AphrontFormSubmitControl()) -- 2.51.2