                 return
             }
             
-            self.displayMode = .partial
             self.calculateLayout(in: viewController)
         }
         

        }
        
        let keyboardHeight = newKeyboardFrame?.height ?? viewController.keyboardFrame?.height ?? 0
        let viewHeight = newViewSize?.height ?? viewController.view.bounds.height
        
        contentViewBottomConstraint?.constant = keyboardHeight
        
        guard !shouldAlwaysPinToTop(newViewSize: newViewSize) else {
            displayMode = .full
            containerViewTopConstraint?.constant = containerPinnedTopSpacing
            return
        }
        
        switch displayMode {
        case .full:
            containerViewTopConstraint?.constant = containerPinnedTopSpacing
        case .partial:
            containerViewTopConstraint?.constant = viewHeight * (0.40)
        }
    }
    

        self.contentView = contentView
    }
    
    private func shouldAlwaysPinToTop() -> Bool {
        
        guard let viewController = viewController else {
            return false
        }
        
        return viewController.view.traitCollection.verticalSizeClass == .compact
    }
    
    @objc fileprivate func userDidPanContainerView(_ gestureRecognizer: UIPanGestureRecognizer) {
