Skip to content

Conversation

@scenee
Copy link
Owner

@scenee scenee commented Jan 29, 2025

This patch fixes #658.

@scenee scenee merged commit 479cce4 into master Mar 7, 2025
19 checks passed
@scenee scenee deleted the iss-658 branch March 7, 2025 09:57
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

#BUG# initialScrollOffset causes incorrect scrollView behavior since version 2.8.0

2 participants