Skip to content

Fix modal dismiss table truncation - #40

Merged
futamura merged 1 commit into
developfrom
fix/modal-truncation-dismiss
May 25, 2026
Merged

Fix modal dismiss table truncation#40
futamura merged 1 commit into
developfrom
fix/modal-truncation-dismiss

Conversation

@futamura

Copy link
Copy Markdown
Owner

Summary

  • constrain example table cell label widths to the dismiss target width so trailing truncation remains visible during fluid dismiss
  • apply the dismiss-width layout pass to navigation and transition table examples during animated and interactive dismiss progress
  • add focused regression coverage for table-cell truncation and the NavigationFluidFullScreen dismiss flow

Verification

  • RED: xcodebuild build-for-testing -project Fluidable.xcodeproj -scheme FluidableExample -destination 'platform=iOS Simulator,name=iPhone 17' failed with TableCell has no member 'layoutTextLabels'
  • xcodebuild test -project Fluidable.xcodeproj -scheme FluidableExample -destination 'platform=iOS Simulator,name=iPhone 17' -only-testing:FluidableUITests/FluidModalTableDismissalLayoutTests
  • xcodebuild test -project Fluidable.xcodeproj -scheme FluidableExample -destination 'platform=iOS Simulator,name=iPhone 17' -only-testing:FluidableUITests/NavigationFluidFullScreenDismissUITests/testFinishAnimatedDismissWithTableContent
  • swiftlint lint Example/Source/Control/NavigationTableViewController.swift Example/Source/Control/TransitionTableViewController.swift Example/Source/View/TableCell.swift Example/Source/View/TableView.swift Example/Source/View/HeaderCell.swift Example/Source/Helper/Extensions.swift UITests/MainSpec.swift
  • git diff --check
  • User verified the dismiss animation behavior OK

})
animators.append(constraintAnimator)
/* NOTE: Table cell layout (UIViewPropertyAnimator) */
let cellLayoutAnimator: FluidPropertyAnimator = .init(duration: duration, easing: easing, id: "cellLayoutAnimator (Dismiss)")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Line Length Violation: Line should be 120 characters or less: currently 133 characters (line_length)

})
animators.append(constraintAnimator)
/* NOTE: Table cell layout (UIViewPropertyAnimator) */
let cellLayoutAnimator: FluidPropertyAnimator = .init(duration: duration, easing: easing, id: "cellLayoutAnimator (Dismiss)")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Line Length Violation: Line should be 120 characters or less: currently 133 characters (line_length)

Comment thread UITests/MainSpec.swift
let navigation = UINib(nibName: "NavigationRootNavigationController", bundle: bundle)
.instantiate(withOwner: nil, options: nil).first as! NavigationRootNavigationController
let destination = UINib(nibName: "NavigationTableViewController", bundle: bundle)
.instantiate(withOwner: nil, options: nil).first as! NavigationTableViewController

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Force Cast Violation: Force casts should be avoided. (force_cast)

Comment thread UITests/MainSpec.swift
let model: RootModel = .navigationFluidFullScreen
let bundle = Bundle(for: FluidModalTableDismissalLayoutTests.self)
let navigation = UINib(nibName: "NavigationRootNavigationController", bundle: bundle)
.instantiate(withOwner: nil, options: nil).first as! NavigationRootNavigationController

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Force Cast Violation: Force casts should be avoided. (force_cast)

Comment thread UITests/MainSpec.swift
func testConstrainsTableCellLabelsToDismissTargetWidth() {
let bundle = Bundle(for: FluidModalTableDismissalLayoutTests.self)
let cell = UINib(nibName: "TableCell", bundle: bundle)
.instantiate(withOwner: nil, options: nil).first as! TableCell

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Force Cast Violation: Force casts should be avoided. (force_cast)

@futamura
futamura merged commit c898005 into develop May 25, 2026
2 checks passed
@futamura
futamura deleted the fix/modal-truncation-dismiss branch May 25, 2026 07:01
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.

1 participant