Conversation
This was referenced May 21, 2026
Rewrites the PostType component and its styles to match the voice-
message visuals from Mattermost mobile.
Before / after screenshots in docs/voice-mobile.png and docs/voice-web.png.
Changes:
- webapp/src/components/post_type/post_type.jsx
* Use React.createRef() for the <audio> element instead of
document.getElementById after mount.
* Custom div-based scrubber with track / fill / floating thumb,
replacing the native <progress> element.
* Mouse + touch drag-to-seek support (touch-action: none on the
scrubber and passive: false on touchmove so we can preventDefault).
* Time-display logic: shows total duration before first playback,
current time afterwards.
* Adds ARIA attributes to the scrubber (role=slider, valuemin/max/
now) and aria-label to the download link.
- webapp/src/components/post_type/post_type.css
* 44px circular play button with theme-accent tinted background.
* Horizontal scrubber with 4px track and 14px floating thumb.
* Tabular-nums duration text.
* Download icon. Theme colors are derived from the existing theme
tokens (buttonBg / linkColor, centerChannelColor, centerChannelBg).
No new dependencies. No backend changes.
Tested on Mattermost server 10.11.0 (web — Chrome + Safari). Confirmed:
play/pause, click-to-seek anywhere on the scrubber, drag-to-seek
(mouse and touch), time display flipping between duration and current
time, download link, theme adaptation when the user switches themes.
zainali89
force-pushed
the
feat/redesign-player-ui
branch
from
May 21, 2026 13:55
171f637 to
b41b09f
Compare
streamer45
approved these changes
May 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rewrites the
PostTypeReact component and its styles to match the voice-message visuals from Mattermost mobile — circular play button, draggable scrubber with floating thumb, formatted duration text, and a download icon.Before / after
Same MP3 voice message in both screenshots. With this PR the web player visually matches the mobile native player.
Changes
webapp/src/components/post_type/post_type.jsx— rewrite:React.createRef()for the<audio>element instead ofdocument.getElementByIdafter mount.<progress>element.touch-action: noneon the scrubber,passive: falseontouchmoveso we canpreventDefault).role=slider,valuemin/max/now) andaria-labelon the download link.webapp/src/components/post_type/post_type.css— rewrite:buttonBg/linkColor,centerChannelColor,centerChannelBg) so it adapts to user-selected themes.No new dependencies. No backend changes.
Tested on
Confirmed: play/pause, click-to-seek anywhere on the scrubber, drag-to-seek (mouse and touch), time display flipping between duration and current time, download link, theme adaptation when switching between light / dark / custom themes.
Related
A companion PR (#67) is the small bug-fix that makes voice messages renderable on Mattermost mobile (by setting
file_idson the post). This PR is independent and can be merged separately in either order — whichever lands second only needs a smallpost_type.cssrebase since both touch that file.