WIP: Clean up the outline view #16

Closed
Vectornaut wants to merge 29 commits from outline-cleanup into main
Collaborator

Clean up the source code and interface of the outline view. In addition, fix a bug that could cause Assembly::realize to react to itself under certain circumstances. Those circumstances arose, making the bug noticeable, while this branch was being written.

Source code

  • Modularize the Outline component into smaller components.
  • Switch from static iteration to dynamic Sycamore lists. This reduces the amount of re-rendering that happens when an element or constraint changes. It also allows constraint details to stay open or closed during constraint updates, rather than resetting to closed.

Interface

  • Make constraints editable, updating the assembly realization on input. Flag constraints where the Lorentz product value doesn't parse.
  • Round element vector coordinates to prevent the displayed strings from overlapping.
Clean up the source code and interface of the outline view. In addition, [fix a bug](commit/6e42681b719d7ec97c4225ca321225979bf87b56) that could cause `Assembly::realize` to react to itself under certain circumstances. Those circumstances arose, making the bug noticeable, while this branch was being written. #### Source code - Modularize the `Outline` component into smaller components. - Switch from static iteration to dynamic Sycamore lists. This reduces the amount of re-rendering that happens when an element or constraint changes. It also allows constraint details to stay open or closed during constraint updates, rather than resetting to closed. #### Interface - Make constraints editable, updating the assembly realization on input. Flag constraints where the Lorentz product value doesn't parse. - Round element vector coordinates to prevent the displayed strings from overlapping.
Vectornaut added 29 commits 2024-11-07 23:01:48 +00:00
Validate with the process inspection example tests, which print out
their results and optimization histories when run one at a time in
`--nocapture` mode.
In the process, notice that the tolerance scale adjustment was ported
wrong, and correct it.
Sycamore probably has a better way to do this, but this way works for
now.
Setting `bind:value` or `bind:valueAsNumber` for a number input seems to
restrict what you can type in it. We work around this by switching to
text inputs for now. We should probably switch back to number inputs if
we can, though, because they let us take advantage of the browser's
parsing and validation.
This should help the interface look more consistent across platforms.
The font choices are just placeholders: consistency is the main goal.
Previously, `realize` both tracked and updated the element vectors, so
calling it in a reactive context could start a feedback loop.
It has tabular numbers, and it's nice and big too.
Author
Collaborator

Marking this as WIP until I make these changes, which came up during review of pull request #15:

  • Make Element::index private, as discussed here
  • Use the new ElementKey, ConstraintKey, and ElementColor type aliases where possible
    • For example, in the Element constructor
Marking this as WIP until I make these changes, which came up during review of pull request #15: - Make `Element::index` private, as discussed [here](pulls/15#issuecomment-1816) - Use the new `ElementKey`, `ConstraintKey`, and `ElementColor` type aliases where possible - For example, in the `Element` constructor
Vectornaut changed title from Clean up the outline view to WIP: Clean up the outline view 2024-11-11 08:15:51 +00:00
Author
Collaborator

The main branch has diverged from the branch to be merged because of the changes we made to while reviewing #15. Those changes have been incorporated in #19, which supersedes this pull request.

The main branch has diverged from the branch to be merged because of the changes we made to while reviewing #15. Those changes have been incorporated in #19, which supersedes this pull request.
Vectornaut closed this pull request 2024-11-13 08:02:00 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: glen/dyna3#16
No description provided.