Shared action ribbons¶
FLEET Mira retains its dashboard, left IconNavbar and right work tabs. ui_actions.py provides edition-neutral ActionBar, ActionButton, ActionDefinition and FormFooter components. Administration uses these through its existing compatible classes. Business permissions, validation and signal connections remain with each workspace.
Interaction contract¶
- Buttons display a shared vector icon at 24 logical pixels, visible text and a translated tooltip. Minimum height is 40 logical pixels; font metrics and operating-system scaling determine the required width.
- Create, Open/Edit and Duplicate appear on the left, followed by workflow actions and Import/Export. Destructive actions appear separately at the end of the left groups. Refresh stays on the right.
- Group captions describe Record, Actions, Import/Export and View. No additional ribbon-tab level is introduced.
- A subtle continuous outer border encloses both buttons and group captions.
- Group captions use grey text (#a6a6a6) and are centered beneath the complete visible group. Dividers use the same grey (#a6a6a6), are one logical pixel wide, span the button and caption height and separate adjacent groups on the same row; wrapping never creates dividers between rows. Captions and dividers are visual only and do not take keyboard focus. Form footers have neither group captions nor dividers.
- At narrow widths, secondary actions move into More actions. Primary actions remain directly available and may wrap onto additional rows. A menu entry invokes the existing button; selection state, license visibility, checked state and submenus are preserved.
- Form footers remain outside scrolling content. Save is rightmost; Discard or Cancel precedes it. Cancel ends a dialog; Discard restores form changes.
- All text and state explanations use the shared catalogue for 25 languages. Region affects formatting only.
Adopted workspaces¶
Administration adopts the contract through AdministrationActionBar and AdministrationFormFooter. Shared ribbons also cover the lease overview and detail, finance master data, costs and supplier invoices, record documents, personnel and vehicle master data, deadline types and actions, traffic-offence actions, driving-license evaluation, record exports, standard-driver assignment, device actions, the tachograph archive and report output. Dashboard actions and localized standard-dialog actions receive the same icons and minimum heights.
User management separates search, ribbon, table and status. Search and Refresh have technical IDs; refreshing retains the selected user ID while it remains visible. Shared Fleet grids also retain selection and scroll position when their models change, without taking input focus.
Application settings use FormEditState: saving requires changes, a valid advertisement URL and the existing permission. Discard restores the loaded form state. Automatic refresh does not overwrite pending edits. Closing the tab, signing out or exiting offers Save, Discard and Continue editing. Failed saving does not permit closing. A change of authenticated user does not carry over the previous user's form edits.
Technical contracts and verification¶
The application-wide rollout attaches through apply_action_presentation() when a widget tree is translated or opened. ui_action_catalog.py registers label aliases, technical function identities, presentation roles and explicit exceptions for contextual widgets. ui_action_symbols.py draws the vector motifs. Equivalent functions share a motif; distinct functions receive distinct motifs. Translated word fragments and random hash patterns are not used for assignment.
Contextual functions receive their unambiguous assignment through the technical widget ID from their first construction in the authenticated user's language. For example, trafficOffenceCaseClose registers the existing case/close motif: the English caption “Close case” can represent multiple German sources and therefore does not determine this business function. Regressions inspect the actual traffic action bar in all 25 initial languages and after subsequent language changes; captions, permissions and callbacks remain unchanged.
Existing action rows are adopted with their original buttons. Search and filter fields precede the ribbon; field actions and step/time navigation retain their positions. Existing save, discard, validation and permission flows remain owned by the workspace. The rollout does not introduce a blanket save transaction or global form validation. Existing persistent form footers remain in place. The rollout report lists the covered program points and acceptance limits.
The cursor policy in ui_common.py, installed at application startup, replaces direct or inherited text-entry cursors on non-editable surfaces with the arrow cursor, including buttons, navigation, tabs, labels and read-only text views. Global text-cursor overrides are removed so individual widgets can display their appropriate cursor again. Text selection and copying remain available. Editable fields retain their text-entry cursor; changing read-only or enabled state updates the cursor. Link, hand, resize and wait cursors remain intact. The policy also covers subsequently opened dialogs and their text viewports.
Filters attach directly to widgets. The main window registers during construction; newly activated windows are attached through their own widget trees in a deferred callback. Background events are not filtered and Qt-wide widget registries are not traversed.
Ordinary interaction surfaces receive an explicit arrow cursor, reapplied on entry even when QWidget.cursor() already reports an arrow. This lets Qt update its native cursor representation again. Regression tests verify that repeated assignment and preserve special interaction cursors. Windows acceptance must also inspect the actual operating-system cursor: the screen-capture output used for diagnosis showed an arrow while Windows reported a text-entry cursor over buttons and the empty workspace. A passing offscreen test or the pointer drawn in a capture alone therefore does not establish a successful native correction.
Leasing actions use explicit semantic icon keys: Activate shows a play triangle inside a circle, End a finish flag, and Terminate early a calendar with a cancellation cross. Documents have a folded corner; invoice receipts have a serrated lower edge. Plus signs, chain links and repeat arrows distinguish adding, linking and recurring invoices. Costs/credits show coins with a plus sign. Open uses a document with an outgoing arrow; Export an arrow leaving a tray. Explicit icon keys survive language changes and overflow menus. Raster checks ensure distinct motifs at 100, 125 and 150 percent scaling.
Action definitions include a key, role, source label, tooltip source, icon motif and optional shortcut. Existing widgets can be explicitly assigned a role and adopted; business permissions are never inferred from labels at runtime. sharedActionRole, sharedActionBar, sharedFormFooter and destructiveAction supplement existing Administration properties and widget IDs.
Tests cover ordering, overflow, callbacks, license visibility, language switching, keyboard navigation and destruction of pending layout timers. Pilot workflows run against SQLite and an explicitly marked disposable PostgreSQL test host. Installed Enterprise acceptance inspects ribbons semantically and performs a settings Discard round trip without persisting configuration.