Skip to content

improve(desktop): improve window state management #1868

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 10, 2025
Merged

Conversation

Red-Asuka
Copy link
Member

PR Checklist

If you have any questions, you can refer to the Contributing Guide

What is the current behavior?

  • Window width and height are recorded in a database table.
  • Only window size can be restored, but position and fullscreen status cannot be recovered.

What is the new behavior?

  • Use store to record window dimensions.
  • Add boundary check to ensure the window is within a visible area.
  • Record fullscreen status.

Please describe the new behavior or provide screenshots.

Does this PR introduce a breaking change?

  • Yes
  • No

Specific Instructions

Are there any specific instructions or things that should be known prior to review?

Other information

@Red-Asuka Red-Asuka added refactor Refactor code or architecture desktop MQTTX Desktop labels Feb 10, 2025
@Red-Asuka Red-Asuka added this to the v2.0.0-alpha.1 milestone Feb 10, 2025
@Red-Asuka Red-Asuka requested a review from ysfscream February 10, 2025 07:58
@Red-Asuka Red-Asuka self-assigned this Feb 10, 2025
Comment on lines +16 to +19
width: 1025,
height: 749,
minHeight: 650,
minWidth: 997,
Copy link
Member

@ysfscream ysfscream Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move the defaultWindowSize to a centralized constants file to improve project maintainability and consistency? This would make it easier to update and reuse window size configurations.

@ysfscream ysfscream merged commit 708f0f4 into dev/2.0.0 Feb 10, 2025
5 checks passed
@ysfscream ysfscream deleted the lyd/2.0.0 branch February 10, 2025 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
desktop MQTTX Desktop refactor Refactor code or architecture
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants