Skip to content

Tracking Issue: Instances tables #1834

Closed
Closed

Description

@Keavon

Initial

type GraphicElement = VectorData | GraphicGroup;

struct VectorData {
    transform: DAffine2,
}

struct GraphicGroup {
    transform: DAffine2,
    elements: Vec<GraphicElement>,
}

Wrapped in table

type GraphicElement = VectorDataTable | GraphicGroupTable;

struct VectorData {
    // transform has been moved to the table
}
type VectorDataTable = struct Instances<VectorData> {
    transform: Vec<DAffine2>, // count = 1
    instance: Vec<VectorData>, // count = 1
}

struct GraphicGroup {
    // transform has been moved to the table, but not up to the parent group
    elements: Vec<GraphicElement>,
}
type GraphicGroupTable = struct Instances<GraphicGroup> {
    transform: Vec<DAffine2>, // count = 1, parent to all in self.instance[0].elements
    instance: Vec<GraphicGroup>, // count = 1
}

(Inlined GraphicGroup)

type GraphicElement = VectorDataTable | GraphicGroupTable;

struct VectorData {
    // transform has been moved to the table
}
type VectorDataTable = struct Instances<VectorData> {
    transform: Vec<DAffine2>, // count = 1
    instance: Vec<VectorData>, // count = 1
}

type GraphicGroupTable = struct Instances<Vec<GraphicElement>> {
    transform: Vec<DAffine2>, // count = 1, parent to all in self.instance[0]
    instance: Vec<Vec<GraphicElement>>, // count = 1
}
// Document root
// ├─ Top folder
// │  ├─ Inner vector 1
// │  └─ Inner vector 2
// └─ Top vector

// Document root
GraphicGroupTable {
    transform: vec![ // count = 1
        DAffine2::IDENTITY,
    ],
    instance: vec![ // count = 1
        vec![
            // Top folder
            GraphicGroupTable {
                transform: vec![ // count = 1
                    DAffine2::TOP_FOLDER,
                ],
                instance: vec![ // count = 1
                    vec![
                        // Inner vector 1
                        VectorDataTable {
                            transform: vec![ // count = 1
                                DAffine2::INNER_VECTOR_1,
                            ],
                            instance: vec![ // count = 1
                                VectorData {},
                            ],
                        },
                        // Inner vector 2
                        VectorDataTable {
                            transform: vec![ // count = 1
                                DAffine2::INNER_VECTOR_2,
                            ],
                            instance: vec![ // count = 1
                                VectorData {},
                            ],
                        },
                    ],
                ],
            },
            // Top vector
            VectorDataTable {
                transform: vec![ // count = 1
                    DAffine2::TOP_VECTOR,
                ],
                instance: vec![ // count = 1
                    VectorData {},
                ],
            },
        ],
    ],
}

Flattened GraphicGroup with transform moved to parent

type GraphicElement = VectorDataTable | GraphicGroupTable;

struct VectorData {
    // transform has been moved to the table
}
type VectorDataTable = struct Instances<VectorData> {
    transform: Vec<DAffine2>, // count = 1
    instance: Vec<VectorData>, // count = 1
}

type GraphicGroupTable = struct Instances<GraphicElement> {
    transform: Vec<DAffine2>, // parent to its corresponding element in self.instance
    instance: Vec<GraphicElement>,
}
// Document root
// ├─ Top folder
// │  ├─ Inner vector 1
// │  └─ Inner vector 2
// └─ Top vector

// Document root
GraphicGroupTable {
    transform: vec![
        DAffine2::TOP_FOLDER,
        DAffine2::TOP_VECTOR,
    ],
    instance: vec![
        // Top folder
        GraphicGroupTable {
            transform: vec![
                DAffine2::IDENTITY, // from the Merge layer node
                DAffine2::IDENTITY, // from the Merge layer node
            ],
            instance: vec![
                // Inner vector 1
                VectorDataTable {
                    transform: vec![ // count = 1
                        DAffine2::INNER_VECTOR_1,
                    ],
                    instance: vec![ // count = 1
                        VectorData {},
                    ],
                },
                // Inner vector 2
                VectorDataTable {
                    transform: vec![ // count = 1
                        DAffine2::INNER_VECTOR_2,
                    ],
                    instance: vec![ // count = 1
                        VectorData {},
                    ],
                },
            ],
        },
        // Top vector
        VectorDataTable {
            transform: vec![ // count = 1
                DAffine2::IDENTITY,
            ],
            instance: vec![ // count = 1
                VectorData {},
            ],
        },
    ],
}

Activity

  1. changed the title [-]Refactor GraphicGroup to become the Element domain[/-] [+]Refactor GraphicGroup to become the Element table[/+] on Sep 23, 2024
  2. changed the title [-]Refactor GraphicGroup to become the Element table[/-] [+]Refactor graphical data to use the Instances table[/+] on Jan 26, 2025
  3. changed the title [-]Refactor graphical data to use the Instances table[/-] [+]Refactor graphical data to use the Instances table and move transforms/alpha_blending up a scope[/+] on Jan 26, 2025
  4. changed the title [-]Refactor graphical data to use the Instances table and move transforms/alpha_blending up a scope[/-] [+]Tracking Issue: Refactor graphical data to use the Instances table and move transforms/alpha_blending up a scope[/+] on Jan 26, 2025
  5. changed the title [-]Tracking Issue: Refactor graphical data to use the Instances table and move transforms/alpha_blending up a scope[/-] [+]Tracking Issue: Instances table and moving transforms/alpha_blending up a scope[/+] on Jan 26, 2025
  6. moved this from Short-Term to Ongoing Projects in Task Boardon Feb 13, 2025
  7. 6 remaining items

  8. moved this from Ongoing Projects to Completed This Milestone in Task Boardon Jun 7, 2025
  9. reopened this on Jun 7, 2025
  10. moved this from Completed This Milestone to Short-Term in Task Boardon Jun 7, 2025
  11. moved this from Short-Term to Ongoing Projects in Task Boardon Jun 7, 2025
  12. moved this from Ongoing Projects to Completed This Milestone in Task Boardon Aug 3, 2025
  13. 0HyperCube commented on Aug 3, 2025

    @0HyperCube
    Contributor

    This is by no means done as it doesn't really work e.g. selecting or modifying rows other than the first one or all of them are impossible. It also breaks the tooling.

  14. moved this from Completed This Milestone to Short-Term in Task Boardon Aug 3, 2025
  15. Keavon commented on Aug 3, 2025

    @Keavon
    MemberAuthor

    Those are larger features tracked in this issue's parent. This is the MVP and its step-by-step plan is completed. The follow-on work that you mentioned is tracked in the parent.

  16. moved this from Short-Term to Completed This Milestone in Task Boardon Aug 3, 2025
  17. added this to the Milestone 51 milestone on Sep 1, 2025
  18. changed the issue type fromtoon Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ArchitectureInvolves architecture or engineering work or discussion

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions