mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-26 23:04:57 +00:00
Second-pass a11y work across all 12 component groups. Every interactive element now has activeFocusOnTab, Keys.onReturnPressed/SpacePressed, and context-aware Accessible.name/description bindings. Highlights: - Dialogs: keyboard handlers with enabled-guard on confirm buttons - CDropdownMenu: full keyboard nav (Up/Down/Enter/Escape) - CLoginForm: explicit KeyNavigation.tab chain (username→password→submit) - CNotificationBell: dynamic "3 notifications"/"No notifications" name - CJobProgressBar: Accessible.minimumValue/maximumValue/currentValue - CExecutionStatusDot: "Execution status: Running/Passed/Failed" binding - CKeyboardShortcuts: invisible Repeater exposes all shortcuts to a11y tree - CDataTable rows: "Row N of M" descriptions - Canvas elements: Accessible.Canvas role + keyboard zoom (+/- keys) - DropdownExpandedList: focus-highlight extended to :activeFocus - Dynamic names reflect loading state (e.g. "Signing in, please wait") Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
131 lines
4.1 KiB
QML
131 lines
4.1 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
import QmlComponents 1.0
|
|
|
|
Rectangle {
|
|
id: pkgRoot
|
|
color: Theme.background
|
|
objectName: "view_package_manager"
|
|
Accessible.role: Accessible.Pane
|
|
Accessible.name: "Package Manager"
|
|
|
|
property string searchText: ""
|
|
property string selectedPackageId: ""
|
|
|
|
function filteredPackages() {
|
|
var allPkgs = PackageLoader.packages
|
|
if (searchText === "")
|
|
return allPkgs
|
|
var lower = searchText.toLowerCase()
|
|
return allPkgs.filter(function(pkg) {
|
|
return pkg.name.toLowerCase()
|
|
.indexOf(lower) !== -1
|
|
|| pkg.packageId.toLowerCase()
|
|
.indexOf(lower) !== -1
|
|
|| (pkg.description
|
|
&& pkg.description
|
|
.toLowerCase()
|
|
.indexOf(lower) !== -1)
|
|
})
|
|
}
|
|
|
|
ColumnLayout {
|
|
anchors.fill: parent
|
|
spacing: 16
|
|
anchors.margins: 20
|
|
|
|
FlexRow {
|
|
Layout.fillWidth: true
|
|
spacing: 12
|
|
CText {
|
|
variant: "h3"
|
|
text: "Package Manager"
|
|
}
|
|
CStatusBadge {
|
|
status: "success"
|
|
text: PackageLoader.packageCount
|
|
+ " packages"
|
|
}
|
|
}
|
|
|
|
RowLayout {
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
spacing: 16
|
|
|
|
CPackageDetailSidebar {
|
|
selectedPackageId:
|
|
root.selectedPackageId
|
|
onRescanRequested:
|
|
PackageLoader.scan()
|
|
}
|
|
|
|
CCard {
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
|
|
ColumnLayout {
|
|
anchors.fill: parent
|
|
anchors.margins: 16
|
|
spacing: 12
|
|
|
|
FlexRow {
|
|
Layout.fillWidth: true
|
|
spacing: 12
|
|
CTextField {
|
|
placeholderText:
|
|
"Search packages"
|
|
text: searchText
|
|
onTextChanged:
|
|
searchText = text
|
|
Layout.fillWidth: true
|
|
activeFocusOnTab: true
|
|
Accessible.role:
|
|
Accessible.EditableText
|
|
Accessible.name:
|
|
"Search packages"
|
|
}
|
|
CText {
|
|
variant: "caption"
|
|
text:
|
|
filteredPackages()
|
|
.length + " / "
|
|
+ PackageLoader
|
|
.packageCount
|
|
}
|
|
}
|
|
|
|
ListView {
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
model: filteredPackages()
|
|
spacing: 8
|
|
clip: true
|
|
delegate:
|
|
CPackageListItem {
|
|
width: parent
|
|
? parent.width
|
|
: 400
|
|
packageData: modelData
|
|
onInstallRequested:
|
|
PackageLoader
|
|
.install(modelData
|
|
.packageId)
|
|
onUninstallRequested:
|
|
PackageLoader
|
|
.uninstall(
|
|
modelData
|
|
.packageId)
|
|
onDetailsRequested:
|
|
selectedPackageId
|
|
= modelData
|
|
.packageId
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|