Skip to content

Commit 17a93e5

Browse files
authored
Refactor FXIOS-11567 [DocC] Updates to CI and Xcode for building docs (#24795)
1 parent 47beb82 commit 17a93e5

16 files changed

+40
-36
lines changed
+15-11
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
name: Deploy Docc
22
on:
3-
# Runs on pushes where BrowserKit files are modified
3+
workflow_dispatch: # Allow manual runs
44
push:
5-
paths:
5+
branches:
6+
- main
7+
paths: # Only runs on changes to BrowserKit files
68
- BrowserKit/Sources/ComponentLibrary/**
7-
workflow_dispatch: {} # adding the workflow_dispatch so it can be triggered manually
9+
- .github/workflows/firefox-ios-publish-docc.yml
810

911
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1012
permissions:
@@ -14,7 +16,7 @@ permissions:
1416

1517
# Allow one concurrent deployment
1618
concurrency:
17-
group: "pages"
19+
group: github-pages
1820
cancel-in-progress: true
1921

2022
jobs:
@@ -24,12 +26,15 @@ jobs:
2426
# Must be set to this for deploying to GitHub Pages
2527
name: github-pages
2628
url: ${{ steps.deployment.outputs.page_url }}
27-
runs-on: macos-13
29+
runs-on: macos-15
30+
env:
31+
XCODE: '16.2'
2832
steps:
29-
- uses: maxim-lobanov/setup-xcode@v1
33+
- name: Switch to Xcode ${{env.XCODE}}
34+
uses: maxim-lobanov/setup-xcode@v1
3035
with:
31-
xcode-version: '15.0'
32-
- name: Checkout 🛎️
36+
xcode-version: ${{env.XCODE}}
37+
- name: Checkout
3338
uses: actions/checkout@v4
3439
- name: Build DocC
3540
run: |
@@ -42,12 +47,11 @@ jobs:
4247
--hosting-base-path "firefox-ios" \
4348
--output-path docs;
4449
echo "<script>window.location.href += \"/documentation/componentlibrary\"</script>" > docs/index.html;
45-
echo "Building DocC step done"
4650
- name: Upload artifact
47-
uses: actions/upload-pages-artifact@v1
51+
uses: actions/upload-pages-artifact@v3
4852
with:
4953
# Upload only docs directory
5054
path: 'docs'
5155
- name: Deploy to GitHub Pages
5256
id: deployment
53-
uses: actions/deploy-pages@v1
57+
uses: actions/deploy-pages@v4

.github/workflows/focus-ios-l10n-screenshots.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
group2: ${{ steps.my_locales.outputs.group2 }}
2020
group3: ${{ steps.my_locales.outputs.group3 }}
2121
steps:
22-
- name: Clone firefoxios-l01n repo
22+
- name: Clone firefoxios-l10n repo
2323
uses: actions/checkout@v4
2424
with:
2525
repository: mozilla-l10n/firefoxios-l10n
@@ -98,4 +98,4 @@ jobs:
9898
name: FocusL10nScreenshots
9999
pattern: Screenshots-*
100100
delete-merged: true
101-
retention-days: 14
101+
retention-days: 14

BrowserKit/Sources/ComponentLibrary/Documentation.docc/General Components/ActionFooterView.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# ``ComponentLibrary/ActionFooterView``
22

3-
A view which is used to contain footer information in form of a title and a link button.
3+
A view which is used to contain footer information in the form of a title and a link button.
44

55
## Overview
66

7-
The `ActionFooterView` is a subclass of the `UIView`. You should configure the action footer view content, accessibility identifiers and on tap action through it's view model ``ActionFooterViewModel``.
7+
`ActionFooterView` is a subclass of `UIView`. You should configure the action footer view content, accessibility identifiers, and on tap action through its view model ``ActionFooterViewModel``.
88

99
## Illustration
1010

BrowserKit/Sources/ComponentLibrary/Documentation.docc/General Components/BottomSheetViewController.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# ``ComponentLibrary/BottomSheetViewController``
22

3-
The bottom sheet is a modal view presented from the bottom as a pop over.
3+
The bottom sheet is a modal view presented from the bottom of the screen as a popover.
44

55
## Overview
66

7-
The `BottomSheetViewController` is a subclass of the `UIViewController`. The bottom sheet content is another view controller embedded inside this parent view controller. The bottom sheet itself is shown as a popover, meaning it's type of modal. Bottom sheet can be dismissed from the close button, by doing a swipe gesture or by clicking outside the sheet itself. Those properties can be configured with it's view model ``BottomSheetViewModel``.
7+
`BottomSheetViewController` is a subclass of `UIViewController`. The bottom sheet content is another view controller embedded within this parent view controller. The bottom sheet itself is displayed as a popover, making it a type of modal. It can be dismissed by tapping the close button, performing a swipe gesture, or clicking outside the sheet. These properties can be configured using its view model ``BottomSheetViewModel``.
88

99
## Illustration
1010

BrowserKit/Sources/ComponentLibrary/Documentation.docc/General Components/CardView.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# ``ComponentLibrary/CardView``
22

3-
The card view which is used to contain different type of content.
3+
The card view which is used to contain different types of content.
44

55
## Overview
66

7-
The `CardView` is a subclass of the `UIView`. You should configure the card view content, accessibility identifier and background color through it's view model ``CardViewModel``. The rounded corners and padding around the content of the view shouldn't be adjusted and should be used as is. For a card that has shadow, please see ``ShadowCardView``.
7+
`CardView` is a subclass of `UIView`. You should configure the card view content, accessibility identifier and background color through its view model ``CardViewModel``. The rounded corners and padding around the content of the view shouldn't be adjusted and should be used as is. For a card that has a shadow, please see ``ShadowCardView``.
88

99
## Illustration
1010

BrowserKit/Sources/ComponentLibrary/Documentation.docc/General Components/CloseButton.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The button which is used for closing a view, such as a bottom sheet, when the us
44

55
## Overview
66

7-
The `CloseButton` is a subclass of the `UIButton`. This means properties of the `UIButton` are accessible, but for easy convenience it's recommended to configure the button title, font and accessibility identifier through it's view model ``CloseButtonViewModel``. The button size shouldn't be adjusted and should be used as is.
7+
`CloseButton` is a subclass of `UIButton`. This means that the properties of `UIButton` are accessible, however it's recommended to configure the button title, font, and accessibility identifier through its view model ``CloseButtonViewModel``. The button size shouldn't be adjusted and should be used as is.
88

99
## Illustration
1010

BrowserKit/Sources/ComponentLibrary/Documentation.docc/General Components/CollapsibleCardView.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# ``ComponentLibrary/CollapsibleCardView``
22

3-
The collapsible card view opens to show content with a user press.
3+
The collapsible card view opens to show content on user press.
44

55
## Overview
66

7-
The `CollapsibleCardView` is a subclass of the `ShadowCardView`. You should configure the card view content view, accessibility identifier, and state through it's view model ``CollapsibleCardViewModel``. The rounded corners and padding around the content of the view shouldn't be adjusted and should be used as is.
7+
`CollapsibleCardView` is a subclass of `ShadowCardView`. You should configure the card view content view, accessibility identifier, and state through its view model ``CollapsibleCardViewModel``. The rounded corners and padding around the content of the view shouldn't be adjusted and should be used as is.
88

99
## Illustration
1010

BrowserKit/Sources/ComponentLibrary/Documentation.docc/General Components/ContextualHintView.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The contextual hint view is a popover to present more context to the user.
44

55
## Overview
66

7-
The `ContextualHintView` is a subclass of the `UIView`. That view is basically the content that will be enclosed in a popover which includes an arrow. You should configure the contextual hint view arrow direction, title, accessibility identifier, and click actions through it's view model ``ContextualHintViewModel``. The popover size should be set with `preferredContentSize` normally in the `viewDidLayoutSubviews` instance method, as well as setting the `popoverPresentationController` delegate and source view.
7+
`ContextualHintView` is a subclass of `UIView`. That view is basically the content that will be enclosed in a popover which includes an arrow. You should configure the contextual hint view arrow direction, title, accessibility identifier, and click actions through its view model ``ContextualHintViewModel``. The popover size should be set with `preferredContentSize` normally in the `viewDidLayoutSubviews` instance method, as well as setting the `popoverPresentationController` delegate and source view.
88

99
## Illustration
1010

BrowserKit/Sources/ComponentLibrary/Documentation.docc/General Components/HeaderView.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The view which is used as a header for sheets, such as a bottom sheet, where som
44

55
## Overview
66

7-
The `HeaderView` is a subclass of the `UIView`. The view designed to serve as a header in a user interface. It displays a title, subtitle, favicon (icon), a main button and a close button. It also supports accessibility features and customizable theming. It can be used as a header for displaying information about a web page, user profile, or any other context that requires a title, subtitle, and action buttons.
7+
`HeaderView` is a subclass of `UIView`. The view is designed to serve as a header in a user interface. It displays a title, subtitle, favicon (icon), a main button, and a close button. It also supports accessibility features and customizable theming. It can be used as a header for displaying information about a web page, user profile, or any other context that requires a title, subtitle, and action buttons.
88

99
## Illustration
1010

BrowserKit/Sources/ComponentLibrary/Documentation.docc/General Components/LinkButton.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# ``ComponentLibrary/LinkButton``
22

3-
The button which is used for actions that looks like a webview link.
3+
The button which is used for actions resembling a webview link.
44

55
## Overview
66

7-
The `LinkButton` is a subclass of the `UIButton`. This means properties of the `UIButton` are accessible, but for easy convenience it's recommended to configure the button title, font and accessibility identifier through it's' view model ``LinkButtonViewModel``. The colors and spacing of the button although accessible shouldn't be adjusted and should be used as is.
7+
`LinkButton` is a subclass of `UIButton`. This means properties of `UIButton` are accessible, however it's recommended to configure the button title, font, and accessibility identifier through its view model ``LinkButtonViewModel``. The colors and spacing of the button, although accessible, shouldn't be adjusted and should be used as is.
88

99
## Illustration
1010

1111
> This image is illustrative only. For precise examples of iOS implementation, please run the SampleApplication.
1212
13-
![The LinkButton on iOS]LinkButton
13+
![The LinkButton on iOS](LinkButton)
1414

1515
## Topics
1616

BrowserKit/Sources/ComponentLibrary/Documentation.docc/General Components/NavigationHeaderView.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# ``ComponentLibrary/NavigationHeaderView``
22

3-
The view which is used as a header for sheets, such as a bottom sheet, where some details are displayed and offer possibility to navigate between screens.
3+
The view which is used as a header for sheets, such as a bottom sheet, where some details are displayed, allowing navigation between screens.
44

55
## Overview
66

7-
The `NavigationHeaderView` is a subclass of the `UIView`. The view is a custom UIView that acts as a navigation header in an interface. It provides a title, a back button, and a close button, making it useful for navigation within menus or modal views. This view is ideal for use in navigation-driven applications where a header is needed to display a title and provide navigation controls for going back or closing a menu.
7+
`NavigationHeaderView` is a subclass of `UIView`. It's a custom UIView that acts as a navigation header in an interface. It provides a title, a back button, and a close button, making it useful for navigation within menus or modal views. This view is ideal for use in navigation-driven applications where a header is needed to display a title and provide navigation controls for going back or closing a menu.
88

99
## Illustration
1010

BrowserKit/Sources/ComponentLibrary/Documentation.docc/General Components/PaddedSwitch.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# ``ComponentLibrary/PaddedSwitch``
22

3-
The button which is used for toggle actions.
3+
The control used as an on/off toggle.
44

55
## Overview
66

7-
The `PaddedSwitch` is a subclass of the `UIView`. It contains a ``ThemedSwitch``, adding some padding for the width of that control. This switch view should be configured through it's view model ``PaddedSwitchViewModel``.
7+
`PaddedSwitch` is a subclass of `UIView`. It contains a ``ThemedSwitch``, adding some padding for the width of that control. This switch view should be configured through its view model ``PaddedSwitchViewModel``.
88

99
## Illustration
1010

BrowserKit/Sources/ComponentLibrary/Documentation.docc/General Components/PrimaryRoundedButton.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The button which is used for primary actions.
44

55
## Overview
66

7-
The `PrimaryRoundedButton` is a subclass of the `UIButton`. This means properties of the `UIButton` are accessible, but for easy convenience it's recommended to configure the button title and accessibility identifier through it's view model ``PrimaryRoundedButtonViewModel``. The colors, rounded corners and spacing of the button although accessible shouldn't be adjusted and should be used as is.
7+
`PrimaryRoundedButton` is a subclass of `UIButton`. This means that the properties of `UIButton` are accessible, however it's recommended to configure the button title and accessibility identifier through its view model ``PrimaryRoundedButtonViewModel``. The colors, rounded corners, and spacing of the button, although accessible, shouldn't be adjusted and should be used as is.
88

99
## Illustration
1010

BrowserKit/Sources/ComponentLibrary/Documentation.docc/General Components/SecondaryRoundedButton.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The button which is used for secondary actions.
44

55
## Overview
66

7-
The `SecondaryRoundedButton` is a subclass of the `UIButton`. This means properties of the `UIButton` are accessible, but for easy convenience it's recommended to configure the button title and accessibility identifier through it's view model ``SecondaryRoundedButtonViewModel``. The colors, rounded corners and spacing of the button although accessible shouldn't be adjusted and should be used as is.
7+
`SecondaryRoundedButton` is a subclass of `UIButton`. This means that the properties of `UIButton` are accessible, but it's recommended to configure the button title and accessibility identifier through its view model ``SecondaryRoundedButtonViewModel``. The colors, rounded corners, and spacing of the button, although accessible, shouldn't be adjusted and should be used as is.
88

99
## Illustration
1010

BrowserKit/Sources/ComponentLibrary/Documentation.docc/General Components/ShadowCardView.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# ``ComponentLibrary/ShadowCardView``
22

3-
The shadow card view which is used to contain different type of content.
3+
The shadow card view which is used to contain different types of content.
44

55
## Overview
66

7-
The `ShadowCardView` is a subclass of the `UIView`. You should configure the shadow card view content and accessibility identifier through it's view model ``ShadowCardViewModel``. The rounded corners, shadow and padding around the content of the view shouldn't be adjusted and should be used as is. For a card without a shadow, please see ``CardView``.
7+
`ShadowCardView` is a subclass of `UIView`. You should configure the shadow card view content and accessibility identifier through its view model ``ShadowCardViewModel``. The rounded corners, shadow, and padding around the content of the view shouldn't be adjusted and should be used as is. For a card without a shadow see ``CardView``.
88

99
## Illustration
1010

BrowserKit/Sources/ComponentLibrary/Documentation.docc/HowToAddNewComponent.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ You should add the code under the `ComponentLibrary` folder in `BrowserKit`, fol
2525
1. Ensure your component behaves properly with RTL languages. This means using trailing and leading constraints, and ensure images are flipped where ever needed. See [`imageFlippedForRightToLeftLayoutDirection`](https://developer.apple.com/documentation/uikit/uiimage/1624140-imageflippedforrighttoleftlayout) for more information.
2626
1. Ensure your component behaves properly with Voice Over. This means we should inject needed identifiers for images to be read out loud to users to have the proper context. As developers, we should ensure the constraints are made properly, so the field highlighted with Voice Over is actually the one being read out loud.
2727
1. Ensure your component reacts properly to theme manager changes by being `ThemeApplicable`.
28-
1. Make sure that your component is added to the component library documentation. It needs to be listed in the landing page, as well as having it's own documentation page.
28+
1. Make sure that your component is added to the component library documentation. It needs to be listed on the landing page, as well as having its own documentation page.
2929

3030
### Sample application
3131
> You will need to close the Client application to be able to navigate `BrowserKit` in the Sample application when you open [`Sample app xcodeproj`](https://github.com/mozilla-mobile/firefox-ios/tree/main/SampleComponentLibraryApp)

0 commit comments

Comments
 (0)