ICRAR / EAGLE

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

Eagle 1300 #748

Closed M-Wicenec closed 1 month ago

M-Wicenec commented 1 month ago

Summary by Sourcery

Refactor the window management system to include a new bottom window, enhancing the UI's flexibility and functionality. Update the UI elements and tests to align with the new window structure and naming conventions.

New Features:

Enhancements:

Tests:

sourcery-ai[bot] commented 1 month ago

Reviewer's Guide by Sourcery

This pull request implements significant changes to the user interface and functionality of the EAGLE application. The main focus is on restructuring the layout to include a new bottom window, refactoring the parameter table and graph configurations table into this new window, and updating various UI components and their interactions. The changes also include modifications to keyboard shortcuts, error handling, and overall application structure.

User journey diagram for the new bottom window integration

journey
    title User Journey for Bottom Window Integration
    section Initial State
      User: Open application
    section Interacting with Windows
      User: Toggle left window
      User: Toggle right window
      User: Toggle bottom window
    section Using Bottom Window
      User: Open Parameter Table
      User: Open Graph Configurations Table
      User: View Graph Errors
    section Closing
      User: Close bottom window
      User: Exit application

Updated class diagram for SideWindow

classDiagram
    class SideWindow {
        -ko.Observable~number~ width
        +ko.Observable~number~ size
        +ko.Observable~boolean~ adjusting
        +SideWindow(size: number)
        +static toggleShown(window: string): void
        +static setShown(window: string, value: boolean): void
        +static toggleTransition(): void
        +static rightWindowAdjustStart(eagle: Eagle, event: JQuery.TriggeredEvent): boolean
        +static leftWindowAdjustStart(eagle: Eagle, event: JQuery.TriggeredEvent): boolean
        +static bottomWindowAdjustStart(eagle: Eagle, event: JQuery.TriggeredEvent): boolean
        +static sideWindowAdjustEnd(eagle: Eagle, event: JQuery.TriggeredEvent): boolean
    }

Updated class diagram for Eagle

classDiagram
    class Eagle {
        +ko.Observable~SideWindow~ leftWindow
        +ko.Observable~SideWindow~ rightWindow
        +ko.Observable~SideWindow~ bottomWindow
        +toggleWindows(): void
        +changeRightWindowMode(requestedMode: Eagle.RightWindowMode): void
        +static BottomWindowMode
    }
    Eagle : +BottomWindowMode None
    Eagle : +BottomWindowMode ParameterTable
    Eagle : +BottomWindowMode GraphConfigsTable
    Eagle : +BottomWindowMode GraphConfigAttributesTable
    Eagle : +BottomWindowMode GraphErrors

File-Level Changes

Change Details Files
Added a new bottom window to the application layout
  • Implemented a new bottom window component with tabs for different views
  • Moved the parameter table, graph configurations table, and error display into the bottom window
  • Added new CSS styles to support the bottom window layout
  • Updated existing components to work with the new bottom window
src/SideWindow.ts
static/base.css
templates/base.html
Refactored the parameter table and graph configurations table
  • Moved parameter table and graph configurations table from modal dialogs to the new bottom window
  • Updated the structure and styling of these tables to fit the new layout
  • Modified related functions and event handlers to work with the new table locations
src/ParameterTable.ts
src/GraphConfigurationsTable.ts
templates/parameter_table.html
templates/graph_configurations_table.html
Updated error handling and display
  • Moved error display from a modal to the bottom window
  • Updated error-related functions and UI components
  • Modified the structure of error display to fit the new layout
src/Eagle.ts
src/Utils.ts
templates/Errors.html
Modified application settings and configuration
  • Added new settings for bottom window visibility, size, and mode
  • Updated existing settings related to left and right windows
  • Modified configuration handling for the new layout
src/Setting.ts
src/Eagle.ts
src/Utils.ts
Updated keyboard shortcuts and UI interactions
  • Modified existing keyboard shortcuts to work with the new layout
  • Updated UI interaction handlers for the new bottom window and refactored components
  • Changed some shortcut keys and their associated actions
src/KeyboardShortcut.ts
src/Eagle.ts
src/ParameterTable.ts
Refactored and updated CSS styles
  • Added new styles for the bottom window and its components
  • Updated existing styles to accommodate the new layout
  • Modified styles for tables, buttons, and other UI elements
static/base.css
static/tables.css
Updated file structure and organization
  • Moved some HTML templates from the modals folder to the root templates folder
  • Deleted unused modal template files
  • Updated import statements and file references throughout the project
templates/base.html
src/main.ts
src/Modals.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).