Skip to content

Latest commit

 

History

History
72 lines (63 loc) · 3.3 KB

development.org

File metadata and controls

72 lines (63 loc) · 3.3 KB

Structure

Architecture

TODO: expand on this general outline

Components:

  • Form Generator
  • State Manager
  • API
  • Parser

Form generator

  • convert options “tree” and type spec into option selection heirarchy
  • create the appropriate forms for editing value based on type

State Manager

  • Connect user actions to form / data model changes
  • Record state changes to memory

API

  • read data from parser, convert into sensible data structures
  • write data

Parser

  • Language Server Protocol Client
  • rnix-parser handler and unsafeGetAttrPos evaluator

Files

(TODO: update)

  • load.sh: Build release.nix and store as parsable json.
  • api.py: Retrieve release option tree and query.
  • tree.py: Data structure for storing and querying option tree.
  • gui.py: Start nix-gui and load all components including the main functionality - the option tree explorer.
  • heirarchale_widgets.py: Widgets to recursively navigate the option tree structure via list-views and tab-views.
  • option_widgets.py: Render widgets for editing configuration based on the type of the option.
  • richtext.py: Helper to render rich text in QT.
  • icons/: Icons used in the GUI.

Edit Handling

Case: A field is edited

  • The field contents change, but nothing happens internally

Case: A field loses focus

  • A signal is sent to the status bar to display the change
  • A signal is sent to the parent to mark the change with an asterisk
  • A signal is sent to the backend to record the history of changes

Case: The type of a field changes

  • A signal

Related

Projects

Discussions

Inspiration

Credit

Thanks to the many #qt and #nixos users on libera.chat, and users of the NixOS Matrix server (#community:nixos.org) for answering a a myriad of questions about qt, nix, and nix-eval-lsp’s behavior.

Attribution

Icons are from https://publicdomainvectors.org/, wikimedia commons, https://svgrepo.com, and https://icon-icons.com/icon/Diff/132439