tomcl / issie

Issie - an intuitive cross-platform hardware design application. https://tomcl.github.io/issie
GNU General Public License v3.0
69 stars 96 forks source link

Contextual Sidebars Module, Grouping, Deterministic Colour Generation #454

Open timothycdc opened 4 months ago

timothycdc commented 4 months ago

Overview

Add functionality to set 'groups of symbols', used for HLP25. Also adds a deterministic colour generator for groups, using poisson-disk sampling for distantly-spaced colours that do not clash with existing UI colours.

This feature also introduces a UI library for a 'contextual sidebar' that can be programmatically called and accept user input via buttons or dialog, and modify the model in turn. One key example of a sidebar is the group selection sidebar, shown below.

Developer Mode

Contextual Sidebars

Group Selection Sidebar

Screenshots

image image image image image image image image image

Type Defs:

module SymbolT =
...
    /// Represents all the symbols and ports on the sheet
    type Model = {
     ...

        GroupMap: Map<GroupId, ComponentId list>
        GroupInfoMap: Map<GroupId, GroupInfo>
        GroupColourLookupMap : Map<ComponentId, string>
        }
    type GroupId = GroupId of string
    type GroupInfo = {
        Id: GroupId
        CreationDate: DateTime
        Colour: string
    }

Other notes/current issues: