ICRAR / EAGLE

Editor for the Astronomical Graph Language Environment
GNU Lesser General Public License v3.0
0 stars 1 forks source link

Eagle 1324 #768

Closed M-Wicenec closed 4 days ago

M-Wicenec commented 1 week ago

ive schrunk the size of data nodes in the graph

there is also a lot of unused/ old code that ive removed

additionally ive removed some of the variable that were being saved in graphs unnecessarily that ive removed from there as well.

Summary by Sourcery

Shrink the size of data nodes in the graph and clean up unused code related to node collapsing and radius settings.

Enhancements:

Chores:

sourcery-ai[bot] commented 1 week ago

Reviewer's Guide by Sourcery

This PR focuses on optimizing node display in the graph by removing the collapse/expand functionality and implementing a new sizing system for data nodes. The changes include removing unused code related to node collapsing and header offsets, while introducing a smaller fixed size for data nodes.

Updated class diagram for the Node class

classDiagram
    class Node {
        - expanded : ko.Observable<boolean>
        - keepExpanded : ko.Observable<boolean>
        - peek : ko.Observable<boolean>
        - color : ko.Observable<string>
        - drawOrderHint : ko.Observable<number>
        - radius : ko.Observable<number>
        + Node(category: string)
        + getId() NodeId
        + isData() boolean
        + isBranch() boolean
        + isGroup() boolean
        + isStreaming() boolean
        + reset()
        + getGitHTML() ko.PureComputed<string>
    }
    note for Node "Removed collapsed related attributes and methods"
    note for Node "Introduced conditional radius setting based on node type"

File-Level Changes

Change Details Files
Removed node collapse/expand functionality
  • Removed collapsed observable property
  • Removed all collapse-related methods (isCollapsed, setCollapsed, toggleCollapsed)
  • Removed collapse-related UI buttons and keyboard shortcuts
  • Removed getDisplayRadius method that was used for collapse calculations
src/Node.ts
src/Eagle.ts
src/KeyboardShortcut.ts
templates/navbar.html
Implemented new node sizing system
  • Added DATA_NODE_RADIUS constant with smaller size (18px)
  • Modified node radius initialization based on node type
  • Updated icon size for data nodes to 55px
  • Removed dynamic size calculations based on width/height
src/EagleConfig.ts
src/Node.ts
templates/basic_node.html
Cleaned up category data structure
  • Removed collapsedHeaderOffsetY and expandedHeaderOffsetY properties
  • Removed header offset values from all category definitions
src/Category.ts
src/CategoryData.ts

Tips and commands #### Interacting with Sourcery - **Trigger a new review:** Comment `@sourcery-ai review` on the pull request. - **Continue discussions:** Reply directly to Sourcery's review comments. - **Generate a GitHub issue from a review comment:** Ask Sourcery to create an issue from a review comment by replying to it. - **Generate a pull request title:** Write `@sourcery-ai` anywhere in the pull request title to generate a title at any time. - **Generate a pull request summary:** Write `@sourcery-ai summary` anywhere in the pull request body to generate a PR summary at any time. You can also use this command to specify where the summary should be inserted. #### Customizing Your Experience Access your [dashboard](https://app.sourcery.ai) to: - Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others. - Change the review language. - Add, remove or edit custom review instructions. - Adjust other review settings. #### Getting Help - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).