Skip to content

Commit 1502dab

Browse files
committed
Merge branch 'main' of github.com:Expensify/App into jsenyitko-suggested-search
2 parents 5e5407a + b02a1f6 commit 1502dab

112 files changed

Lines changed: 1736 additions & 904 deletions

File tree

Some content is hidden

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

Mobile-Expensify

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ android {
114114
minSdkVersion rootProject.ext.minSdkVersion
115115
targetSdkVersion rootProject.ext.targetSdkVersion
116116
multiDexEnabled rootProject.ext.multiDexEnabled
117-
versionCode 1009015306
118-
versionName "9.1.53-6"
117+
versionCode 1009015402
118+
versionName "9.1.54-2"
119119
// Supported language variants must be declared here to avoid from being removed during the compilation.
120120
// This also helps us to not include unnecessary language variants in the APK.
121121
resConfigs "en", "es"

assets/images/fast-track-cover.png

-51.8 KB
Loading

babel.config.js

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,27 @@ const ReactCompilerConfig = {
1111
sources: (filename) => !filename.includes('tests/') && !filename.includes('node_modules/'),
1212
};
1313

14+
/**
15+
* Custom plugin that prints a file name when it's being processed by babel.
16+
* Disabled by default. To enable, set DEBUG_BABEL_TRACE=true in the environment.
17+
*/
18+
function traceTransformer() {
19+
return {
20+
visitor: {
21+
Program(path, state) {
22+
console.log('🔧 Transforming file:', state.filename);
23+
},
24+
},
25+
};
26+
}
27+
1428
/**
1529
* Setting targets to node 20 to reduce JS bundle size
1630
* It is also recommended by babel:
1731
* https://babeljs.io/docs/options#no-targets
1832
*/
19-
const defaultPresets = ['@babel/preset-react', ['@babel/preset-env', {targets: {node: 20}}], '@babel/preset-flow', '@babel/preset-typescript'];
20-
const defaultPlugins = [
33+
const defaultPresetsForWebpack = ['@babel/preset-react', ['@babel/preset-env', {targets: {node: 20}}], '@babel/preset-flow', '@babel/preset-typescript'];
34+
const defaultPluginsForWebpack = [
2135
['babel-plugin-react-compiler', ReactCompilerConfig], // must run first!
2236
// Adding the commonjs: true option to react-native-web plugin can cause styling conflicts
2337
['react-native-web'],
@@ -38,7 +52,7 @@ const defaultPlugins = [
3852
// ignore it for desktop builds.
3953
if (!process.env.ELECTRON_ENV && process.env.npm_lifecycle_event !== 'desktop') {
4054
console.debug('This is not a desktop build, adding babel-plugin-annotate-react');
41-
defaultPlugins.push([
55+
defaultPluginsForWebpack.push([
4256
'@fullstory/babel-plugin-annotate-react',
4357
{
4458
'react-native-web': true,
@@ -47,9 +61,13 @@ if (!process.env.ELECTRON_ENV && process.env.npm_lifecycle_event !== 'desktop')
4761
]);
4862
}
4963

64+
if (process.env.DEBUG_BABEL_TRACE) {
65+
defaultPluginsForWebpack.push(traceTransformer);
66+
}
67+
5068
const webpack = {
51-
presets: defaultPresets,
52-
plugins: defaultPlugins,
69+
presets: defaultPresetsForWebpack,
70+
plugins: defaultPluginsForWebpack,
5371
};
5472

5573
const metro = {
@@ -123,6 +141,10 @@ const metro = {
123141
},
124142
};
125143

144+
if (process.env.DEBUG_BABEL_TRACE) {
145+
metro.plugins.push(traceTransformer);
146+
}
147+
126148
/*
127149
* We use <React.Profiler> and react-native-performance to capture/monitor stats
128150
* By default <React.Profiler> is disabled in production as it adds small overhead

config/webpack/webpack.common.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,15 @@ const getCommonConfiguration = ({file = '.env', platform = 'web'}: Environment):
236236
test: /\.lottie$/,
237237
type: 'asset/resource',
238238
},
239+
// This prevents import error coming from react-native-tab-view/lib/module/TabView.js
240+
// where Pager is imported without extension due to having platform-specific implementations
241+
{
242+
test: /\.js$/,
243+
resolve: {
244+
fullySpecified: false,
245+
},
246+
include: [path.resolve(__dirname, '../../node_modules/react-native-tab-view/lib/module/TabView.js')],
247+
},
239248
],
240249
},
241250
resolve: {

config/webpack/webpack.dev.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,19 @@ const getConfiguration = (environment: Environment): Promise<Configuration> =>
6666
}),
6767
new ReactRefreshWebpackPlugin({overlay: {sockProtocol: 'wss'}}),
6868
],
69+
// This prevents import error coming from react-native-tab-view/lib/module/TabView.js
70+
// where Pager is imported without extension due to having platform-specific implementations
71+
module: {
72+
rules: [
73+
{
74+
test: /\.js$/,
75+
resolve: {
76+
fullySpecified: false,
77+
},
78+
include: [path.resolve(__dirname, '../../node_modules/react-native-tab-view/lib/module/TabView.js')],
79+
},
80+
],
81+
},
6982
cache: {
7083
type: 'filesystem',
7184
name: environment.platform ?? 'default',

docs/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,23 @@ The sections of the article will be filled and nested automatically in the LHN,
168168

169169
If you're unfamiliar with github branches, PRs and confused how to add images and article in the same PR, head to this [slack thread 🧵](https://expensify.slack.com/archives/C02QSAC6BJ8/p1699632298177679?thread_ts=1699576284.768909&cid=C02QSAC6BJ8) in `#expensifyhelp`.
170170

171+
## Add videos
172+
1. Upload your video to cloudflare.
173+
2. Import the video in an article. You can do that by pasting the below snippet.
174+
3. Replace `src` with the public URL for the video. **It should be cloudflarestream.com url**.
175+
4. Make sure to remove `/manifest/video.x` from the url.
176+
177+
178+
Without a custom thumbnail
179+
```
180+
{% include video.html src="https://customer-dtm7nf3ai7b93j1q.cloudflarestream.com/b81eabafe1391ab06901ddc19dcda161" %}
181+
```
182+
183+
Optional: Add a custom thumbnail for the video. Replace `your-image.png` with a **16x9 aspect ratio image** from the `assets/images` directory.
184+
```
185+
{% include video.html thumbnail="assets/images/your-image.png" src="https://customer-dtm7nf3ai7b93j1q.cloudflarestream.com/b81eabafe1391ab06901ddc19dcda161" %}
186+
```
187+
171188
## Add meta-description tags for SEO
172189

173190
At the top of template file we're going to find a few variables that will help us to define the meta-description of the article for SEO:

docs/_includes/video.html

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<div class="video-container">
2+
<video
3+
class="video-js vjs-big-play-centered vjs-theme-fantasy"
4+
controls
5+
preload="auto"
6+
{%
7+
if
8+
include.thumbnail
9+
%}
10+
poster="{{ site.url }}/{{ include.thumbnail }}"
11+
{%
12+
endif
13+
%}
14+
data-setup='{"autoplay": false, "controls": true, "aspectRatio": "16:9", "fluid": true}'
15+
>
16+
<source
17+
src="{{ include.src }}/manifest/video.m3u8"
18+
type="application/x-mpegURL"
19+
/>
20+
<source
21+
src="{{ include.src }}/manifest/video.mpd"
22+
type="application/dash+xml"
23+
/>
24+
<p class="vjs-no-js">
25+
To view this video please enable JavaScript, and consider upgrading to a web browser that
26+
<a
27+
href="https://videojs.com/html5-video-support/"
28+
target="_blank"
29+
>
30+
supports HTML5 video
31+
</a>
32+
</p>
33+
</video>
34+
</div>

docs/_layouts/default.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22
<html>
33
<head>
44
<meta charset="utf-8">
5-
<meta http-equiv="Content-Security-Policy" content="script-src https://kit.fontawesome.com https://cdnjs.cloudflare.com https://www.google.com https://www.gstatic.com/ https://cse.google.com http://cse.google.com https://partner.googleadservices.com/ https://cdnjs.cloudflare.com/ajax/libs/tocbot/ https://www.googletagmanager.com 'self' 'unsafe-eval' 'unsafe-inline'; style-src cdnjs.cloudflare.com cse.google.com www.google.com ka-f.fontawesome.com fonts.googleapis.com 'self' 'unsafe-inline'" >
5+
<meta http-equiv="Content-Security-Policy" content="script-src https://kit.fontawesome.com https://cdnjs.cloudflare.com https://vjs.zencdn.net https://unpkg.com https://www.google.com https://www.gstatic.com/ https://cse.google.com http://cse.google.com https://partner.googleadservices.com/ https://cdnjs.cloudflare.com/ajax/libs/tocbot/ https://www.googletagmanager.com 'self' 'unsafe-eval' 'unsafe-inline'; style-src cdnjs.cloudflare.com vjs.zencdn.net unpkg.com cse.google.com www.google.com ka-f.fontawesome.com fonts.googleapis.com 'self' 'unsafe-inline'; worker-src blob: 'self';" >
66
<title>Expensify Help</title>
77
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui">
88
<link rel="icon" type="image/png" href="{{ '/assets/images/expensify-logo-round.png' | cache_bust }}">
99
<link rel="stylesheet" href="{{ site.main_style | cache_bust}}">
1010
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.12.0/tocbot.css">
11+
<link rel="stylesheet" href="https://vjs.zencdn.net/8.5.2/video-js.css" />
12+
<link rel="stylesheet" href="https://unpkg.com/@videojs/themes@1/dist/fantasy/index.css" />
1113

1214
<script src="https://kit.fontawesome.com/263e5e8608.js" crossorigin="anonymous"></script>
1315
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.12.0/tocbot.js"></script>
16+
<script defer src="https://vjs.zencdn.net/8.5.2/video.min.js"></script>
1417
<script defer src="{{ '/assets/js/main.js' | cache_bust }}"></script>
1518
<script defer src="{{ '/assets/js/platform-tabs.js' | cache_bust }}"></script>
1619
<script defer src="{{ '/assets/js/selector.js' | cache_bust }}"></script>

docs/_sass/_colors.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
--color-button-success-background: #03d47c;
1717
--color-button-success-background-hover: #00a862;
1818
--color-overlay: rgba(235, 230, 223, 0.72);
19+
--color-white: #ffffff;
20+
--color-transparent-white: #ffffff51;
1921
}
2022

2123
@media (prefers-color-scheme: dark) {
@@ -37,5 +39,7 @@
3739
--color-button-success-background: #03d47c;
3840
--color-button-success-background-hover: #00a862;
3941
--color-overlay: rgba(26, 61, 50, 0.72);
42+
--color-white: #ffffff;
43+
--color-transparent-white: #ffffff51;
4044
}
4145
}

0 commit comments

Comments
 (0)