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

1232 redesigned top level structure for the settings #1815

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

Conversation

DanielMcInnes
Copy link
Contributor

No description provided.

@DanielMcInnes DanielMcInnes linked an issue Dec 24, 2024 that may be closed by this pull request
@DanielMcInnes DanielMcInnes marked this pull request as draft December 24, 2024 03:01
@DanielMcInnes DanielMcInnes force-pushed the 1232-redesigned-top-level-structure-for-the-settings branch 3 times, most recently from c4f60d8 to 7d35c97 Compare January 1, 2025 00:58
@DanielMcInnes DanielMcInnes marked this pull request as ready for review January 1, 2025 01:12
@DanielMcInnes
Copy link
Contributor Author

NB: The design has 'Console Password' and 'Enable console on VRM', these are no longer required https://victrondevelopment.slack.com/archives/C020QG3JVEW/p1734675975736589

image

@DanielMcInnes DanielMcInnes force-pushed the 1232-redesigned-top-level-structure-for-the-settings branch from 405018f to b71436d Compare January 2, 2025 05:33
Copy link
Contributor

@blammit blammit left a comment

Choose a reason for hiding this comment

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

Great work! The settings are looking so much better. Nice work on refactoring into components as well.

For each commit message, could you:

  • Add a reference to the task number in each commit message
  • Make the commit message more descriptive - e.g. "Move Date & Time to General settings" instead of just "Date & Time", or "Add PageSettingsDisplayAndAppearance" instead of just "PageSettingsDisplayAndAppearance".

Also it would be nice to squash some of the smaller related commits, e.g. the four separate commits that add the extra bottom items to the Device List page.

id: root

GradientListView {
id: settingsListView
Copy link
Contributor

Choose a reason for hiding this comment

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

The existing PageSettingsGeneral contains the magic up/down key combinations and list drag feature to change access level. Now that the access level is shown on this page instead, those features should be moved into this page instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

import QtQuick
import Victron.VenusOS

Item {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the separate Item necessary or can the Label be the root item, if the topPadding and bottomPadding are set? And looking at the design, there is slightly more space above the text than below it:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated as suggested

pages/settings/PageSettingsGeneral.qml Show resolved Hide resolved
pages/settings/PageSettingsIntegrations.qml Show resolved Hide resolved
pages/settings/PageSettingsSystem.qml Outdated Show resolved Hide resolved


GradientListView {
id: settingsListView
Copy link
Contributor

Choose a reason for hiding this comment

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

Unnecessary id

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed


ListMqttAccessSwitch {
id: mqtt
}

Column {
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like PageSettingsServices can be removed now, though "CAN-bus over TCP/IP (Debug)" also needs to be moved to the connectivity page alongside the other VE.Can list items.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor Author

Choose a reason for hiding this comment

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

do you have a way of detecting unused qml files in a project?

Copy link
Contributor

Choose a reason for hiding this comment

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

No :(

ListNavigation {
//% "Modbus TCP Server"
text: qsTrId("pagesettingsintegrations_modbus_tcp_server")
onClicked: Global.pageManager.pushPage("/pages/settings/PageSettingsModbusTcp.qml", {"title": text}) // TODO - is this correct?
Copy link
Contributor

Choose a reason for hiding this comment

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

The list item seems correctly placed according to the new design structure - is there something else that needs to be resolved for this TODO?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was a leftover comment, removed now.

}
}

ListMqttAccessSwitch { } // TODO - is this correct?
Copy link
Contributor

Choose a reason for hiding this comment

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

Regarding the TODO, this seems correctly placed according to the new design structure? Though in the design it says "MQTT server" instead of "MQTT access".

Copy link
Collaborator

@mr-manuel mr-manuel Jan 8, 2025

Choose a reason for hiding this comment

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

The naming was switched with the security update made a while ago. Probably it was not updated in the Figma. MQTT Access is the correct one.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, thanks!

}
}

ListNavigation {
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if "Tailscale" should go below "Mobile network", seems more related to that group than to GPS and CAN devices

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would put it under Access & Security, since it‘s for remote access.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved "Tailscale" below "Mobile network"

@DanielMcInnes DanielMcInnes force-pushed the 1232-redesigned-top-level-structure-for-the-settings branch 2 times, most recently from 6fa6e4a to 35311d5 Compare January 8, 2025 08:23
ListItem {
id: root

property alias text: primary.text
Copy link
Contributor

@blammit blammit Jan 8, 2025

Choose a reason for hiding this comment

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

This looks pretty much the same as ListSwitch but with a caption? Can the caption just be added to ListSwitch using bottomContent?

Copy link
Contributor Author

@DanielMcInnes DanielMcInnes Jan 10, 2025

Choose a reason for hiding this comment

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

I couldn't do it using bottomContent, it didn't look right. Done a different way, removed SettingsListSwitch.

@DanielMcInnes DanielMcInnes force-pushed the 1232-redesigned-top-level-structure-for-the-settings branch from 35311d5 to f133bb1 Compare January 10, 2025 04:11
@DanielMcInnes
Copy link
Contributor Author

Great work! The settings are looking so much better. Nice work on refactoring into components as well.

For each commit message, could you:

* Add a reference to the task number in each commit message

* Make the commit message more descriptive - e.g. "Move Date & Time to General settings" instead of just "Date & Time", or "Add PageSettingsDisplayAndAppearance" instead of just "PageSettingsDisplayAndAppearance".

Also it would be nice to squash some of the smaller related commits, e.g. the four separate commits that add the extra bottom items to the Device List page.

Done

keyEvents.downCount = 0
}
}
boundsBehavior: Flickable.DragOverBounds
Copy link
Contributor

Choose a reason for hiding this comment

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

This boundsBehavior: Flickable.DragOverBounds needs to move to the listview in PageSettingsAccessAndSecurity, otherwise that list view cannot be dragged to change to superuser.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

}
//% "Incorrect password"
return Utils.validationResult(VenusOS.InputValidation_Result_Error, qsTrId("settings_access_incorrect_password"))
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

"Network security profile" doesn't make sense here anymore, should it be moved to the "Access and security" page, e.g. as the second item?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

allowed: tailscale.isValid

VeQuickItem {
id: tailscale
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm getting this error when trying to open the page:

qml: Aborted attempt to push page with errors: /pages/settings/PageSettingsConnectivity.qml: qrc:/qt/qml/Victron/VenusOS/pages/settings/PageSettingsConnectivity.qml:119 id is not unique

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whoops, fixed

text: "System data"
onClicked: Global.pageManager.pushPage("/pages/settings/debug/PageSystemData.qml", { title: text })
}

ListNavigation {
text: "Test"
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you rename "Test" to "UI library" while you're at it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@DanielMcInnes DanielMcInnes force-pushed the 1232-redesigned-top-level-structure-for-the-settings branch from f133bb1 to a4ea0b4 Compare January 10, 2025 07:22
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.

Redesigned top-level structure for the settings
3 participants