-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Add hotkey to reset app scale #5386
Conversation
A question I do have is whether I should be writing tests for this. I couldn't find any tests that were checking the scaling up or down, so I didn't add a test for resetting the scale. I'm willing to write some tests for scaling and resetting said scale if you feel it's needed to write tests for this |
It would be great if you could add both tests. |
Alright! I'll start looking into writing some tests. I converted the PR to draft for now. |
Hi, @Trapiz. Do you need any help? I can add a sample for your reference. |
I have looked into writing integration tests for this, but ran into the issue that the But maybe you have a completely different approach/idea and I would love to see the sample! |
Hi @LucasXu0, a quick follow-up to the comment above, I have looked into writing some unit tests but quickly realized that this would not really be possible. There are really no standalone components to test, and as far as I know, no possibility to trigger key presses either. I feel like with the way that integration tests are currently set up, it's not possible to test this with our current implementation. Do you have any ideas on how to proceed? |
@Trapiz Let me see if I can do that. You're right. IntegrationTestWidgetsFlutterBuilder will conflict with ScaledWidgetsFlutterBinding. It seems there's no easy way to test the scale feature. |
It's the same with unit test, except it's one of two bindings |
* main: (25 commits) fix: sidebar issues (AppFlowy-IO#5444) fix: notification test (AppFlowy-IO#5440) fix: some list icons don't align with the paragraph (AppFlowy-IO#5439) feat: integrate show notification button option (AppFlowy-IO#5302) feat: add border to selected unsplash image (AppFlowy-IO#5428) feat: sidebar UI Revamp on mobile (AppFlowy-IO#5418) chore: update German translations with Fink 🐦 (AppFlowy-IO#5421) chore: update Spanish translations (AppFlowy-IO#5205) feat: video block support (AppFlowy-IO#5199) feat: add reset app scale hotkey (AppFlowy-IO#5386) fix: sidebar issues on Windows and Linux (AppFlowy-IO#5431) feat: support web layout setting and breadcrumbs (AppFlowy-IO#5425) fix: dragging the Unsplash cover triggers an assertion error (AppFlowy-IO#5404) chore: improve hover and text colors in dark mode (AppFlowy-IO#5416) fix: accept multi-key combination for customizing shortcuts & removes duplicates (AppFlowy-IO#5414) feat: sidebar UI Revamp on Desktop (AppFlowy-IO#5343) fix: default text direction not synced (AppFlowy-IO#5405) chore: update German translations (AppFlowy-IO#5382) feat: support preview grid/board/calendar block on web (AppFlowy-IO#5401) feat: support open row page (AppFlowy-IO#5400) ...
Use the Ctrl+0 or Meta+0 shortcut to reset the app scale to 1
Scale.demo.webm
Feature Preview
implements
PR Checklist