From 0b2c77ea79d5e36eb568c754dd7f530cd31a69ff Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Thu, 21 Sep 2023 15:39:59 +0530 Subject: [PATCH 01/13] show platforms in homepage --- docs/_includes/platform.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 docs/_includes/platform.html diff --git a/docs/_includes/platform.html b/docs/_includes/platform.html new file mode 100644 index 000000000000..f3867ee4f5b7 --- /dev/null +++ b/docs/_includes/platform.html @@ -0,0 +1,18 @@ +{% assign selectedPlatform = page.url | remove: "/hubs/" | remove: "/" | remove: ".html" %} +{% assign platform = site.data.routes.platforms | where: "href", selectedPlatform | first %} +
+

{{ platform.hub-title }}

+ +

{{ site.data.routes.home.description }}

+ +
+ {% for hub in platform.hubs %} + {% include hub-card.html hub=hub platform=selectedPlatform %} + {% endfor %} +
+ +
+ + {% include floating-concierge-button.html id="floating-concierge-button-global" %} +
+
From a56668fa12d6c47140023d14ca0d5f796949a474 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Thu, 21 Sep 2023 15:42:05 +0530 Subject: [PATCH 02/13] show platforms in homepage --- docs/index.html | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/docs/index.html b/docs/index.html index 74296c200971..70bd5f31545a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,15 +6,11 @@

{{ site.data.routes.home.title }}

{{ site.data.routes.home.description }}

-

- Which best describes how you use Expensify? -

-
- {% include hub-card.html href="split-bills" %} - {% include hub-card.html href="request-money" %} - {% include hub-card.html href="playbooks" %} - {% include hub-card.html href="other" %} + {% for platform in site.data.routes.platforms %} + {% assign platform_href = platform.href %} + {% include platform-card.html href=platform.platform_href %} + {% endfor %}
From 08a3bae8fc503b8d0412861bf0361fde9ccde3bb Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Thu, 21 Sep 2023 15:42:23 +0530 Subject: [PATCH 03/13] add platform cards --- docs/_includes/platform-card.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 docs/_includes/platform-card.html diff --git a/docs/_includes/platform-card.html b/docs/_includes/platform-card.html new file mode 100644 index 000000000000..d56a234a5c14 --- /dev/null +++ b/docs/_includes/platform-card.html @@ -0,0 +1,13 @@ +{% assign platform = site.data.routes.platforms | where: "href", include.href | first %} + + +
+
+ {{ platform.href }} +
+
+

{{ platform.title }}

+

{{ platform.description }}

+
+
+
From 00492272c2bb7734666fe6cda4654492cfe2c5e8 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Thu, 21 Sep 2023 15:44:32 +0530 Subject: [PATCH 04/13] show platform sepecific articles --- docs/_includes/article-card.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_includes/article-card.html b/docs/_includes/article-card.html index a088e5e406db..b6d8998c13ef 100644 --- a/docs/_includes/article-card.html +++ b/docs/_includes/article-card.html @@ -1,4 +1,4 @@ - +

{{ include.title }}

From e157b28b9dc676ef7d2ac9454355fd65fd8d9abf Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Thu, 21 Sep 2023 15:46:23 +0530 Subject: [PATCH 05/13] show platform specific hubs --- docs/_includes/hub-card.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/_includes/hub-card.html b/docs/_includes/hub-card.html index 36bf3bc36e6a..b5188bda7670 100644 --- a/docs/_includes/hub-card.html +++ b/docs/_includes/hub-card.html @@ -1,6 +1,6 @@ -{% assign hub = site.data.routes.hubs | where: "href", include.href | first %} - -
+{% assign hub = include.hub %} +{% assign platform = include.platform %} +
{{ hub.href }} From 47087a7723308cf7a3989b288bb5d930cde7dc3e Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Thu, 21 Sep 2023 15:49:23 +0530 Subject: [PATCH 06/13] show platform specific articles --- docs/_includes/hub.html | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/docs/_includes/hub.html b/docs/_includes/hub.html index acdc901a38f6..6b0b0e590b19 100644 --- a/docs/_includes/hub.html +++ b/docs/_includes/hub.html @@ -1,5 +1,8 @@ -{% assign activeHub = page.url | remove: "/hubs/" | remove: ".html" %} -{% assign hub = site.data.routes.hubs | where: "href", activeHub | first %} +{% assign activePlatform = page.url | replace: '/', ' ' | truncatewords: 1 | remove:'...' %} +{% assign platform = site.data.routes.platforms | where: "href", activePlatform | first %} + +{% assign activeHub = page.url | remove: activePlatform | remove: "/hubs/" | remove: "/" | remove: ".html" %} +{% assign hub = platform.hubs | where: "href", activeHub | first %}

{{ hub.title }} @@ -9,6 +12,16 @@

{{ hub.description }}

+{% if hub.articles %} +
+
+ {% for article in hub.articles %} + {% include article-card.html hub=hub.href href=article.href title=article.title platform=activePlatform %} + {% endfor %} +
+
+{% endif %} + {% for section in hub.sections %}

@@ -18,18 +31,8 @@

{% 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 %} + {% include article-card.html hub=hub.href href=article_href title=article.title platform=activePlatform %} {% endfor %}

{% endfor %} - -{% if hub.articles %} -
-
- {% for article in hub.articles %} - {% include article-card.html hub=hub.href href=article.href title=article.title %} - {% endfor %} -
-
-{% endif %} From ab47aca3e52d77b969fd4df592a149c541e4f09a Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Thu, 21 Sep 2023 15:51:25 +0530 Subject: [PATCH 07/13] show platforms in LHN --- docs/_includes/lhn-article-link.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_includes/lhn-article-link.html b/docs/_includes/lhn-article-link.html index f9c4f31f0dbe..91c0de4aacce 100644 --- a/docs/_includes/lhn-article-link.html +++ b/docs/_includes/lhn-article-link.html @@ -1,5 +1,5 @@
  • - + {{ include.title }}
  • From f3a43678f23c0f0113bf0369af89901b5758bc43 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Thu, 21 Sep 2023 15:52:13 +0530 Subject: [PATCH 08/13] show hubs and articles in LHN --- docs/_includes/lhn-template.html | 61 ++++++++++++++++++++------------ 1 file changed, 39 insertions(+), 22 deletions(-) diff --git a/docs/_includes/lhn-template.html b/docs/_includes/lhn-template.html index 0473e5da9e9c..015c8211e5b2 100644 --- a/docs/_includes/lhn-template.html +++ b/docs/_includes/lhn-template.html @@ -1,4 +1,5 @@ -{% assign activeHub = page.url | remove: "/hubs/" | remove: ".html" %} +{% assign activePlatform = page.url | replace:'/',' ' | truncatewords: 1 | remove:'...' %} +{% assign activeHub = page.url | remove: activePlatform | remove: "/hubs/" | remove: "/" | remove: ".html" %}
      - {% for hub in site.data.routes.hubs %} - {% if hub.href == activeHub %} + {% for platform in site.data.routes.platforms %} + {% if platform.href == activePlatform %}
    • -
        - - {% for section in hub.sections %} + {% for hub in platform.hubs %} +
          + {% if hub.href == activeHub %} + +
            + {% 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 %} +
          • + {{ section.title }} +
              + {% 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 %} +
            +
          • + {% endfor %} +
          + {% else %}
        • - {{ section.title }} -
            - {% for article in section.articles %} - {% assign article_href = section.href | append: '/' | append: article.href %} - {% include lhn-article-link.html hub=hub.href href=article_href title=article.title %} - {% endfor %} -
          + + + {{ hub.title }} +
        • - {% endfor %} - - - {% for article in hub.articles %} - {% include lhn-article-link.html hub=hub.href href=article.href title=article.title %} - {% endfor %} + {% endif %}
        + {% endfor %} + {% else %}
      • - + - {{ hub.title }} + {{ platform.title }}
      • {% endif %} From c68317dbd6527504b67b1a4bf5af5c80758ceb4a Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Thu, 21 Sep 2023 15:55:02 +0530 Subject: [PATCH 09/13] fix: deeplinking and pressing back --- docs/_layouts/default.html | 7 ------- docs/assets/js/main.js | 8 ++++---- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 209d14de0f48..de3fbc203243 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -96,12 +96,5 @@

        Didn't find what you were looking for?

        {% include footer.html %}

    - - - diff --git a/docs/assets/js/main.js b/docs/assets/js/main.js index f0f335536c20..aebd0f5d4864 100644 --- a/docs/assets/js/main.js +++ b/docs/assets/js/main.js @@ -58,10 +58,10 @@ function navigateBack() { return; } - const hubs = JSON.parse(document.getElementById('hubs-data').value); - const hubToNavigate = hubs.find((hub) => window.location.pathname.includes(hub)); // eslint-disable-line rulesdir/prefer-underscore-method - if (hubToNavigate) { - window.location.href = `/hubs/${hubToNavigate}`; + // Path name is of the form /articles/[platform]/[hub]/[resource] + const path = window.location.pathname.split('/'); + if (path[2] && path[3]) { + window.location.href = `/${path[2]}/hubs/${path[3]}`; } else { window.location.href = '/'; } From 7980860a235f32174a462466dfe45e6fe4d69973 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Thu, 21 Sep 2023 16:00:10 +0530 Subject: [PATCH 10/13] add icons for hubs --- docs/assets/images/accounting.svg | 68 +++++++++++++ docs/assets/images/bank-card.svg | 41 ++++++++ docs/assets/images/envelope-receipt.svg | 35 +++++++ docs/assets/images/gears.svg | 101 +++++++++++++++++++ docs/assets/images/hand-card.svg | 19 ++++ docs/assets/images/money-into-wallet.svg | 32 +++++++ docs/assets/images/money-receipt.svg | 34 +++++++ docs/assets/images/money-wings.svg | 26 +++++ docs/assets/images/monitor.svg | 12 +++ docs/assets/images/workflow.svg | 117 +++++++++++++++++++++++ 10 files changed, 485 insertions(+) create mode 100644 docs/assets/images/accounting.svg create mode 100644 docs/assets/images/bank-card.svg create mode 100644 docs/assets/images/envelope-receipt.svg create mode 100644 docs/assets/images/gears.svg create mode 100644 docs/assets/images/hand-card.svg create mode 100644 docs/assets/images/money-into-wallet.svg create mode 100644 docs/assets/images/money-receipt.svg create mode 100644 docs/assets/images/money-wings.svg create mode 100644 docs/assets/images/monitor.svg create mode 100644 docs/assets/images/workflow.svg diff --git a/docs/assets/images/accounting.svg b/docs/assets/images/accounting.svg new file mode 100644 index 000000000000..4398e9573747 --- /dev/null +++ b/docs/assets/images/accounting.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/assets/images/bank-card.svg b/docs/assets/images/bank-card.svg new file mode 100644 index 000000000000..48da9af0d986 --- /dev/null +++ b/docs/assets/images/bank-card.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/assets/images/envelope-receipt.svg b/docs/assets/images/envelope-receipt.svg new file mode 100644 index 000000000000..40f57cc4ebda --- /dev/null +++ b/docs/assets/images/envelope-receipt.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/assets/images/gears.svg b/docs/assets/images/gears.svg new file mode 100644 index 000000000000..23621afc8008 --- /dev/null +++ b/docs/assets/images/gears.svg @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/assets/images/hand-card.svg b/docs/assets/images/hand-card.svg new file mode 100644 index 000000000000..779e6ff4184c --- /dev/null +++ b/docs/assets/images/hand-card.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/docs/assets/images/money-into-wallet.svg b/docs/assets/images/money-into-wallet.svg new file mode 100644 index 000000000000..d6d5b0e7d6e7 --- /dev/null +++ b/docs/assets/images/money-into-wallet.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/assets/images/money-receipt.svg b/docs/assets/images/money-receipt.svg new file mode 100644 index 000000000000..379d56727e42 --- /dev/null +++ b/docs/assets/images/money-receipt.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/assets/images/money-wings.svg b/docs/assets/images/money-wings.svg new file mode 100644 index 000000000000..c2155080f721 --- /dev/null +++ b/docs/assets/images/money-wings.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/assets/images/monitor.svg b/docs/assets/images/monitor.svg new file mode 100644 index 000000000000..6e2580b4c9e8 --- /dev/null +++ b/docs/assets/images/monitor.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/docs/assets/images/workflow.svg b/docs/assets/images/workflow.svg new file mode 100644 index 000000000000..e5eac423cd1d --- /dev/null +++ b/docs/assets/images/workflow.svg @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 4cdd4b171606096b728b4ace0567f67f2ffe4a36 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 22 Sep 2023 08:30:20 +0530 Subject: [PATCH 11/13] add hub for exports --- docs/new-expensify/hubs/exports.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/new-expensify/hubs/exports.html b/docs/new-expensify/hubs/exports.html index e69de29bb2d1..16c96cb51d01 100644 --- a/docs/new-expensify/hubs/exports.html +++ b/docs/new-expensify/hubs/exports.html @@ -0,0 +1,6 @@ +--- +layout: default +title: Exports +--- + +{% include hub.html %} \ No newline at end of file From 869aa1c99a966cfb89284b82e76ff801e7289f51 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 22 Sep 2023 08:50:41 +0530 Subject: [PATCH 12/13] fix title case --- .github/scripts/createDocsRoutes.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/scripts/createDocsRoutes.js b/.github/scripts/createDocsRoutes.js index 39cd98383de1..b371caee24b4 100644 --- a/.github/scripts/createDocsRoutes.js +++ b/.github/scripts/createDocsRoutes.js @@ -16,7 +16,8 @@ const platformNames = { * @returns {String} */ function toTitleCase(str) { - return str.replace(/\w\S*/g, (txt) => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase()); + console.log(str) + return str.replace(/\w\S*/g, (txt) => txt.charAt(0).toUpperCase() + txt.substr(1)); } /** From 4f975528315842e5b0c15b43938721e965f409ee Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 22 Sep 2023 08:51:28 +0530 Subject: [PATCH 13/13] remove console log --- .github/scripts/createDocsRoutes.js | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/scripts/createDocsRoutes.js b/.github/scripts/createDocsRoutes.js index b371caee24b4..6604a9d207fa 100644 --- a/.github/scripts/createDocsRoutes.js +++ b/.github/scripts/createDocsRoutes.js @@ -16,7 +16,6 @@ const platformNames = { * @returns {String} */ function toTitleCase(str) { - console.log(str) return str.replace(/\w\S*/g, (txt) => txt.charAt(0).toUpperCase() + txt.substr(1)); }