Skip to content

Commit

Permalink
Refactor FXIOS-7451 [v120] Add building blocks docc (#16834)
Browse files Browse the repository at this point in the history
  • Loading branch information
lmarceau authored Oct 13, 2023
1 parent eccf89a commit d7c5d5d
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 10 deletions.
1 change: 0 additions & 1 deletion BrowserKit/Sources/ComponentLibrary/ActionButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import UIKit

// A convenience button class to add a closure as an action on a button instead of a selector
public class ActionButton: ResizableButton {
public var touchUpAction: ((UIButton) -> Void)? {
didSet {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@

import UIKit

/// This class is a button that enables resizing with dynamic type
/// This is a building block component for developement purpose, and isn't the designer component in itself.
/// See `RoundedButton` for the designer button component (to be done with FXIOS-6948 #15441)
open class ResizableButton: UIButton {
public struct UX {
public static let buttonEdgeSpacing: CGFloat = 8
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ``ComponentLibrary/ActionButton``

TODO with FXIOS-7451
A convenience button class to add a closure as an action on a button instead of a selector.

## Overview

TODO with FXIOS-7451
The `ActionButton` is a subclass of the `ResizableButton`. The purpose of this class is only to be able to use a closure as an action, which is sometimes more conveniant than having a selector.
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# ``ComponentLibrary/FadeScrollView``

TODO with FXIOS-7451
A scroll view that adds a fade at top or bottom when it scroll to indicate more content is available to user.

## Overview

TODO with FXIOS-7451
The `FadeScrollView` is a subclass of the `UIScrollView`. This scroll view adds a gradient layer either at it's top, bottom or both depending of how much content there is to scroll. This indicates to the users that more content is available. This can be particularly useful with dynamic type since content often overflow with bigger font sizes. There is no configuration to be made to this scroll view, you can use it as an ordinary one.

## Illustration

> This image are illustrative only. For precise examples of iOS implementation, please run the SampleApplication.
![The FadeScrollView on iOS](FadeScrollView)
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# ``ComponentLibrary/ResizableButton``

TODO with FXIOS-7451
This class is a button that enables resizing with dynamic type.

## Overview

TODO with FXIOS-7451
The `ActionButton` is a subclass of the `UIButton` which enables resizing with dynamic type. This is a building block component for developement purpose, and isn't the designer component in itself. See ``PrimaryRoundedButton`` and ``SecondaryRoundedButton`` for the designer button components. The `buttonEdgeSpacing` shouldn't normally be adjusted and be kept as is.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class FadeScrollViewViewController: UIViewController, Themeable {
// MARK: Themeable

func applyTheme() {
contentLabel.textColor = themeManager.currentTheme.colors.textPrimary
view.backgroundColor = themeManager.currentTheme.colors.layer1
}
}

0 comments on commit d7c5d5d

Please sign in to comment.