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 the ability to specify the default page #38

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

ZeroErrors
Copy link
Contributor

@ZeroErrors ZeroErrors commented Dec 19, 2020

Depends on: #34

Change Log

  • Added "Default Page" setting

Description

In some cases its useful to be able to display a different default page when first starting the app instead of being on a blank screen waiting for a device to connect.

Future Work

Additional features like automatically swapping to the Android Auto page when a device is connected and automatically swapping back to the default when disconnected would also greatly enhance this feature. This type of feature could also be expanded for handling things like automatically displaying a reversing camera.

Checklist:

  • The code change is tested and works locally.

@icecube45
Copy link
Member

Not related to this PR - but just taking a second to plug the Open Dash slack

I think the last invite link we had somewhere has expired at this point

@icecube45
Copy link
Member

I like this setting
Only two suggestions:

  • Probably a good idea to remove undisplayed pages from the default page options (this seems to default to AA if you select a page you turned off)
  • Maybe the above is best done through a radio button next to the current checkboxes on turning pages on/off

@rsjudka
Copy link
Contributor

rsjudka commented Dec 20, 2020

i agree with @icecube45, we'll probs want to better "merge" the 2 settings together (default page and enabled pages) mainly because changes to the enabled pages can affect the default page)

qt checkboxes have a "tristate" option... maybe that might be something to consider? it could be something like off, on, and default page

@icecube45
Copy link
Member

icecube45 commented Dec 20, 2020

Tristate appears to just track changes in box status - I think we'd need another row of exclusive checkboxes

Then again the QT Documentation isn't great - it may work for our purposes.

@rsjudka
Copy link
Contributor

rsjudka commented Dec 20, 2020

oh yeah its definitely not its intended use haha

but we can really use that 3rd state for whatever
image

@rsjudka
Copy link
Contributor

rsjudka commented Dec 20, 2020

the way im imagining it is you take the stateChanged signal and do it one of two ways:

  • if current state is off, set next state to on... if current state is on, set to off (if a default page is set) or "partial" (if a default page wasnt set yet)
  • set the next state, and if the next state happens to be "partial", then find the previous default page and set that to just the on state

i would honestly need to code that up to see how intuitive it is from a UI perspective tho (mainly trying to minimize the amount elements needed), but a radio button to the side is probably easier to add and either seems fine to me

@icecube45
Copy link
Member

Future Work

Additional features like automatically swapping to the Android Auto page when a device is connected and automatically swapping back to the default when disconnected would also greatly enhance this feature. This type of feature could also be expanded for handling things like automatically displaying a reversing camera.

In addition to reverse camera tab switching -
Android Auto / openauto should also be spitting out media and audio focus requests, good idea to make dash properly follow those, and change to AA tab during media focus requests.

@ZeroErrors ZeroErrors changed the base branch from pages to develop December 21, 2020 10:55
@ZeroErrors
Copy link
Contributor Author

ZeroErrors commented Dec 21, 2020

So tried a different way of handling the pages config, let me know what you think.

screenshot

I also renamed it from 'default' page to 'home' page and rebased the branch on develop with the latest changes.

@rsjudka
Copy link
Contributor

rsjudka commented Dec 21, 2020

i can see that working for like a desktop application, but for something that's touch based and often used on smaller screens we need to try to keep things minimal

With this, im assuming the user would need to tap on the page, and then select one of the actions to then perform on it? Even though it's only one additional tap, with screens that are less responsive/accurate, it might get annoying to mistap or not have your touch registered at all

I like @icecube45 suggestion of radio boxes, since it's only an additional element in the horizontal space and handling of a single selection is already implemented since they're in a group box

@ZeroErrors
Copy link
Contributor Author

Ok, replaced it with radio buttons.
screenshot

Something I was thinking about with the way I went was also the ability to reorder the pages and also to help deal with the expanding number of pages, but I guess they can be dealt with later when it becomes needed.

@icecube45
Copy link
Member

That's a good point - in the future maybe we have to make a custom widget to make it (small) touchscreen compatible.

@rsjudka
Copy link
Contributor

rsjudka commented Dec 22, 2020

I would say remove the icons, maybe right align the radio buttons? Not sure if that's better or not lol

Yeah I considered allowing the pages to be reordered but it didn't feel like something that many people cared for

I dont see too many pages being added anyway, but will probs set a limit on the number of pages that can be enabled at a time (likely 7 based on material design spec)

@rsjudka
Copy link
Contributor

rsjudka commented Dec 22, 2020

@icecube45 could you explain that a bit more? Not really sure what your mean

@icecube45
Copy link
Member

Like if we were to design a custom selector widget that would allow for defaulting and ordering, while remaining simplistic and easy to use on a touchscreen. I have some ideas in the back of my mind, but nothing fleshed out

@rsjudka
Copy link
Contributor

rsjudka commented Dec 22, 2020

Oh gotcha

Let me know if you need help moving anything up in qt (or seeing if something is feasible 😅)

@ZeroErrors
Copy link
Contributor Author

Here is some screenshots of a few different layouts.
I have a concern that without icons there is no indication as to what the radio buttons mean and since there is no direct user feedback like the checkboxes, which instantly hide or show the pages in the sidebar, you would have no idea what it does until you restart dash.

1. Both left with icons
left-icons

2. Both right with icons
both-right-icons

3. Home right with icons
right-icons

4. Both left without icons
left

5. Both right without icons
both-right

6. Home right without icons
right

@dannybarake
Copy link
Collaborator

I prefer option 3. This is most user friendly for newbies of Dash.

@stefan-sherwood
Copy link
Collaborator

stefan-sherwood commented Dec 23, 2020

I would use on-off switches instead of checkboxes for consistency. I also think it would look cleaner if the default page was a separate -dropdown- arrow selector (don't know what it's called) that populated based on which pages were enabled.

(this is the selector control I'm referring to)
image

@robert5974
Copy link
Collaborator

I like Stefan's suggestion. The selector makes sense.

@icecube45
Copy link
Member

I'm more hesitant on the use of a selector - I'm not sure it's intuitive to a user as to what happens when you disable a page that's set as a default page.

@stefan-sherwood
Copy link
Collaborator

stefan-sherwood commented Dec 24, 2020

In that case the default changes to a different item. All of this is probably rarely going to be changed so clarity of the state is arguably the most important thing. Regardless, how is the radio button any different in terms of intuitiveness of what happens when you disable the default item? It is functionally identical.

@stefan-sherwood
Copy link
Collaborator

Also note that you can put a label next to it that says "Home page". That makes it pretty clear.

@UniCizin
Copy link

hey guys,

any news on this? would love to "autostart" into bluetooth media view as i am using my phone and spotify as source

@rsjudka
Copy link
Contributor

rsjudka commented Jul 11, 2022

not sure where things left off here... i think a selector here would be just fine, and totally something i can pick up after i get through some of the pieces I'm currently working on

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.

7 participants