ICRAR / EAGLE

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

Eagle 1301 #739

Closed M-Wicenec closed 1 month ago

M-Wicenec commented 1 month ago

storing right window mode, right and left window visibility as a hidden setting. this means these ui items will continue as you left off when you reload the page.

each of these ui elements are now also using and referencing the setting directly, this means i was able to remove some code from the SideWindow class.

Summary by Sourcery

Persist window mode and visibility settings for the right and left windows, allowing them to maintain their state across page reloads. Refactor the SideWindow class to utilize settings for managing window visibility, removing redundant code.

Enhancements:

sourcery-ai[bot] commented 1 month ago

Reviewer's Guide by Sourcery

This pull request implements persistent UI state for the left and right windows in the Eagle application. It stores the visibility and mode of these windows as hidden settings, allowing the UI to maintain its state across page reloads. The changes also refactor the code to use these settings directly, removing some redundant code from the SideWindow class.

File-Level Changes

Change Details Files
Implement persistent UI state for left and right windows
  • Add new settings for window visibility and mode
  • Refactor SideWindow class to use new settings
  • Update Eagle class to use new settings for window state
  • Modify HTML template to bind to new settings
  • Update KeyboardShortcut handlers to use new window toggle methods
src/Eagle.ts
src/SideWindow.ts
templates/base.html
src/KeyboardShortcut.ts
src/Setting.ts
src/Utils.ts
Refactor window visibility toggling logic
  • Create new static methods in SideWindow class for toggling visibility
  • Update Eagle class to use new SideWindow methods
  • Modify HTML template to use new toggle methods
src/SideWindow.ts
src/Eagle.ts
templates/base.html
Improve transition effect for window toggling
  • Add !important flag to linearTransition250 CSS class
  • Implement toggleTransition method in SideWindow class
static/base.css
src/SideWindow.ts

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.