Skip to content

Commit 52c515a

Browse files
committed
Merge branch 'main' of https://github.com/Expensify/App into ikevin127-searchAnimateHighlight
2 parents c66f148 + 843eb28 commit 52c515a

File tree

118 files changed

+2090
-1616
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+2090
-1616
lines changed

.github/actions/composite/setupGitForOSBotify/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ runs:
2020
- name: Set up git for OSBotify
2121
shell: bash
2222
run: |
23-
git config user.signingkey 367811D53E34168C
23+
git config user.signingkey AEE1036472A782AB
2424
git config commit.gpgsign true
2525
git config user.name OSBotify
2626
git config user.email [email protected]

.github/actions/composite/setupGitForOSBotifyApp/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ runs:
5050
- name: Set up git for OSBotify
5151
shell: bash
5252
run: |
53-
git config user.signingkey 367811D53E34168C
53+
git config user.signingkey AEE1036472A782AB
5454
git config commit.gpgsign true
5555
git config user.name OSBotify
5656
git config user.email [email protected]

.github/scripts/verifyDeploy.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
ENV="$1"
4+
EXPECTED_VERSION="$2"
5+
6+
BASE_URL=""
7+
if [[ "$ENV" == 'staging' ]]; then
8+
BASE_URL='https://staging.new.expensify.com'
9+
else
10+
BASE_URL='https://new.expensify.com'
11+
fi
12+
13+
sleep 5
14+
ATTEMPT=0
15+
MAX_ATTEMPTS=10
16+
while [[ $ATTEMPT -lt $MAX_ATTEMPTS ]]; do
17+
((ATTEMPT++))
18+
19+
echo "Attempt $ATTEMPT: Checking deployed version..."
20+
DOWNLOADED_VERSION="$(wget -q -O /dev/stdout "$BASE_URL"/version.json | jq -r '.version')"
21+
22+
if [[ "$EXPECTED_VERSION" == "$DOWNLOADED_VERSION" ]]; then
23+
echo "Success: Deployed version matches local version: $DOWNLOADED_VERSION"
24+
exit 0
25+
fi
26+
27+
if [[ $ATTEMPT -lt $MAX_ATTEMPTS ]]; then
28+
echo "Version mismatch, found $DOWNLOADED_VERSION. Retrying in 5 seconds..."
29+
sleep 5
30+
fi
31+
done
32+
33+
echo "Error: Deployed version did not match local version after $MAX_ATTEMPTS attempts. Something went wrong..."
34+
exit 1
-1.16 KB
Binary file not shown.

.github/workflows/deploy.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -386,23 +386,11 @@ jobs:
386386

387387
- name: Verify staging deploy
388388
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
389-
run: |
390-
sleep 5
391-
DOWNLOADED_VERSION="$(wget -q -O /dev/stdout https://staging.new.expensify.com/version.json | jq -r '.version')"
392-
if [[ '${{ needs.prep.outputs.APP_VERSION }}' != "$DOWNLOADED_VERSION" ]]; then
393-
echo "Error: deployed version $DOWNLOADED_VERSION does not match local version ${{ needs.prep.outputs.APP_VERSION }}. Something went wrong..."
394-
exit 1
395-
fi
389+
run: ./.github/scripts/verifyDeploy.sh staging ${{ needs.prep.outputs.APP_VERSION }}
396390

397391
- name: Verify production deploy
398392
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
399-
run: |
400-
sleep 5
401-
DOWNLOADED_VERSION="$(wget -q -O /dev/stdout https://new.expensify.com/version.json | jq -r '.version')"
402-
if [[ '${{ needs.prep.outputs.APP_VERSION }}' != "$DOWNLOADED_VERSION" ]]; then
403-
echo "Error: deployed version $DOWNLOADED_VERSION does not match local version ${{ needs.prep.outputs.APP_VERSION }}. Something went wrong..."
404-
exit 1
405-
fi
393+
run: ./.github/scripts/verifyDeploy.sh production ${{ needs.prep.outputs.APP_VERSION }}
406394

407395
- name: Upload web sourcemaps artifact
408396
uses: actions/upload-artifact@v4

.github/workflows/deployNewHelp.yml

Lines changed: 57 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
name: Deploy New Help Site
22

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

12-
# Run on any pull request (except PRs against staging or production) that has changes to the help directory
13+
# Run on any pull request (except PRs against staging or production) that has
14+
# changes to the help directory. This will cause it to deploy this unmerged branch to
15+
# a Cloudflare "preview" environment
1316
pull_request:
1417
types: [opened, synchronize]
1518
branches-ignore: [staging, production]
1619
paths:
1720
- 'help/**'
18-
21+
- './.github/workflows/deployNewHelp.yml'
1922
# Run on any manual trigger
2023
workflow_dispatch:
2124

@@ -27,10 +30,17 @@ concurrency:
2730
jobs:
2831
build:
2932
env:
33+
# Open source contributors do not have write access to the Expensify/App repo,
34+
# so must submit PRs from forks. This variable detects if the PR is coming
35+
# from a fork, and thus is from an outside contributor.
3036
IS_PR_FROM_FORK: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
37+
38+
# Set up a clean Ubuntu build environment
3139
runs-on: ubuntu-latest
3240

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

@@ -41,34 +51,60 @@ jobs:
4151
bundler-cache: true
4252
working-directory: ./help
4353

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

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

73+
# After deploying Cloudflare preview build, share wherever it deployed to in the PR comment.
74+
- name: Leave a comment on the PR
75+
uses: actions-cool/[email protected]
76+
if: ${{ github.event_name == 'pull_request' && env.IS_PR_FROM_FORK != 'true' }}
77+
with:
78+
token: ${{ github.token }}
79+
body: ${{ format('Your New Help changes have been deployed to {0} :zap:️', steps.cloudflarePagesAction.outputs.alias) }}
80+
81+
- name: Get merged pull request
82+
if: ${{ github.event_name == 'push' }}
83+
id: getMergedPullRequest
84+
uses: actions-ecosystem/action-get-merged-pull-request@59afe90821bb0b555082ce8ff1e36b03f91553d9
85+
with:
86+
github_token: ${{ github.token }}
87+
88+
- name: Leave a comment on the PR after it's merged
89+
if: ${{ github.event_name == 'push' }}
90+
run: |
91+
gh pr comment ${{ steps.getMergedPullRequest.outputs.number }} --body "$(cat <<'EOF'
92+
🚀Deployed to [NewHelp production](https://newhelp.expensify.com)! 🚀
93+
94+
([_View deploy workflow run_](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}))
95+
EOF
96+
)"
97+
env:
98+
GITHUB_TOKEN: ${{ github.token }}
99+
100+
# Use the Cloudflare CLI...
58101
- name: Setup Cloudflare CLI
59-
if: env.IS_PR_FROM_FORK != 'true'
102+
if: ${{ env.IS_PR_FROM_FORK != 'true' }}
60103
run: pip3 install cloudflare==2.19.0
61104

105+
# ... to purge the cache, such that all users will see the latest content.
62106
- name: Purge Cloudflare cache
63-
if: env.IS_PR_FROM_FORK != 'true'
107+
if: ${{ env.IS_PR_FROM_FORK != 'true' }}
64108
run: /home/runner/.local/bin/cli4 --verbose --delete hosts=["newhelp.expensify.com"] /zones/:9ee042e6cfc7fd45e74aa7d2f78d617b/purge_cache
65109
env:
66110
CF_API_KEY: ${{ secrets.CLOUDFLARE_TOKEN }}
67-
68-
- name: Leave a comment on the PR
69-
uses: actions-cool/[email protected]
70-
if: ${{ github.event_name == 'pull_request' && env.IS_PR_FROM_FORK != 'true' }}
71-
with:
72-
token: ${{ github.token }}
73-
body: ${{ format('A preview of your New Help changes have been deployed to {0} :zap:️', steps.deploy.outputs.alias) }}
74-

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ package-lock.json
1515
*.css
1616
*.scss
1717
*.md
18+
*.markdown
1819
# We need to modify the import here specifically, hence we disable prettier to get rid of the sorted imports
1920
src/libs/E2E/reactNativeLaunchingTest.ts
2021
# Temporary while we keep react-compiler in our repo

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ android {
110110
minSdkVersion rootProject.ext.minSdkVersion
111111
targetSdkVersion rootProject.ext.targetSdkVersion
112112
multiDexEnabled rootProject.ext.multiDexEnabled
113-
versionCode 1009004102
114-
versionName "9.0.41-2"
113+
versionCode 1009004110
114+
versionName "9.0.41-10"
115115
// Supported language variants must be declared here to avoid from being removed during the compilation.
116116
// This also helps us to not include unnecessary language variants in the APK.
117117
resConfigs "en", "es"

assets/images/table.svg

Lines changed: 2 additions & 2 deletions
Loading

docs/articles/expensify-classic/domains/Add-Domain-Members-and-Admins.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ Once the member verifies their email address, all Domain Admins will be notified
3636
3. Click the **Domain Members** tab on the left.
3737
4. Under the Domain Members section, enter the first part of the member’s email address and click **Invite**.
3838

39-
{% include info.html %}
40-
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.
41-
{% include end-info.html %}
42-
4339
# Add Domain Admin
4440

4541
1. Hover over Settings, then click **Domains**.

help/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Welcome to New Help!
2+
Here are some instructions on how to get started with New Help...
3+
4+
## How to contribute
5+
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:
6+
7+
### The hard way: local dev environment
8+
If you are a developer comfortable working on the command line, you can edit these files as follows:
9+
10+
1. Fork https://github.com/Expensify/App repo
11+
* `...tbd...`
12+
2. Install Homebrew: https://brew.sh/
13+
3. Install `rbenv` using brew:
14+
* `brew install rbenv`
15+
4. Install ruby v3.3.4 using
16+
* `rbenv install 3.3.4`
17+
5. Set the your default ruby version using
18+
* `rbenv global 3.3.4`
19+
6. Install Jekyll and bundler gem
20+
* `cd help`
21+
* `gem install jekyll bundler`
22+
7. Create a branch for your changes
23+
8. Make your changes
24+
9. Locally build and test your changes:
25+
* `bundle exec jekyll build`
26+
10. Push your changes
27+
28+
### The easy way: edit on Github
29+
If you don't want to set up your own local dev environment, feel free to just edit the help materials directly from Github:
30+
31+
1. Open whatever file you want.
32+
2. Replace `github.com` with `github.dev` in the URL
33+
3. Edit away!
34+
35+
## How to add a page
36+
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.
37+
38+
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.
39+
40+
## How to preview the site online
41+
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:
42+
1. Start a new Ubuntu server
43+
2. Check out the repo
44+
3. Install Ruby and Jekyll
45+
4. Build the entire site using Jekyll
46+
5. Create a "preview" of the newly built site in Cloudflare
47+
6. Record a link to that preview in the PR.
48+
49+
## How to deploy the site for real
50+
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

help/_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ url: https://newhelp.expensify.com
55
twitter_username: expensify
66
github_username: expensify
77

8+
# Ignore what's only used for the Github repo
9+
exclude:
10+
- README.md
File renamed without changes.

ios/NewExpensify/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</dict>
4141
</array>
4242
<key>CFBundleVersion</key>
43-
<string>9.0.41.2</string>
43+
<string>9.0.41.10</string>
4444
<key>FullStory</key>
4545
<dict>
4646
<key>OrgId</key>

ios/NewExpensifyTests/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
22-
<string>9.0.41.2</string>
22+
<string>9.0.41.10</string>
2323
</dict>
2424
</plist>

ios/NotificationServiceExtension/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<key>CFBundleShortVersionString</key>
1414
<string>9.0.41</string>
1515
<key>CFBundleVersion</key>
16-
<string>9.0.41.2</string>
16+
<string>9.0.41.10</string>
1717
<key>NSExtension</key>
1818
<dict>
1919
<key>NSExtensionPointIdentifier</key>

ios/Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2360,7 +2360,7 @@ PODS:
23602360
- RNGoogleSignin (10.0.1):
23612361
- GoogleSignIn (~> 7.0)
23622362
- React-Core
2363-
- RNLiveMarkdown (0.1.143):
2363+
- RNLiveMarkdown (0.1.159):
23642364
- DoubleConversion
23652365
- glog
23662366
- hermes-engine
@@ -2380,9 +2380,9 @@ PODS:
23802380
- ReactCodegen
23812381
- ReactCommon/turbomodule/bridging
23822382
- ReactCommon/turbomodule/core
2383-
- RNLiveMarkdown/common (= 0.1.143)
2383+
- RNLiveMarkdown/common (= 0.1.159)
23842384
- Yoga
2385-
- RNLiveMarkdown/common (0.1.143):
2385+
- RNLiveMarkdown/common (0.1.159):
23862386
- DoubleConversion
23872387
- glog
23882388
- hermes-engine
@@ -3229,7 +3229,7 @@ SPEC CHECKSUMS:
32293229
RNFS: 4ac0f0ea233904cb798630b3c077808c06931688
32303230
RNGestureHandler: 8781e2529230a1bc3ea8d75e5c3cd071b6c6aed7
32313231
RNGoogleSignin: ccaa4a81582cf713eea562c5dd9dc1961a715fd0
3232-
RNLiveMarkdown: e44918843c2638692348f39eafc275698baf0444
3232+
RNLiveMarkdown: 2d97e3f4952c642cdd31bc05555e44dc5edcdba1
32333233
RNLocalize: d4b8af4e442d4bcca54e68fc687a2129b4d71a81
32343234
rnmapbox-maps: 460d6ff97ae49c7d5708c3212c6521697c36a0c4
32353235
RNPermissions: 0b1429b55af59d1d08b75a8be2459f65a8ac3f28

0 commit comments

Comments
 (0)