Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jrieke
Copy link
Collaborator

@jrieke jrieke commented Jun 18, 2025

Describe your changes

Fixes a few small UX inconsistencies between audio and camera input:

  • "Learn how to allow access" link in audio input was opening in the same tab, which resulted in the link not loading in Community Cloud. Now it opens in a new tab, same as in camera input.
  • "Learn how to allow access" was shown in red and without underline in camera input. Now it shows in blue with underline, same as in audio input (and all other links).
  • If permissions are missing, the label of audio input is grayed out/disabled while the label of camera input has the normal text color (Label of audio input shows disabled but label of camera input doesn't when permissions are denied #11700). Now both use the normal text color since I think otherwise it looks like the whole component was disabled by the developer, which feels a bit weird.

Note that there's one inconsistency left (the label of camera input isn't gray/disabled) but that's a bigger implementation since the state isn't available where we set the label.

Before:

Screenshot 2025-06-19 at 01 53 37

After:
Screenshot 2025-06-19 at 02 25 39

GitHub Issue Link (if applicable)

Closes #11700

Testing Plan

Updated snapshots.


Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@snyk-io
Copy link
Contributor

snyk-io bot commented Jun 18, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@github-actions
Copy link
Contributor

github-actions bot commented Jun 18, 2025

✅ PR preview is ready!

Name Link
📦 Wheel file https://core-previews.s3-us-west-2.amazonaws.com/pr-11699/streamlit-1.45.1-py3-none-any.whl
🕹️ Preview app pr-11699.streamlit.app (☁️ Deploy here if not accessible)

@jrieke jrieke added security-assessment-completed Security assessment has been completed for PR impact:users PR changes affect end users change:feature PR contains new feature or enhancement implementation labels Jun 18, 2025
@jrieke jrieke marked this pull request as ready for review June 19, 2025 00:28
@lukasmasuch lukasmasuch requested a review from Copilot June 19, 2025 08:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes several UX inconsistencies between audio and camera input components.

  • In CameraInput, the "Learn how to allow access" link is restyled to use theme colors and an underline.
  • In AudioInput, the link now opens in a new tab, and the disabled state management for the WidgetLabel and clear button has been updated for consistency.

Reviewed Changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.

File Description
frontend/lib/src/components/widgets/CameraInput/styled-components.ts Updated link styling to use theme.colors.link and underline text.
frontend/lib/src/components/widgets/AudioInput/NoMicPermissions.tsx Added rel, target attributes to ensure links open in new tab securely.
frontend/lib/src/components/widgets/AudioInput/AudioInput.tsx Adjusted disabled logic for WidgetLabel and clear button to align with the desired UX.
Comments suppressed due to low confidence (1)

frontend/lib/src/components/widgets/AudioInput/AudioInput.tsx:434

  • Changing the WidgetLabel's disabled prop to solely use 'disabled' ensures the label remains active even if microphone permissions are missing, aligning its UX with CameraInput. Please confirm that this distinction between the label and interactive elements (clear button) is intentional and well documented.
        disabled={disabled}

Copy link
Collaborator

@lukasmasuch lukasmasuch left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@jrieke jrieke enabled auto-merge (squash) June 19, 2025 10:57
@jrieke jrieke merged commit 02351a3 into develop Jun 19, 2025
37 checks passed
@jrieke jrieke deleted the fix/audio-camera-input-design branch June 19, 2025 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:feature PR contains new feature or enhancement implementation impact:users PR changes affect end users security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Label of audio input shows disabled but label of camera input doesn't when permissions are denied

3 participants