Skip to content

Commit

Permalink
Merge https://github.com/Expensify/App into fix/address-page-country-…
Browse files Browse the repository at this point in the history
…picker-navigation
  • Loading branch information
ygshbht committed Sep 26, 2023
2 parents 945056d + 3486648 commit d2331d3
Show file tree
Hide file tree
Showing 163 changed files with 1,370 additions and 519 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001037401
versionName "1.3.74-1"
versionCode 1001037402
versionName "1.3.74-2"
}

flavorDimensions "default"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ protected NotificationCompat.Builder onExtendBuilder(@NonNull Context context, @
if (payload.containsKey(ONYX_DATA_KEY)) {
Objects.requireNonNull(payload.get(ONYX_DATA_KEY)).isNull();
Log.d(TAG, "payload contains onxyData");
applyMessageStyle(context, builder, payload, arguments.getNotificationId());
String alert = message.getExtra(PushMessage.EXTRA_ALERT);
applyMessageStyle(context, builder, payload, arguments.getNotificationId(), alert);
}
} catch (Exception e) {
Log.e(TAG, "Failed to parse conversation, falling back to default notification style. SendID=" + message.getSendId(), e);
Expand Down Expand Up @@ -163,7 +164,7 @@ public Bitmap getCroppedBitmap(Bitmap bitmap) {
* @param payload Notification payload, which contains all the data we need to build the notifications.
* @param notificationID Current notification ID
*/
private void applyMessageStyle(@NonNull Context context, NotificationCompat.Builder builder, JsonMap payload, int notificationID) {
private void applyMessageStyle(@NonNull Context context, NotificationCompat.Builder builder, JsonMap payload, int notificationID, String alert) {
long reportID = payload.get("reportID").getLong(-1);
if (reportID == -1) {
return;
Expand All @@ -181,7 +182,9 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil
String name = messageData.get("person").getList().get(0).getMap().get("text").getString();
String avatar = messageData.get("avatar").getString();
String accountID = Integer.toString(messageData.get("actorAccountID").getInt(-1));
String message = messageData.get("message").getList().get(0).getMap().get("text").getString();

// Use the formatted alert message from the backend. Otherwise fallback on the message in the Onyx data.
String message = alert != null ? alert : messageData.get("message").getList().get(0).getMap().get("text").getString();
String conversationName = payload.get("roomName") == null ? "" : payload.get("roomName").getString("");

// Retrieve or create the Person object who sent the latest report comment
Expand Down
69 changes: 69 additions & 0 deletions assets/images/expensify-card.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions docs/_data/_routes.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
home:
href: home
title: Welcome to ExpensifyHelp!
description: Questions? Find the answers by clicking a Category or using the search bar located in the left-hand menu.
description: Find answers by using the search bar in the left-hand menu or by clicking the version of Expensify you're using to access the relevant resources.

platforms:
- href: expensify-classic
title: Expensify Classic
hub-title: Expensify Classic - Help & Resources
hub-description: Questions? Find the answers by clicking a Category or using the search bar located in the left-hand menu.
url: www.expensify.com
description: "Your account settings look like this:"
image: /assets/images/settings-old-dot.svg
Expand Down Expand Up @@ -64,7 +65,7 @@ platforms:
description: Master the art of overseeing employees and reports by utilizing Expensify’s automation features and approval workflows.

- href: policy-and-domain-settings
title: Policy & Domain Setting
title: Policy & Domain Settings
icon: /assets/images/shield.svg
description: Discover how to set up and manage policies, define user permissions, and implement compliance rules to maintain a secure and compliant financial management landscape.

Expand All @@ -76,6 +77,7 @@ platforms:
- href: new-expensify
title: New Expensify
hub-title: New Expensify - Help & Resources
hub-description: Questions? Find the answers by clicking a Category or using the search bar located in the left-hand menu.
url: new.expensify.com
description: "Your account settings look like this:"
image: /assets/images/settings-new-dot.svg
Expand Down
34 changes: 10 additions & 24 deletions docs/_includes/hub.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,13 @@ <h1 class="title">
{{ hub.description }}
</p>

{% if hub.articles %}
<section>
<div class="cards-group">
{% for article in hub.articles %}
{% include article-card.html hub=hub.href href=article.href title=article.title platform=activePlatform %}
{% endfor %}
</div>
</section>
{% endif %}

{% for section in hub.sections %}
<section>
<h2 id="{{ section.href }}">
{{ section.title }}
</h2>

<div class="cards-group">
{% for article in section.articles %}
{% assign article_href = section.href | append: '/' | append: article.href %}
{% include article-card.html hub=hub.href href=article_href title=article.title platform=activePlatform %}
{% endfor %}
</div>
</section>
{% endfor %}
<section>
<div class="cards-group">
{% for section in hub.sections %}
{% include section-card.html platform=activePlatform hub=hub.href section=section.href title=section.title %}
{% endfor %}
{% for article in hub.articles %}
{% include article-card.html hub=hub.href href=article.href title=article.title platform=activePlatform %}
{% endfor %}
</div>
</section>
53 changes: 36 additions & 17 deletions docs/_includes/lhn-template.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{% assign activePlatform = page.url | replace:'/',' ' | truncatewords: 1 | remove:'...' %}
{% assign activeHub = page.url | remove: activePlatform | remove: "/hubs/" | remove: "/" | remove: ".html" %}
{% assign urlArray = page.url | replace: '/', ' ' | split: " " %}

{% assign activePlatform = urlArray[0] %}
{% assign platform = site.data.routes.platforms | where: "href", activePlatform | first %}

{% assign activeHub = urlArray[2] %}
{% assign hub = platform.hubs | where: "href", activeHub | first %}

{% assign activeSection = urlArray[3] | remove: ".html" %}
{% assign section = hub.sections | where: "href", activeSection | first %}

<ul class="lhn-items">
<li class="home-link">
Expand All @@ -13,33 +21,44 @@
{% for platform in site.data.routes.platforms %}
{% if platform.href == activePlatform %}
<li>
<div class="icon-with-link selected">
<a href="/" class="icon-with-link selected">
<img src="/assets/images/down.svg" class="base-icon"></img>
<span>{{ platform.title }}</span>
</div>
</a>
{% for hub in platform.hubs %}
<ul>
{% if hub.href == activeHub %}
<div class="icon-with-link selected">
<a href="/{{ activePlatform }}/hubs/" class="icon-with-link selected">
<img src="/assets/images/down.svg" class="base-icon"></img>
<span>{{ hub.title }}</span>
</div>
</a>
<ul class="nested-treeview">
{% for article in hub.articles %}
{% include lhn-article-link.html platform=activePlatform hub=hub.href href=article.href title=article.title %}
{% endfor %}

{% for section in hub.sections %}
<li>
<a href="#{{ section.href }}" class="link">{{ section.title }}</a>
<ul>
{% for article in section.articles %}
{% assign article_href = section.href | append: '/' | append: article.href %}
{% include lhn-article-link.html platform=activePlatform hub=hub.href href=article_href title=article.title %}
{% endfor %}
</ul>
{% if section.href == activeSection %}
<a href="/{{ activePlatform }}/hubs/{{ hub.href }}" class="icon-with-link selected">
<img src="/assets/images/down.svg" class="base-icon"></img>
<span>{{ section.title }}</span>
</a>
<ul>
{% for article in section.articles %}
{% assign article_href = section.href | append: '/' | append: article.href %}
{% include lhn-article-link.html platform=activePlatform hub=hub.href href=article_href title=article.title %}
{% endfor %}
</ul>
{% else %}
<a href="{{ section.href }}" class="icon-with-link link">
<img src="/assets/images/arrow-right.svg" class="base-icon"></img>
{{ section.title }}
</a>
{% endif %}

</li>
{% endfor %}

{% for article in hub.articles %}
{% include lhn-article-link.html platform=activePlatform hub=hub.href href=article.href title=article.title %}
{% endfor %}
</ul>
{% else %}
<li>
Expand Down
2 changes: 1 addition & 1 deletion docs/_includes/platform.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="homepage">
<h1 class="title">{{ platform.hub-title }}</h1>

<p>{{ site.data.routes.home.description }}</p>
<p>{{ platform.hub-description }}</p>

<div class="platform-cards-group">
{% for hub in platform.hubs %}
Expand Down
8 changes: 8 additions & 0 deletions docs/_includes/section-card.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<a class="card" href="/{{ include.platform }}/hubs/{{ include.hub }}/{{ include.section }}">
<div class="body">
<h4 class="title">{{ include.title }}</h4>
</div>
<div class="right-icon">
<img src="/assets/images/arrow-right.svg" class="base-icon"></img>
</div>
</a>
23 changes: 23 additions & 0 deletions docs/_includes/section.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{% assign urlArray = page.url | replace: '/', ' ' | split: " " %}

{% assign activePlatform = urlArray[0] %}
{% assign platform = site.data.routes.platforms | where: "href", activePlatform | first %}

{% assign activeHub = urlArray[2] %}
{% assign hub = platform.hubs | where: "href", activeHub | first %}

{% assign activeSection = urlArray[3] | remove: ".html" %}
{% assign section = hub.sections | where: "href", activeSection | first %}

<h1 class="title">
{{ section.title }}
</h1>

<section>
<div class="cards-group">
{% for article in section.articles %}
{% assign article_href = section.href | append: '/' | append: article.href %}
{% include article-card.html hub=hub.href href=article_href title=article.title platform=activePlatform %}
{% endfor %}
</div>
</section>
8 changes: 4 additions & 4 deletions docs/_sass/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ button {
}

.selected {
cursor: auto;
font-weight: bold;
color: $color-text;
}
Expand Down Expand Up @@ -445,21 +444,22 @@ button {
}
}

.cards-group, .platform-cards-group {
.cards-group {
display: grid;
grid-template-columns: auto;
row-gap: 20px;
column-gap: 20px;
padding-bottom: 20px;
}

.cards-group {
@include breakpoint($breakpoint-desktop) {
grid-template-columns: 50% 50%;
}
}


.platform-cards-group {
@extend .cards-group;

@include breakpoint($breakpoint-desktop) {
grid-template-columns: 33.33% 33.33% 33.33%;
}
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Business Bank Accounts - AUD
description: Business Bank Accounts - AUD
---
## Resource Coming Soon!
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Deposit Accounts - AUD
description: Deposit Accounts - AUD
---
## Resource Coming Soon!

This file was deleted.

5 changes: 0 additions & 5 deletions docs/articles/expensify-classic/exports/The-Reports-Page.md

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit d2331d3

Please sign in to comment.