Skip to content

Commit

Permalink
Merge branch 'main' into kicu/43362-sorting-scrolling-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Kicu committed Jun 12, 2024
2 parents a97b14d + f8e968f commit 8575219
Show file tree
Hide file tree
Showing 102 changed files with 971 additions and 399 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ module.exports = {
__DEV__: 'readonly',
},
rules: {
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',

Expand Down
13 changes: 11 additions & 2 deletions .github/actions/javascript/getGraphiteString/getGraphiteString.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import * as core from '@actions/core';
import fs from 'fs';

type RegressionEntry = {
metadata?: {
creationDate: string;
};
name: string;
meanDuration: number;
meanCount: number;
};

const run = () => {
// Prefix path to the graphite metric
const GRAPHITE_PATH = 'reassure';
Expand All @@ -24,11 +33,11 @@ const run = () => {
}

try {
const current = JSON.parse(entry);
const current: RegressionEntry = JSON.parse(entry);

// Extract timestamp, Graphite accepts timestamp in seconds
if (current.metadata?.creationDate) {
timestamp = Math.floor(new Date(current.metadata.creationDate as string).getTime() / 1000);
timestamp = Math.floor(new Date(current.metadata.creationDate).getTime() / 1000);
}

if (current.name && current.meanDuration && current.meanCount && timestamp) {
Expand Down
4 changes: 2 additions & 2 deletions .github/libs/GitUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ function getCommitHistoryAsJSON(fromTag: string, toTag: string): Promise<CommitT
console.log(`Running command: git ${args.join(' ')}`);
const spawnedProcess = spawn('git', args);
spawnedProcess.on('message', console.log);
spawnedProcess.stdout.on('data', (chunk) => {
spawnedProcess.stdout.on('data', (chunk: Buffer) => {
console.log(chunk.toString());
stdout += chunk.toString();
});
spawnedProcess.stderr.on('data', (chunk) => {
spawnedProcess.stderr.on('data', (chunk: Buffer) => {
console.error(chunk.toString());
stderr += chunk.toString();
});
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/testGithubActionsWorkflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ jobs:
- name: Setup Homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Login to GitHub Container Regstry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: OSBotify
password: ${{ secrets.GITHUB_TOKEN }}

- name: Install Act
run: brew install act

Expand Down
9 changes: 6 additions & 3 deletions .storybook/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/* eslint-disable no-param-reassign */

/* eslint-disable @typescript-eslint/naming-convention */
import type Environment from 'config/webpack/types';
import dotenv from 'dotenv';
import path from 'path';
import {DefinePlugin} from 'webpack';
Expand All @@ -18,6 +19,8 @@ type CustomWebpackConfig = {
};
};

type CustomWebpackFunction = ({file, platform}: Environment) => CustomWebpackConfig;

let envFile: string;
switch (process.env.ENV) {
case 'production':
Expand All @@ -31,9 +34,9 @@ switch (process.env.ENV) {
}

const env = dotenv.config({path: path.resolve(__dirname, `../${envFile}`)});
const custom: CustomWebpackConfig = require('../config/webpack/webpack.common').default({
envFile,
});
const customFunction: CustomWebpackFunction = require('../config/webpack/webpack.common').default;

const custom: CustomWebpackConfig = customFunction({file: envFile});

const webpackConfig = ({config}: {config: Configuration}) => {
if (!config.resolve) {
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001048108
versionName "1.4.81-8"
versionCode 1001048200
versionName "1.4.82-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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 15 additions & 2 deletions config/webpack/webpack.common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,27 @@ import dotenv from 'dotenv';
import fs from 'fs';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import path from 'path';
import type {Configuration} from 'webpack';
import type {Compiler, Configuration} from 'webpack';
import {DefinePlugin, EnvironmentPlugin, IgnorePlugin, ProvidePlugin} from 'webpack';
import {BundleAnalyzerPlugin} from 'webpack-bundle-analyzer';
import CustomVersionFilePlugin from './CustomVersionFilePlugin';
import type Environment from './types';

// importing anything from @vue/preload-webpack-plugin causes an error
type Options = {
rel: string;
as: string;
fileWhitelist: RegExp[];
include: string;
};

type PreloadWebpackPluginClass = {
new (options?: Options): PreloadWebpackPluginClass;
apply: (compiler: Compiler) => void;
};

// require is necessary, there are no types for this package and the declaration file can't be seen by the build process which causes an error.
const PreloadWebpackPlugin = require('@vue/preload-webpack-plugin');
const PreloadWebpackPlugin: PreloadWebpackPluginClass = require('@vue/preload-webpack-plugin');

const includeModules = [
'react-native-animatable',
Expand Down
8 changes: 7 additions & 1 deletion desktop/createDownloadQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ type DownloadItem = {
options: Options;
};

type CreateDownloadQueue = () => {
enqueueDownloadItem: (item: DownloadItem) => void;
dequeueDownloadItem: () => DownloadItem | undefined;
};

/**
* Returns the filename with extension based on the given name and MIME type.
* @param name - The name of the file.
Expand All @@ -28,7 +33,7 @@ const getFilenameFromMime = (name: string, mime: string): string => {
return `${name}.${extensions}`;
};

const createDownloadQueue = () => {
const createDownloadQueue: CreateDownloadQueue = () => {
const downloadItemProcessor = (item: DownloadItem): Promise<void> =>
new Promise((resolve, reject) => {
let downloadTimeout: NodeJS.Timeout;
Expand Down Expand Up @@ -114,3 +119,4 @@ const createDownloadQueue = () => {
};

export default createDownloadQueue;
export type {DownloadItem, CreateDownloadQueue};
5 changes: 3 additions & 2 deletions desktop/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ import CONST from '@src/CONST';
import type {TranslationPaths} from '@src/languages/types';
import type PlatformSpecificUpdater from '@src/setup/platformSetup/types';
import type {Locale} from '@src/types/onyx';
import type {CreateDownloadQueue, DownloadItem} from './createDownloadQueue';
import ELECTRON_EVENTS from './ELECTRON_EVENTS';

const createDownloadQueue = require('./createDownloadQueue').default;
const createDownloadQueue: CreateDownloadQueue = require('./createDownloadQueue').default;

const port = process.env.PORT ?? 8082;
const {DESKTOP_SHORTCUT_ACCELERATOR, LOCALES} = CONST;
Expand Down Expand Up @@ -617,7 +618,7 @@ const mainWindow = (): Promise<void> => {

const downloadQueue = createDownloadQueue();
ipcMain.on(ELECTRON_EVENTS.DOWNLOAD, (event, downloadData) => {
const downloadItem = {
const downloadItem: DownloadItem = {
...downloadData,
win: browserWindow,
};
Expand Down
21 changes: 21 additions & 0 deletions docs/articles/new-expensify/settings/Add-profile-photo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Add profile photo
description: Add an image to your profile
---
<div id="new-expensify" markdown="1">

{% include selector.html values="desktop, mobile" %}

{% include option.html value="desktop" %}
1. Click your profile image or icon in the bottom left menu.
2. Click the Edit pencil icon next to your profile image or icon and select **Upload Image** to choose a new image from your saved files.
{% include end-option.html %}

{% include option.html value="mobile" %}
1. Tap your profile image or icon at the bottom of the screen.
2. Tap the Edit pencil icon next to your profile image or icon and select **Upload Image** to choose a new image from your saved files.
{% include end-option.html %}

{% include end-selector.html %}

</div>
89 changes: 89 additions & 0 deletions docs/articles/new-expensify/travel/Book-with-Expensify-Travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
title: Book with Expensify Travel
description: Book flights, hotels, cars, trains, and more with Expensify Travel
---
<div id="expensify-classic" markdown="1">

Expensify Travel allows members to search and book flights, hotels, cars, and trains globally at the most competitive rates available.

With Expensify Travel, you can:
- Search and book travel arrangements all in one place
- Book travel for yourself or for someone else
- Get real-time support by chat or phone
- Manage all your T&E expenses in Expensify
- Create specific rules for booking travel
- Enable approvals for out-of-policy trips
- Book with any credit card on the market
- Book with the Expensify Card to get cash back and automatically reconcile transactions

There is a flat fee of $15 per trip booked. A single trip can include multiple bookings, such as a flight, a hotel, and a car rental.

# Book travel

To book travel from the Expensify web app,

1. Click the **Travel** tab.
2. Click **Book or manage travel**.
3. Use the icons at the top to select the type of travel arrangement you want to book: flights, hotels, cars, or trains.
4. Enter the travel information relevant to the travel arrangement selected (for example, the destination, dates of travel, etc.).
5. Select all the details for the arrangement you want to book.
6. Review the booking details and click **Book Flight / Book Hotel / Book Car / Book Rail** to complete the booking.

The traveler is emailed an itinerary of the booking. Additionally,
- Their travel details are added to a Trip chat room under their primary workspace.
- An expense report for the trip is created.
- If booked with an Expensify Card, the trip is automatically reconciled.

{% include info.html %}
The travel itinerary is also emailed to the traveler’s [copilots](https://help.expensify.com/articles/expensify-classic/copilots-and-delegates/Assign-or-remove-a-Copilot), if applicable.
{% include end-info.html %}

</div>

<div id="new-expensify" markdown="1">
Expensify Travel allows members to search and book flights, hotels, cars, and trains globally at the most competitive rates available.

With Expensify Travel, you can:
- Search and book travel arrangements all in one place
- Book travel for yourself or for someone else
- Get real-time support by chat or phone
- Manage all your T&E expenses in Expensify
- Create specific rules for booking travel
- Enable approvals for out-of-policy trips
- Book with any credit card on the market
- Book with the Expensify Card to get cash back and automatically reconcile transactions

There is a flat fee of $15 per trip booked. A single trip can include multiple bookings, such as a flight, a hotel, and a car rental.

# Book travel

{% include selector.html values="desktop, mobile" %}

{% include option.html value="desktop" %}
1. Click the + icon in the bottom left menu and select **Book travel**.
2. Click **Book or manage travel**.
3. Agree to the terms and conditions and click **Continue**.
4. Use the icons at the top to select the type of travel arrangement you want to book: flights, hotels, cars, or trains.
5. Enter the travel information relevant to the travel arrangement selected (for example, the destination, dates of travel, etc.).
6. Select all the details for the arrangement you want to book.
7. Review the booking details and click **Book Flight / Book Hotel / Book Car / Book Rail** to complete the booking.
{% include end-option.html %}

{% include option.html value="mobile" %}
1. Tap the + icon in the bottom menu and select **Book travel**.
2. Tap **Book or manage travel**.
3. Agree to the terms and conditions and tap **Continue**.
4. Use the icons at the top to select the type of travel arrangement you want to book: flights, hotels, cars, or trains.
5. Enter the travel information relevant to the travel arrangement selected (for example, the destination, dates of travel, etc.).
6. Select all the details for the arrangement you want to book.
7. Review the booking details and click **Book Flight / Book Hotel / Book Car / Book Rail** to complete the booking.
{% include end-option.html %}

{% include end-selector.html %}

The traveler is emailed an itinerary of the booking. Additionally,
- Their travel details are added to a Trip chat room under their primary workspace.
- An expense report for the trip is created.
- If booked with an Expensify Card, the trip is automatically reconciled.

</div>
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>1.4.81</string>
<string>1.4.82</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.4.81.8</string>
<string>1.4.82.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>1.4.81</string>
<string>1.4.82</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.4.81.8</string>
<string>1.4.82.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>1.4.81</string>
<string>1.4.82</string>
<key>CFBundleVersion</key>
<string>1.4.81.8</string>
<string>1.4.82.0</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
Loading

0 comments on commit 8575219

Please sign in to comment.