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

Add Profile.BellSound to Settings UI #17983

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

carlos-zamora
Copy link
Member

Summary of the Pull Request

Adds the Profile.BellSound setting to the Settings UI under the Profile > Advanced page.

  • View changes:
    • The setting is exposed via an expander placed near the Profile.BellStyle setting.
    • Added a button to be able to preview the added sound
    • Added a browse button that opens a file picker
    • Added a delete button to be able to delete each sound entry
  • View model changes:
    • CurrentBellSounds keeps track of the bell sounds added and exposed via the UI.
    • BellSoundViewModel wraps each sound. This allows us to listen (and propagate) changes to the registered sounds.
    • BellSoundPreview provides a written preview of the current bell sound to display in the expander

#10000

@carlos-zamora

This comment was marked as outdated.

This comment has been minimized.

@DHowett
Copy link
Member

DHowett commented Oct 1, 2024

Probably we don't need to have one browse button per line. Since the indices don't matter in the backend, there is no difference between "replace an entry inline" and "delete old entry, click add (which opens a Browse window)", except that the first is much more complicated from both a developer standpoint (tracking which index to replace) and a user one ("why are there so many buttons?")

This comment has been minimized.

@carlos-zamora
Copy link
Member Author

Probably we don't need to have one browse button per line. Since the indices don't matter in the backend, there is no difference between "replace an entry inline" and "delete old entry, click add (which opens a Browse window)", except that the first is much more complicated from both a developer standpoint (tracking which index to replace) and a user one ("why are there so many buttons?")

Added the demo above.

Yeah, for designs 2 & 3, we I think we may be able to remove BellSoundViewModel entirely and just search for a matching string.

I'm gonna hold off on making that change for a bit though, because I want consensus on a design first. Adding "Needs-Discussion" so we touch base on the design at the upcoming sync.

@carlos-zamora carlos-zamora added the Needs-Discussion Something that requires a team discussion before we can proceed label Oct 1, 2024
@carlos-zamora
Copy link
Member Author

carlos-zamora commented Oct 10, 2024

Feedback from team sync (10/7):

  • Drag and drop would be cool, but there isn't really a nice spot for it. (maybe drop on the "+ add sound" button)
    • punted
  • (nit) take advantage of more width? (skipped)
  • [test]: sound is playing, but we navigate to another page
    • we stop playing the sound and navigate just fine. Nice!
  • take the users home directory and replace it with ~
    • [idea] display the filename, and display the directory path separately as a subtitle
      • [idea] only display the directory if there's multiple files with the same name
  • [idea] when sound is added, we copy it over to the local folder
    • punted at this point
  • We should validate that the files exist
    • maybe strikethrough the item that didn't load?
    • definitely don't try and play sound!
  • Bell style interaction
    • have a preview
    • add a warning if "style: audible" is off
    • In "Bell sound" help text, say "you will need to enable "Bell notification style, audible"
    • in the future, combine bell style and sound
  • [bug] if you close the file picker, we add an empty entry

@carlos-zamora carlos-zamora removed the Needs-Discussion Something that requires a team discussion before we can proceed label Oct 21, 2024

This comment has been minimized.

This comment has been minimized.

@carlos-zamora
Copy link
Member Author

Demo

photo credit: Dustin

image

image

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.

3 participants