Skip to content
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

Replace FilePreviewScreen with InteractiveQuickLook. #1187

Merged
merged 2 commits into from
Jun 28, 2023

Conversation

pixlwave
Copy link
Member

@pixlwave pixlwave commented Jun 27, 2023

This PR updates media previews to work as expected in a messaging app.

  • The swipe down to dismiss gesture now works.
  • Presentation is full screen on iOS/iPadOS.
  • View hierarchy looks much better on macOS during presentation.

Note: The coordinator and view models have gone.

  • They didn't do very much anyway
  • The hosting view controller needed to be added as an overlay/background rather than a modal/fullscreen navigation.
  • This aligns very closely to the upcoming quickLookPreview(_:) in iOS 17.

What this PR doesn't do: Provide a frame/view for as a transition source for the presentation.

iPhone iPad
Simulator Screen Recording - iPhone 14 - 2023-06-27 at 18 21 05 Simulator Screen Recording - iPad Pro (11-inch) (4th generation) - 2023-06-27 at 18 18 48 copy

Mac

Screen.Recording.2023-06-27.at.6.25.30.pm.mov

@pixlwave pixlwave requested a review from a team as a code owner June 27, 2023 17:28
@pixlwave pixlwave requested review from alfogrillo and removed request for a team June 27, 2023 17:28
@pixlwave pixlwave force-pushed the doug/fullscreen-quicklook branch from afbd022 to 06e730b Compare June 27, 2023 17:29
@github-actions
Copy link

github-actions bot commented Jun 27, 2023

Warnings
⚠️ Some of the commits are missing ticket numbers. Please consider squashing all commits that don't have a tracking number.
⚠️ You seem to have made changes to views. Please consider adding screenshots.
⚠️

ElementX/Sources/Screens/RoomScreen/RoomScreenCoordinator.swift#L58 - SwiftLint rule 'cyclomatic_complexity' did not trigger a violation in the disabled region. Please remove the disable command. (superfluous_disable_command)

Generated by 🚫 Danger Swift against d2f016d

@pixlwave pixlwave requested a review from amshakal June 27, 2023 17:37
pixlwave added 2 commits June 28, 2023 08:46
- Allows full screen presentation.
- Allows dismiss gesture to work.
- Presentation looks much better on macOS.
@pixlwave pixlwave force-pushed the doug/fullscreen-quicklook branch from 06e730b to d2f016d Compare June 28, 2023 07:46
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Jun 28, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.10 ⚠️

Comparison is base (f54eb78) 41.95% compared to head (d2f016d) 41.86%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1187      +/-   ##
===========================================
- Coverage    41.95%   41.86%   -0.10%     
===========================================
  Files          403      404       +1     
  Lines        25522    25547      +25     
  Branches     13305    13304       -1     
===========================================
- Hits         10709    10694      -15     
- Misses       14518    14558      +40     
  Partials       295      295              
Flag Coverage Δ
unittests 23.40% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...Sources/FlowCoordinators/RoomFlowCoordinator.swift 46.42% <ø> (+1.17%) ⬆️
...reens/FilePreviewScreen/InteractiveQuickLook.swift 0.00% <0.00%> (ø)
...ces/Screens/RoomScreen/RoomScreenCoordinator.swift 46.51% <ø> (+2.06%) ⬆️
.../Sources/Screens/RoomScreen/RoomScreenModels.swift 56.25% <ø> (ø)
...urces/Screens/RoomScreen/RoomScreenViewModel.swift 43.73% <0.00%> (ø)
...X/Sources/Screens/RoomScreen/View/RoomScreen.swift 44.53% <0.00%> (-0.36%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@alfogrillo alfogrillo left a comment

Choose a reason for hiding this comment

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

LGTM
Very cool! 😎

@pixlwave pixlwave merged commit afbb0a8 into develop Jun 28, 2023
@pixlwave pixlwave deleted the doug/fullscreen-quicklook branch June 28, 2023 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants