-
-
Notifications
You must be signed in to change notification settings - Fork 534
Reset initialScrollOffset after the attracting animation ends
#659
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sina-KH
added a commit
to mytonwalletorg/FloatingPanel
that referenced
this pull request
Apr 23, 2025
* Replace fatal errors in transitionDuration delegate methods (scenee#642) This PR modifies the transitionDuration(using:) method in FloatingPanelController to return 0.0 instead of calling fatalError when the FloatingPanelController instance is not found. This change is crucial for several reasons: 1. Avoiding Crashes in Production: Using fatalError in production can lead to unexpected crashes, which are detrimental to user experience. It's safer to return a default value like 0.0 and handle the scenario gracefully. 2. Improved Stability: By returning 0.0, the application can continue running, allowing for better stability and user satisfaction. This approach also aligns with the principle of fail-safety, where the system continues operating under error conditions. 3. Real-World Case: In our large-scale project, we encountered a crash at this specific point due to the fatalError. Given the size and complexity of our application, it has been challenging to pinpoint the exact cause. Switching to a return value of 0.0 would significantly help us mitigate the issue and maintain app stability while we investigate further. 4. Maintainability: Returning a default value makes the codebase more maintainable and easier to debug, as it avoids abrupt termination and allows for logging or other error handling mechanisms. * Version 2.8.5 * Fix doc comments' errors (scenee#644) * Fix doc comment errors in ObjC APIs * Improve doc comments in LayoutAnchoring.swift * Version 2.8.6 * Disallow interrupting the panel interaction while bouncing over the most expanded state (scenee#652) I decided to disallow interrupting panel interactions while bouncing over the most expanded state in order to fix the 2nd issue in scenee#633, scenee#633 (comment). * Reset `initialScrollOffset` after the attracting animation ends (scenee#659) * Stop pinning the scroll offset in moving programmatically * Add 'optional' string interpolation * Add comments * Add CoreTests.test_initial_scroll_offset_reset() * ci: remove macos-12 jobs for the deprecation * ci: name circleci jobs * ci: use Xcode 16.2 (scenee#653) * Added '--verbose' in cocoapods job * Fixed 'error: No simulator runtime version'. Some of the example apps cannot be built on github actions. > /Users/runner/work/FloatingPanel/FloatingPanel/Examples/Samples/Sources/Assets.xcassets: error: No simulator runtime version from [<DVTBuildVersion 21A342>, <DVTBuildVersion 21C62>, <DVTBuildVersion 21E213>, <DVTBuildVersion 21F79>, <DVTBuildVersion 22B81>] available to use with iphonesimulator SDK version <DVTBuildVersion 22C146> * Used macos-15 to fix random build fails * ci: use macos-15 for all testing to use Xcode 16.2 * Version 2.8.7 * Revert "Disallow interrupting the panel interaction while bouncing over the most expanded state (scenee#652)" This reverts commit b0fd0d4. This change had a problem normal cases. For example, in Maps example a panel interaction jumps occurs because of this. * Allow slight deviation when checking for anchor position. This change addresses the 2nd issue reported in scenee#633. The previous attempt in commit b0fd0d4 was intended to fix this, but it has a regression. This change resolves the issue without introducing any regressions. * Fix a miss spell * Address scenee#661 issue since v2.8.0 (scenee#662) See this comment for more details. scenee#661 (comment) * Version 2.8.8 * Fixed WKWebView scroll issues * Fixed scrolling issue when two scrollable content where pushed on each other and transition was not completed yet. * Prevent simultaniously scrolling the FloatingPanel in two directions. * Prevent unwanted scroll scenarios on NBS, if _innerScrollView should catch the panGesture. * Lock all the scroll-views on animations * Ignore small scroll-view touches and do NOT pass them to outer scroll-view. * Consider inner scroll-view as modal gesture handler scroll-view if it's with is larger than `parentWidth - 32` instead of `parentWidth` * Fixed unwanted scroll-view locks * Added passthroughView to let presented view controller pass touches to the previous view controller when view is totally hidden --------- Co-authored-by: Ivan Levin <100189059+LevinIvan@users.noreply.github.com> Co-authored-by: Shin Yamamoto <shin@scenee.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch fixes #658.