Skip to content

Commit

Permalink
Merge branch 'main' into @zfurtak/new-eslint-rule
Browse files Browse the repository at this point in the history
  • Loading branch information
zfurtak committed Oct 1, 2024
2 parents 2196c6f + 28bc3cd commit c0d03fb
Show file tree
Hide file tree
Showing 136 changed files with 2,415 additions and 1,608 deletions.
2 changes: 1 addition & 1 deletion .github/actions/composite/setupGitForOSBotify/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ runs:
- name: Set up git for OSBotify
shell: bash
run: |
git config user.signingkey 367811D53E34168C
git config user.signingkey AEE1036472A782AB
git config commit.gpgsign true
git config user.name OSBotify
git config user.email [email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ runs:
- name: Set up git for OSBotify
shell: bash
run: |
git config user.signingkey 367811D53E34168C
git config user.signingkey AEE1036472A782AB
git config commit.gpgsign true
git config user.name OSBotify
git config user.email [email protected]
Expand Down
Binary file modified .github/workflows/OSBotify-private-key.asc.gpg
Binary file not shown.
78 changes: 57 additions & 21 deletions .github/workflows/deployNewHelp.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
name: Deploy New Help Site

on:
# Run on any push to main that has changes to the help directory
# TEST: Verify Cloudflare picks this up even if not run when merged to main
# push:
# branches:
# - main
# paths:
# - 'help/**'
# Run on any push to main that has changes to the help directory. This will cause this
# to deploy the latest code to newhelp.expensify.com
push:
branches:
- main
paths:
- 'help/**'
- './.github/workflows/deployNewHelp.yml'

# Run on any pull request (except PRs against staging or production) that has changes to the help directory
# Run on any pull request (except PRs against staging or production) that has
# changes to the help directory. This will cause it to deploy this unmerged branch to
# a Cloudflare "preview" environment
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
paths:
- 'help/**'

- './.github/workflows/deployNewHelp.yml'
# Run on any manual trigger
workflow_dispatch:

Expand All @@ -27,10 +30,17 @@ concurrency:
jobs:
build:
env:
# Open source contributors do not have write access to the Expensify/App repo,
# so must submit PRs from forks. This variable detects if the PR is coming
# from a fork, and thus is from an outside contributor.
IS_PR_FROM_FORK: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}

# Set up a clean Ubuntu build environment
runs-on: ubuntu-latest

steps:
# We start by checking out the entire repo into a clean build environment within
# the Github Action
- name: Checkout code
uses: actions/checkout@v4

Expand All @@ -41,34 +51,60 @@ jobs:
bundler-cache: true
working-directory: ./help

# Manually run Jekyll, bypassing Github Pages
- name: Build Jekyll site
run: bundle exec jekyll build --source ./ --destination ./_site
working-directory: ./help # Ensure Jekyll is building the site in /help

# This will copy the contents of /help/_site to Cloudflare. The pages-action will
# evaluate the current branch to determine into which CF environment to deploy:
# - If you are on 'main', it will deploy to 'production' in Cloudflare
# - Otherwise it will deploy to a 'preview' environment made for this branch
- name: Deploy to Cloudflare Pages
uses: cloudflare/pages-action@v1
id: deploy
if: env.IS_PR_FROM_FORK != 'true'
id: cloudflarePagesAction
if: ${{ env.IS_PR_FROM_FORK != 'true' }}
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: newhelp
directory: ./help/_site # Deploy the built site

# After deploying Cloudflare preview build, share wherever it deployed to in the PR comment.
- name: Leave a comment on the PR
uses: actions-cool/[email protected]
if: ${{ github.event_name == 'pull_request' && env.IS_PR_FROM_FORK != 'true' }}
with:
token: ${{ github.token }}
body: ${{ format('Your New Help changes have been deployed to {0} :zap:️', steps.cloudflarePagesAction.outputs.alias) }}

- name: Get merged pull request
if: ${{ github.event_name == 'push' }}
id: getMergedPullRequest
uses: actions-ecosystem/action-get-merged-pull-request@59afe90821bb0b555082ce8ff1e36b03f91553d9
with:
github_token: ${{ github.token }}

- name: Leave a comment on the PR after it's merged
if: ${{ github.event_name == 'push' }}
run: |
gh pr comment ${{ steps.getMergedPullRequest.outputs.number }} --body "$(cat <<'EOF'
🚀Deployed to [NewHelp production](https://newhelp.expensify.com)! 🚀
([_View deploy workflow run_](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}))
EOF
)"
env:
GITHUB_TOKEN: ${{ github.token }}

# Use the Cloudflare CLI...
- name: Setup Cloudflare CLI
if: env.IS_PR_FROM_FORK != 'true'
if: ${{ env.IS_PR_FROM_FORK != 'true' }}
run: pip3 install cloudflare==2.19.0

# ... to purge the cache, such that all users will see the latest content.
- name: Purge Cloudflare cache
if: env.IS_PR_FROM_FORK != 'true'
if: ${{ env.IS_PR_FROM_FORK != 'true' }}
run: /home/runner/.local/bin/cli4 --verbose --delete hosts=["newhelp.expensify.com"] /zones/:9ee042e6cfc7fd45e74aa7d2f78d617b/purge_cache
env:
CF_API_KEY: ${{ secrets.CLOUDFLARE_TOKEN }}

- name: Leave a comment on the PR
uses: actions-cool/[email protected]
if: ${{ github.event_name == 'pull_request' && env.IS_PR_FROM_FORK != 'true' }}
with:
token: ${{ github.token }}
body: ${{ format('A preview of your New Help changes have been deployed to {0} :zap:️', steps.deploy.outputs.alias) }}

4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009004103
versionName "9.0.41-3"
versionCode 1009004200
versionName "9.0.42-0"
// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
Expand Down
4 changes: 2 additions & 2 deletions assets/images/table.svg
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 @@ -36,10 +36,6 @@ Once the member verifies their email address, all Domain Admins will be notified
3. Click the **Domain Members** tab on the left.
4. Under the Domain Members section, enter the first part of the member’s email address and click **Invite**.

{% include info.html %}
This can be any email address—it does not have to be an email address under the domain. If someone who is not a Domain Admin invites a new member to a workspace, that member must validate their account via email before they will have access to it.
{% include end-info.html %}

# Add Domain Admin

1. Hover over Settings, then click **Domains**.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ description: Use 2FA for extra login security

Add an extra layer of security to help keep your financial data safe and secure by enabling two-factor authentication (2FA). This will require you to enter a code generated by your preferred authenticator app (like Google Authenticator or Microsoft Authenticator) when you log in.

Expensify's Two-Factor Authentication (2FA) is implemented via a Time-based One-Time Password (TOTP) algorithm. This requires you to use an Authenticator app to generate a unique code each time you log in, adding a second “factor” to your login.

You can choose to use whichever authenticator you prefer, but here are a few we recommend:
- [1Password](https://support.1password.com/one-time-passwords/)
- [Authy](https://authy.com/)
- [Google Authenticator](https://support.google.com/accounts/answer/1066447)
- [Microsoft Authenticator](https://www.microsoft.com/en-us/security/mobile-authenticator-app)

You will need to select an authenticator app to use before proceeding.

## Enable and Set Up Two-factor authentication

1. Hover over Settings, then click **Account**.
2. Under the Account Details tab, scroll down to the Two Factor Authentication section and enable the toggle.
3. Save a copy of your backup codes.
Expand All @@ -19,8 +31,32 @@ This step is critical—You will lose access to your account if you cannot use y
4. Click **Continue**.
5. Download or open your authenticator app and either:
- Scan the QR code shown on your computer screen.
- Enter the 6-digit code from your authenticator app into Expensify and click **Verify**.
- Enter the 6-digit code from your authenticator app into Expensify and click **Verify**.

When you log in to Expensify in the future, you’ll be emailed a magic code that you’ll use to log in with. Then you’ll be prompted to open your authenticator app to get the 6-digit code and enter it into Expensify. A new code regenerates every few seconds, so the code is always different. If the code time runs out, you can generate a new code as needed.

## Lost recovery codes and authenticator app

If you have lost your mobile device and can’t find your recovery codes, you can have your Domain Admin complete the steps below to reset your 2FA **only if you use a company email address or an email address on a domain that you own**:

Go to Settings > Domains > Domain Members and click **Edit Settings** for your email address.
They then click **Reset** to reset two-factor authentication (2FA) on your account.

This will allow you to gain access to your account on the web or mobile app and reconfigure 2FA again.

{% include info.html %}
If you use a public email address such as gmail, hotmail, or yahoo, we unfortunately can’t help you disable your 2FA setting. If you are unable to find your recovery codes, you may need to create a new Expensify account with a different email address.
{% include end-info.html %}

If you don’t have a Domain Admin, follow the steps in this [guide](https://help.expensify.com/articles/expensify-classic/domains/Claim-And-Verify-A-Domain) to verify the domain.

## General troubleshooting

Make sure your phone’s time is set to automatically update (a manual time that’s fractionally different can cause issues).
Try disabling 2FA using a device that you are still logged into. For example, if you’re having trouble logging in with your computer, try to see if your mobile device is still logged in. If so,
Hover over Settings, then click Account.
Under the Account Details tab, scroll down to the Two Factor Authentication section and disable the toggle.
Try logging in with your other device.
Once you’ve logged in again, you can re-enable 2FA.

</div>
50 changes: 50 additions & 0 deletions help/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Welcome to New Help!
Here are some instructions on how to get started with New Help...

## How to contribute
Expensify is an open source app, with its public Github repo hosted at https://github.com/Expensify/App. The newhelp.expensify.com website is a part of that same open source project. You can contribute to this helpsite in one of two ways:

### The hard way: local dev environment
If you are a developer comfortable working on the command line, you can edit these files as follows:

1. Fork https://github.com/Expensify/App repo
* `...tbd...`
2. Install Homebrew: https://brew.sh/
3. Install `rbenv` using brew:
* `brew install rbenv`
4. Install ruby v3.3.4 using
* `rbenv install 3.3.4`
5. Set the your default ruby version using
* `rbenv global 3.3.4`
6. Install Jekyll and bundler gem
* `cd help`
* `gem install jekyll bundler`
7. Create a branch for your changes
8. Make your changes
9. Locally build and test your changes:
* `bundle exec jekyll build`
10. Push your changes

### The easy way: edit on Github
If you don't want to set up your own local dev environment, feel free to just edit the help materials directly from Github:

1. Open whatever file you want.
2. Replace `github.com` with `github.dev` in the URL
3. Edit away!

## How to add a page
The current design of NewHelp.expensify.com is only to have a very small handful pages (one for each "product"), each of which is a markdown file stored in `/help` using the `product` template (defined in `/help/_layouts/product.html`). Accordingly, it's very unlikely you'll be adding a new page.

The goal is to use a system named Jekyll to do the heavy lifting of not just converting that Markdown into HTML, but also allowing for deep linking of the headers, auto-linking mentions of those titles elsewhere, and a ton more. So, just write a basic Markdown file, and it should handle the rest.

## How to preview the site online
Every PR pushed by an authorized Expensify employee or representative will automatically trigger a "build" of the site using a Github Action. This will [follow these steps](../.github/workflows/deployNewHelp.yml) to:
1. Start a new Ubuntu server
2. Check out the repo
3. Install Ruby and Jekyll
4. Build the entire site using Jekyll
5. Create a "preview" of the newly built site in Cloudflare
6. Record a link to that preview in the PR.

## How to deploy the site for real
Whenever a PR that touches the `/help` directory is merged, it will re-run the build just like before. However, it will detect that this build is being run from the `main` branch, and thus push the changes to the `production` Cloudflare environment -- meaning, it will replace the contents hosted at https://newhelp.expensify.com
3 changes: 3 additions & 0 deletions help/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ url: https://newhelp.expensify.com
twitter_username: expensify
github_username: expensify

# Ignore what's only used for the Github repo
exclude:
- README.md
4 changes: 3 additions & 1 deletion help/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: New Expensify Help
---

Pages:
* [Expensify Superapp](/superapp.html)

- [Expensify Superapp](/superapp.html)
4 changes: 2 additions & 2 deletions ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>9.0.41</string>
<string>9.0.42</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>9.0.41.3</string>
<string>9.0.42.0</string>
<key>FullStory</key>
<dict>
<key>OrgId</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>9.0.41</string>
<string>9.0.42</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>9.0.41.3</string>
<string>9.0.42.0</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleShortVersionString</key>
<string>9.0.41</string>
<string>9.0.42</string>
<key>CFBundleVersion</key>
<string>9.0.41.3</string>
<string>9.0.42.0</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
8 changes: 4 additions & 4 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2360,7 +2360,7 @@ PODS:
- RNGoogleSignin (10.0.1):
- GoogleSignIn (~> 7.0)
- React-Core
- RNLiveMarkdown (0.1.143):
- RNLiveMarkdown (0.1.159):
- DoubleConversion
- glog
- hermes-engine
Expand All @@ -2380,9 +2380,9 @@ PODS:
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- RNLiveMarkdown/common (= 0.1.143)
- RNLiveMarkdown/common (= 0.1.159)
- Yoga
- RNLiveMarkdown/common (0.1.143):
- RNLiveMarkdown/common (0.1.159):
- DoubleConversion
- glog
- hermes-engine
Expand Down Expand Up @@ -3229,7 +3229,7 @@ SPEC CHECKSUMS:
RNFS: 4ac0f0ea233904cb798630b3c077808c06931688
RNGestureHandler: 8781e2529230a1bc3ea8d75e5c3cd071b6c6aed7
RNGoogleSignin: ccaa4a81582cf713eea562c5dd9dc1961a715fd0
RNLiveMarkdown: e44918843c2638692348f39eafc275698baf0444
RNLiveMarkdown: 2d97e3f4952c642cdd31bc05555e44dc5edcdba1
RNLocalize: d4b8af4e442d4bcca54e68fc687a2129b4d71a81
rnmapbox-maps: 460d6ff97ae49c7d5708c3212c6521697c36a0c4
RNPermissions: 0b1429b55af59d1d08b75a8be2459f65a8ac3f28
Expand Down
Loading

0 comments on commit c0d03fb

Please sign in to comment.