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

Settings > Bluetooth #437

Closed
maria-komarova opened this issue Jul 31, 2024 · 8 comments
Closed

Settings > Bluetooth #437

maria-komarova opened this issue Jul 31, 2024 · 8 comments
Milestone

Comments

@maria-komarova
Copy link

Settings page that allows to manage settings for Bluetooth devices.
Bluetooth

Figma file with more details.

@acolombier
Copy link
Contributor

I have started looking into that feature. I assume this will part of another cosmic service, but do we already have an issue in the according repo/design for Bluetooth interaction? (e.g PIN pairing validation, file incoming, pairing request, ...)

@acolombier
Copy link
Contributor

Couple of question regarding the expected behaviour and design:

  • How is the device list ordered? Status (Connected first, then disconnected) and alphabetical order?
  • Do we want to display the nameless device using the MAC address?
  • I'm confused with the following view
    image
    I understand it would be shown as main screen if there is multiple adapters. If so
    • What do we do with status caption? Shall we list the alias (e.g This system is visible as “pop-os” and “foobar” while the Bluetooth settings is open.)
    • Once clicking on an adapter, do we show the default main scren with some kind of back button/header copy change (e.g Bluetooth > Bluetooth adapter ID1)

Just to give a glimpse of where I am at, here the current UI.

image

I found a context_menu component on libcosmic but it only seem to wrap component to react right click. Is there any existing context menu allow programmatic spawn management or does this remains to be developed?

@mmstick
Copy link
Member

mmstick commented Sep 5, 2024

How is the device list ordered?

Similar to WiFi, by signal strength

existing context menu allow programmatic spawn management or does this remains to be developed?

Are you looking for the popover widget? https://github.com/pop-os/cosmic-settings/blob/networking/cosmic-settings/src/pages/networking/wired.rs#L446

@maria-komarova
Copy link
Author

I only saw the questions yesterday. About the situation with multiple adapters:

What do we do with status caption? Shall we list the alias (e.g This system is visible as “pop-os” and “foobar” while the Bluetooth settings is open.)

I'm not sure on the details. If one has multiple adapters each of them will impose a different name on the system in general?

Once clicking on an adapter, do we show the default main scren with some kind of back button/header copy change (e.g Bluetooth > Bluetooth adapter ID1)

I added the view to the mockups.
Bluetooth - Adapter 1

I assume this will part of another cosmic service, but do we already have an issue in the according repo/design for Bluetooth interaction? (e.g PIN pairing validation, file incoming, pairing request, ...)

  • PIN validation - the mockup has been added to Figma. We can show a dialog asking to confirm PIN validation if it is required after one clicks Connect and the system tries to establish connection.
    Bluetooth-pairing
  • Pairing request - doesn't look like we need it. The system is visible when Bluetooth settings or the Bluetooth applet are open. When they are closed, the system is not visible so we won't have random requests coming in.
  • Sending files over Bluetooth is beyond the first release scope.

@acolombier
Copy link
Contributor

If one has multiple adapters each of them will impose a different name on the system in general?

I believe that by default, adapters will be aliased by Bluez with the system hostname, so they will have the same name. However, they may be configured later to have individual names, either by CLI (e.g bluetoothctl) or with third party apps, so still a use-case to expect.

I have already implemented the suggested approach, with the "name1" and "name2" in case they differ.

About the situation with multiple adapters... I added the view to the mockups.

Thanks for that. It looks I had implemented a similar design, just need to configure the Bluetooth title to behave as a back button (I assume this is what is intended?)

I assume this will part of another cosmic service, but do we already have an issue in the according repo/design for Bluetooth interaction? (e.g PIN pairing validation, file incoming, pairing request, ...)

  • PIN validation - the mockup has been added to Figma. We can show a dialog asking to confirm PIN validation if it is required after one clicks Connect and the system tries to establish connection.

Looks good! That's something that will (likely) have to be implemented into cosmic-osd as well as we need to register an agent which runs constantly, not just during the setting adjustment. This will allow reauth (PIN validation after a disconnection) as will as file receiving on the future release.
We could also have a temporary agent ran by cosmic-settings allowing a better integration with the setting UI. I will try to give that a go.

@maria-komarova
Copy link
Author

maria-komarova commented Sep 12, 2024

Thanks for that. It looks I had implemented a similar design, just need to configure the Bluetooth title to behave as a back button (I assume this is what is intended?)

Yes, it is a back button. You can check how Wallpaper and Appearance pages are done for this.

@WatchMkr WatchMkr modified the milestones: alpha 2, alpha 3 Sep 25, 2024
@WatchMkr
Copy link

Leaving open and in the alpha 3 milestone for the bluetooth pin feature.

@mmstick
Copy link
Member

mmstick commented Oct 2, 2024

PIN confirmation added by 894cf9f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Complete
Development

Successfully merging a pull request may close this issue.

4 participants