From abb17dbd7a355b7a9b74b0354d41b6be8b1905a2 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Mon, 29 Jan 2024 03:14:06 +0530 Subject: [PATCH 01/25] add tabs --- docs/Gemfile | 1 + docs/Gemfile.lock | 3 ++ docs/_config.yml | 2 + docs/_layouts/default.html | 1 + docs/_sass/_main.scss | 50 +++++++++++++++++++ .../getting-started/Using-The-App.md | 46 ++++++++++++++++- docs/assets/js/tabs.js | 7 +++ 7 files changed, 108 insertions(+), 2 deletions(-) create mode 100644 docs/assets/js/tabs.js diff --git a/docs/Gemfile b/docs/Gemfile index 91971b594b4f..3616112f183a 100644 --- a/docs/Gemfile +++ b/docs/Gemfile @@ -13,6 +13,7 @@ gem "github-pages", group: :jekyll_plugins # If you have any plugins, put them here! group :jekyll_plugins do gem "jekyll-feed", "~> 0.12" + gem "jekyll-tabs" end # Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index de99bbcb48ef..567f66d9c468 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -149,6 +149,8 @@ GEM jekyll-sitemap (1.4.0) jekyll (>= 3.7, < 5.0) jekyll-swiss (1.0.0) + jekyll-tabs (1.2.1) + jekyll (>= 3.0, < 5.0) jekyll-theme-architect (0.2.0) jekyll (> 3.5, < 5.0) jekyll-seo-tag (~> 2.0) @@ -266,6 +268,7 @@ DEPENDENCIES jekyll-feed (~> 0.12) jekyll-redirect-from jekyll-seo-tag + jekyll-tabs liquid (~> 4.0.4) tzinfo (~> 1.2) tzinfo-data diff --git a/docs/_config.yml b/docs/_config.yml index 888f0b24a91e..12aaed805e1d 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -19,6 +19,8 @@ exclude: [README.md, TEMPLATE.md, vendor] plugins: - jekyll-seo-tag - jekyll-redirect-from + - jekyll-tabs + whitelist: - jekyll-redirect-from diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 7d98500ecf32..edb4a88d525e 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -12,6 +12,7 @@ + diff --git a/docs/_sass/_main.scss b/docs/_sass/_main.scss index cfdf4ff3a2bc..8a5ecddb64e1 100644 --- a/docs/_sass/_main.scss +++ b/docs/_sass/_main.scss @@ -842,3 +842,53 @@ button { } } } + + +.tab { + display: flex; + flex-wrap: wrap; + margin-left: -20px; + padding: 0; + list-style: none; + position: relative; +} + +.tab > * { + flex: none; + padding-left: 20px; + position: relative; +} + +.tab > * > a { + display: block; + text-align: center; + padding: 9px 20px; + color: #999; + border-bottom: 2px solid transparent; + border-bottom-color: transparent; + font-size: 12px; + text-transform: uppercase; + transition: color .1s ease-in-out; + line-height: 20px; +} + +.tab > .active > a { + color:#fff; + border-color: #00d47c; +} + +.tab > li > a { + text-decoration: none; + cursor: pointer; +} + +.tab-content { + padding: 0; +} + +.tab-content > li { + display: none; +} +.tab-content > li.active { + display: block; +} diff --git a/docs/articles/expensify-classic/getting-started/Using-The-App.md b/docs/articles/expensify-classic/getting-started/Using-The-App.md index 9b8bc530e12e..80c149a26944 100644 --- a/docs/articles/expensify-classic/getting-started/Using-The-App.md +++ b/docs/articles/expensify-classic/getting-started/Using-The-App.md @@ -4,11 +4,52 @@ description: Streamline expense management effortlessly with the Expensify mobil --- # Overview The Expensify mobile app is the ultimate expense management solution that makes it effortless to track and submit your receipts and expenses. Use the app to snap a picture of your receipts, categorize and submit expenses, and even review and approve expense reports. -# How to install the Expensify app + +# How to download the Expensify app + +{% tabs log %} + +{% tab log iOS %} To get started with Expensify on your mobile device, you need to download the app: -1. Visit the App Store (iOS) or Google Play Store (Android). +1. Visit the App Store (iOS). 2. Search for "Expensify" and select the official Expensify app. 3. Tap "Download" or "Install." + +{% endtab %} + +{% tab log android %} +To get started with Expensify on your mobile device, you need to download the app: +1. Visit the Google Play Store (Android). +2. Search for "Expensify" and select the official Expensify app. +3. Tap "Download" or "Install." +{% endtab %} + +{% endtabs %} + + +# How to smart scan + +{% tabs log %} +{% tab log iOS %} +To get started with Smartscan: +1. Open the app. +2. Click request money. +3. Allow permissions. +4. Take a photo of a receipt. + +{% endtab %} + +{% tab log android %} +To get started with Smartscan: +1. Open system settings. +2. Go to camera settings and allow permissions for Expensify. +3. Open the app. +4. Click request money. +5. Take a photo of a receipt. +{% endtab %} + +{% endtabs %} + Once the app is installed, open it and log in with your Expensify credentials. If you don't have an Expensify account, you can create one during the sign-up process. # How to enable on push notifications @@ -54,3 +95,4 @@ Expensify takes security seriously and employs encryption and other security mea Yes, you can use the mobile app offline to capture receipts and create expenses. The app will sync your data once you have an internet connection. {% include faq-end.md %} + diff --git a/docs/assets/js/tabs.js b/docs/assets/js/tabs.js new file mode 100644 index 000000000000..2607f4aeb2f9 --- /dev/null +++ b/docs/assets/js/tabs.js @@ -0,0 +1,7 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.jekyllTabs=e():t.jekyllTabs=e()}(self,(()=>{return t={918:t=>{t.exports={getChildPosition:t=>{const e=t.parentNode;for(let o=0;o{const o=document.querySelectorAll(t),a=[];for(let t=0;t{const e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild},addClass:(t,e,o)=>{t.className=t.className?`${t.className} ${e}`:e,setTimeout((()=>{t.className=t.className.replace(e,"").trim()}),o)}}},613:(t,e,o)=>{const{activateTabFromUrl:a,updateUrlWithActiveTab:n,handleTabClicked:s,addCopyToClipboardButtons:r,syncTabsWithSameLabels:l,appendToastMessageHTML:i}=o(925);t.exports={init:(t={})=>{const e={syncTabsWithSameLabels:!1,activateTabFromUrl:!1,addCopyToClipboardButtons:!1,copyToClipboardSettings:{buttonHTML:"",showToastMessageOnCopy:!1,toastMessage:"Code copied to clipboard",toastDuration:3e3}},o={...e,...t,copyToClipboardSettings:{...e.copyToClipboardSettings,...t.copyToClipboardSettings}},c=document.querySelectorAll("ul.tab > li > a");if(Array.prototype.forEach.call(c,(t=>{t.addEventListener("click",(e=>{e.preventDefault(),s(t),o.activateTabFromUrl&&n(t),o.syncTabsWithSameLabels&&l(t)}),!1)})),o.addCopyToClipboardButtons){const t=o.copyToClipboardSettings;r(t),t.showToastMessageOnCopy&&i(t.toastMessage)}o.activateTabFromUrl&&a()}}},925:(t,e,o)=>{const{getChildPosition:a,createElementFromHTML:n,findElementsWithTextContent:s,addClass:r}=o(918),l=t=>{const e=t.querySelectorAll("ul > li");Array.prototype.forEach.call(e,(t=>{t.classList.remove("active")}))},i=t=>{const e=t.parentNode,o=e.parentNode,n=a(e);if(e.className.includes("active"))return;const s=o.getAttribute("data-tab");if(!s)return;const r=document.getElementById(s);l(o),l(r),r.querySelectorAll("ul.tab-content > li")[n].classList.add("active"),e.classList.add("active")},c=(t,e)=>{if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(t);else{const e=document.createElement("textarea");e.value=t,e.style.position="absolute",e.style.left="-999999px",document.body.prepend(e),e.select();try{document.execCommand("copy")}catch(t){console.error(t)}finally{e.remove()}}"function"==typeof e&&e()},d=t=>{r(document.getElementById("jekyll-tabs-copy-to-clipboard-message"),"show",t)};t.exports={removeActiveClasses:l,handleTabClicked:i,copyToClipboard:c,addCopyToClipboardButtons:({buttonHTML:t,showToastMessageOnCopy:e,toastDuration:o})=>{const a=document.querySelectorAll("ul.tab-content > li pre");for(let s=0;s{d(o)}),i.addEventListener("click",(()=>{c(r.innerText,p)}))}},activateTabFromUrl:()=>{const t=window.location.hash?.substring(1);if(!t)return;const e=document.getElementById(t);if(!e)return;const o=new URLSearchParams(window.location.search).get("active_tab");if(!o)return;const a=e.querySelector("li#"+o+" > a");a&&i(a)},updateUrlWithActiveTab:t=>{const e=t.parentNode,o=e.parentNode,a=new URLSearchParams(window.location.search);a.set("active_tab",e.id);const n=window.location.pathname+"?"+a.toString()+"#"+o.id;history.replaceState(null,"",n)},syncTabsWithSameLabels:t=>{const e=s("a",t.textContent);for(let o=0;o{const e=document.createElement("div");e.id="jekyll-tabs-copy-to-clipboard-message",e.textContent=t,document.getElementsByTagName("body")[0].appendChild(e)}}}},e={},function o(a){var n=e[a];if(void 0!==n)return n.exports;var s=e[a]={exports:{}};return t[a](s,s.exports,o),s.exports}(613);var t,e})); + +window.addEventListener('load', function () { + jekyllTabs.init({ + syncTabsWithSameLabels: true, + }); +}); From 13358a9ad6d4d332c92e1aa501526eabb0cf4414 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Mon, 29 Jan 2024 03:50:26 +0530 Subject: [PATCH 02/25] add tab style --- docs/_sass/_main.scss | 19 ++++++++----------- .../getting-started/Using-The-App.md | 9 ++++----- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/docs/_sass/_main.scss b/docs/_sass/_main.scss index 8a5ecddb64e1..3f5aa45b3c18 100644 --- a/docs/_sass/_main.scss +++ b/docs/_sass/_main.scss @@ -847,39 +847,36 @@ button { .tab { display: flex; flex-wrap: wrap; + align-items: center; margin-left: -20px; padding: 0; list-style: none; - position: relative; + // position: relative; } .tab > * { flex: none; - padding-left: 20px; position: relative; } .tab > * > a { display: block; + color: #AFBBB0; + font-size: 13px; text-align: center; - padding: 9px 20px; - color: #999; - border-bottom: 2px solid transparent; - border-bottom-color: transparent; - font-size: 12px; - text-transform: uppercase; - transition: color .1s ease-in-out; - line-height: 20px; + font-weight: 700; } .tab > .active > a { color:#fff; - border-color: #00d47c; + background-color: #1A3D32; } .tab > li > a { text-decoration: none; cursor: pointer; + border-radius: 20px; + padding: 10px 20px; } .tab-content { diff --git a/docs/articles/expensify-classic/getting-started/Using-The-App.md b/docs/articles/expensify-classic/getting-started/Using-The-App.md index 80c149a26944..efc5802007fb 100644 --- a/docs/articles/expensify-classic/getting-started/Using-The-App.md +++ b/docs/articles/expensify-classic/getting-started/Using-The-App.md @@ -2,14 +2,13 @@ title: Using the app description: Streamline expense management effortlessly with the Expensify mobile app. Learn how to install, enable push notifications, and use SmartScan to capture, categorize, and track expenses. Versatile for personal and business use, Expensify is a secure and automated solution for managing your finances on the go. --- +{% tabs log %} +{% tab log iOS %} # Overview The Expensify mobile app is the ultimate expense management solution that makes it effortless to track and submit your receipts and expenses. Use the app to snap a picture of your receipts, categorize and submit expenses, and even review and approve expense reports. # How to download the Expensify app -{% tabs log %} - -{% tab log iOS %} To get started with Expensify on your mobile device, you need to download the app: 1. Visit the App Store (iOS). 2. Search for "Expensify" and select the official Expensify app. @@ -17,7 +16,7 @@ To get started with Expensify on your mobile device, you need to download the ap {% endtab %} -{% tab log android %} +{% tab log Android %} To get started with Expensify on your mobile device, you need to download the app: 1. Visit the Google Play Store (Android). 2. Search for "Expensify" and select the official Expensify app. @@ -39,7 +38,7 @@ To get started with Smartscan: {% endtab %} -{% tab log android %} +{% tab log Android %} To get started with Smartscan: 1. Open system settings. 2. Go to camera settings and allow permissions for Expensify. From 7192beb7ef62201a33e4ee415c30ff8b6650f9df Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 30 Jan 2024 01:20:07 +0530 Subject: [PATCH 03/25] add platforms tabs --- docs/_layouts/default.html | 12 ++- docs/_sass/_main.scss | 51 ++++------ .../deposit-accounts/Deposit-Accounts-AUD.md | 8 ++ .../deposit-accounts/Deposit-Accounts-USD.md | 3 + .../getting-started/Using-The-App.md | 50 +++------- docs/assets/js/main.js | 99 ++++++++++++++----- docs/assets/js/platform-tabs.js | 26 +++++ 7 files changed, 150 insertions(+), 99 deletions(-) create mode 100644 docs/assets/js/platform-tabs.js diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index edb4a88d525e..4803a53e3960 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -13,6 +13,7 @@ + @@ -65,10 +66,13 @@
{% if page.url contains "/articles/" %} -

- {{ page.name | remove: '.md' | split: "-" | join: " " }} -

- +
+

+ {{ page.name | remove: '.md' | split: "-" | join: " " }} +

+
+
+
{{ content }}
diff --git a/docs/_sass/_main.scss b/docs/_sass/_main.scss index 3f5aa45b3c18..dea12a04f3c7 100644 --- a/docs/_sass/_main.scss +++ b/docs/_sass/_main.scss @@ -354,6 +354,9 @@ button { } .article { + .hidden { + display: none; + } img { display: block; margin: 20px auto; @@ -843,49 +846,31 @@ button { } } +.title-platform-tabs { + display: flex; + justify-content: space-between; + padding-bottom: 12px; + h1 { + padding: 0; + } +} -.tab { +#platform-tabs { display: flex; flex-wrap: wrap; align-items: center; - margin-left: -20px; - padding: 0; - list-style: none; - // position: relative; -} - -.tab > * { - flex: none; - position: relative; -} - -.tab > * > a { - display: block; - color: #AFBBB0; - font-size: 13px; text-align: center; font-weight: 700; + font-size: 13px; } -.tab > .active > a { - color:#fff; - background-color: #1A3D32; -} - -.tab > li > a { - text-decoration: none; +#platform-tabs > * { cursor: pointer; border-radius: 20px; padding: 10px 20px; } -.tab-content { - padding: 0; -} - -.tab-content > li { - display: none; -} -.tab-content > li.active { - display: block; -} +#platform-tabs > .active { + color:#fff; + background-color: #1A3D32; +} \ No newline at end of file diff --git a/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-AUD.md b/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-AUD.md index 6114e98883e0..1863c767c40a 100644 --- a/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-AUD.md +++ b/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-AUD.md @@ -3,6 +3,8 @@ title: Deposit Accounts (AUD) description: Expensify allows you to add a personal bank account to receive reimbursements for your expenses. We never take money out of this account — it is only a place for us to deposit funds from your employer. This article covers deposit accounts for Australian banks. --- +
+ ## How-to add your Australian personal deposit account information 1. Confirm with your Policy Admin that they’ve set up Global Reimbursment 2. Set your default policy (by selecting the correct policy after clicking on your profile picture) before adding your deposit account. @@ -20,3 +22,9 @@ Bank accounts are easy to delete! Simply click the red **Delete** button in the You can complete this process on a computer or on the mobile app. +
+ +
+## How-to add your Australian personal deposit account information + +
diff --git a/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-USD.md b/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-USD.md index 0bc5cb0ad955..61a0fe539194 100644 --- a/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-USD.md +++ b/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-USD.md @@ -2,6 +2,8 @@ title: Deposit Accounts - USD description: How to add a deposit account to receive payments for yourself or your business (US) --- +
+ # Overview There are two types of deposit-only accounts: @@ -75,3 +77,4 @@ There are a few reasons a reimbursement may be unsuccessful. The first step is t If you aren’t sure, please reach out to Concierge and we can assist! {% include faq-end.md %} +
\ No newline at end of file diff --git a/docs/articles/expensify-classic/getting-started/Using-The-App.md b/docs/articles/expensify-classic/getting-started/Using-The-App.md index efc5802007fb..3172aab3b69a 100644 --- a/docs/articles/expensify-classic/getting-started/Using-The-App.md +++ b/docs/articles/expensify-classic/getting-started/Using-The-App.md @@ -2,53 +2,21 @@ title: Using the app description: Streamline expense management effortlessly with the Expensify mobile app. Learn how to install, enable push notifications, and use SmartScan to capture, categorize, and track expenses. Versatile for personal and business use, Expensify is a secure and automated solution for managing your finances on the go. --- -{% tabs log %} -{% tab log iOS %} + +
# Overview The Expensify mobile app is the ultimate expense management solution that makes it effortless to track and submit your receipts and expenses. Use the app to snap a picture of your receipts, categorize and submit expenses, and even review and approve expense reports. -# How to download the Expensify app - -To get started with Expensify on your mobile device, you need to download the app: -1. Visit the App Store (iOS). -2. Search for "Expensify" and select the official Expensify app. -3. Tap "Download" or "Install." - -{% endtab %} - -{% tab log Android %} -To get started with Expensify on your mobile device, you need to download the app: -1. Visit the Google Play Store (Android). -2. Search for "Expensify" and select the official Expensify app. -3. Tap "Download" or "Install." -{% endtab %} - -{% endtabs %} - # How to smart scan -{% tabs log %} -{% tab log iOS %} + To get started with Smartscan: 1. Open the app. 2. Click request money. 3. Allow permissions. 4. Take a photo of a receipt. -{% endtab %} - -{% tab log Android %} -To get started with Smartscan: -1. Open system settings. -2. Go to camera settings and allow permissions for Expensify. -3. Open the app. -4. Click request money. -5. Take a photo of a receipt. -{% endtab %} - -{% endtabs %} - Once the app is installed, open it and log in with your Expensify credentials. If you don't have an Expensify account, you can create one during the sign-up process. # How to enable on push notifications @@ -94,4 +62,16 @@ Expensify takes security seriously and employs encryption and other security mea Yes, you can use the mobile app offline to capture receipts and create expenses. The app will sync your data once you have an internet connection. {% include faq-end.md %} +
+
+ +# How to smart scan + + +To get started with Smartscan: +1. Open the app. +2. Click request money. +3. Allow permissions. +4. Take a photo of a receipt. +
\ No newline at end of file diff --git a/docs/assets/js/main.js b/docs/assets/js/main.js index 6e154bb09a44..af1c798e2601 100644 --- a/docs/assets/js/main.js +++ b/docs/assets/js/main.js @@ -165,6 +165,37 @@ window.addEventListener('load', () => { insertElementAfter(searchInput, searchLabel); }); +const tocbotOptions = { + // Where to render the table of contents. + tocSelector: '.article-toc', + + // Where to grab the headings to build the table of contents. + contentSelector: '', + + // Disable the collapsible functionality of the library by + // setting the maximum number of heading levels (6) + collapseDepth: 6, + headingSelector: 'h1, h2, h3, summary', + + // Main class to add to lists. + listClass: 'lhn-items', + + // Main class to add to links. + linkClass: 'link', + + // Class to add to active links, + // the link corresponding to the top most heading on the page. + activeLinkClass: 'selected-article', + + // Headings offset between the headings and the top of the document (requires scrollSmooth enabled) + headingsOffset: 80, + scrollSmoothOffset: -80, + scrollSmooth: true, + + // If there is a fixed article scroll container, set to calculate titles' offset + scrollContainer: 'content-area', +} + window.addEventListener('DOMContentLoaded', () => { injectFooterCopywrite(); @@ -179,36 +210,50 @@ window.addEventListener('DOMContentLoaded', () => { buttonCloseSidebar.addEventListener('click', closeSidebar); } - if (window.tocbot) { - window.tocbot.init({ - // Where to render the table of contents. - tocSelector: '.article-toc', - - // Where to grab the headings to build the table of contents. - contentSelector: '.article-toc-content', - - // Disable the collapsible functionality of the library by - // setting the maximum number of heading levels (6) - collapseDepth: 6, - headingSelector: 'h1, h2, h3, summary', - - // Main class to add to lists. - listClass: 'lhn-items', - - // Main class to add to links. - linkClass: 'link', + const expensifyClassic = document.getElementById('platform-expensify-classic'); + const newExpensify = document.getElementById('platform-new-expensify'); + + const expensifyClassicContent = document.getElementById('expensify-classic'); + const newExpensifyContent = document.getElementById('new-expensify'); + + let defaultPlatform; + if (expensifyClassicContent) { + defaultPlatform = '#expensify-classic'; + } else if(newExpensifyContent) { + defaultPlatform = '#new-expensify'; + } else { + defaultPlatform = '.article-toc-content'; + } - // Class to add to active links, - // the link corresponding to the top most heading on the page. - activeLinkClass: 'selected-article', + expensifyClassic?.addEventListener('click', (e) => { + expensifyClassic.classList.add('active'); + expensifyClassicContent.classList.remove('hidden'); + + newExpensify.classList.remove('active'); + newExpensifyContent.classList.add('hidden'); + window.tocbot.refresh({ + ...tocbotOptions, + contentSelector: '#expensify-classic' + }); + }); - // Headings offset between the headings and the top of the document (requires scrollSmooth enabled) - headingsOffset: 80, - scrollSmoothOffset: -80, - scrollSmooth: true, + newExpensify?.addEventListener('click', (e) => { + newExpensify.classList.add('active'); + newExpensifyContent.classList.remove('hidden'); + + expensifyClassic.classList.remove('active'); + expensifyClassicContent.classList.add('hidden'); + active = '#new-expensify'; + window.tocbot.refresh({ + ...tocbotOptions, + contentSelector: '#new-expensify' + }); + }); - // If there is a fixed article scroll container, set to calculate titles' offset - scrollContainer: 'content-area', + if (window.tocbot) { + window.tocbot.init({ + ...tocbotOptions, + contentSelector: defaultPlatform, }); } diff --git a/docs/assets/js/platform-tabs.js b/docs/assets/js/platform-tabs.js new file mode 100644 index 000000000000..25d426af7b53 --- /dev/null +++ b/docs/assets/js/platform-tabs.js @@ -0,0 +1,26 @@ +const expensifyClassic = document.getElementById('platform-expensify-classic'); +const newExpensify = document.getElementById('platform-new-expensify'); + + +const expensifyClassicContent = document.getElementById('expensify-classic'); +const newExpensifyContent = document.getElementById('new-expensify'); + +const platformTabs = document.getElementById('platform-tabs'); +if (expensifyClassicContent) { + const tab = document.createElement('div'); + tab.innerHTML = 'Expensify classic'; + tab.id = 'platform-expensify-classic'; + tab.classList.add('active'); + platformTabs.appendChild(tab); +} + +if (newExpensifyContent) { + const tab = document.createElement('div'); + tab.innerHTML = 'New expensify'; + tab.id = 'platform-new-expensify'; + + if (!expensifyClassicContent) { + tab.classList.add('active'); + } + platformTabs.appendChild(tab); +} From 9ae293ee8b707e8b591545c28b5cd046ea91019c Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 30 Jan 2024 01:25:51 +0530 Subject: [PATCH 04/25] cleanup --- docs/assets/js/main.js | 30 +++++++++++++++--------------- docs/assets/js/platform-tabs.js | 8 ++++---- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/assets/js/main.js b/docs/assets/js/main.js index af1c798e2601..1de88432edbd 100644 --- a/docs/assets/js/main.js +++ b/docs/assets/js/main.js @@ -210,22 +210,29 @@ window.addEventListener('DOMContentLoaded', () => { buttonCloseSidebar.addEventListener('click', closeSidebar); } - const expensifyClassic = document.getElementById('platform-expensify-classic'); - const newExpensify = document.getElementById('platform-new-expensify'); + const expensifyClassicTab = document.getElementById('platform-tab-expensify-classic'); + const newExpensifyTab = document.getElementById('platform-tab-new-expensify'); const expensifyClassicContent = document.getElementById('expensify-classic'); const newExpensifyContent = document.getElementById('new-expensify'); - let defaultPlatform; + let contentSelector; if (expensifyClassicContent) { - defaultPlatform = '#expensify-classic'; + contentSelector = '#expensify-classic'; } else if(newExpensifyContent) { - defaultPlatform = '#new-expensify'; + contentSelector = '#new-expensify'; } else { - defaultPlatform = '.article-toc-content'; + contentSelector = '.article-toc-content'; } - expensifyClassic?.addEventListener('click', (e) => { + if (window.tocbot) { + window.tocbot.init({ + ...tocbotOptions, + contentSelector, + }); + } + + expensifyClassicTab?.addEventListener('click', () => { expensifyClassic.classList.add('active'); expensifyClassicContent.classList.remove('hidden'); @@ -237,7 +244,7 @@ window.addEventListener('DOMContentLoaded', () => { }); }); - newExpensify?.addEventListener('click', (e) => { + newExpensifyTab?.addEventListener('click', () => { newExpensify.classList.add('active'); newExpensifyContent.classList.remove('hidden'); @@ -250,13 +257,6 @@ window.addEventListener('DOMContentLoaded', () => { }); }); - if (window.tocbot) { - window.tocbot.init({ - ...tocbotOptions, - contentSelector: defaultPlatform, - }); - } - document.getElementById('header-button').addEventListener('click', toggleHeaderMenu); // Back button doesn't exist on all the pages diff --git a/docs/assets/js/platform-tabs.js b/docs/assets/js/platform-tabs.js index 25d426af7b53..caf547e1d2e9 100644 --- a/docs/assets/js/platform-tabs.js +++ b/docs/assets/js/platform-tabs.js @@ -1,5 +1,5 @@ -const expensifyClassic = document.getElementById('platform-expensify-classic'); -const newExpensify = document.getElementById('platform-new-expensify'); +const expensifyClassic = document.getElementById('platform-tab-expensify-classic'); +const newExpensify = document.getElementById('platform-tab-new-expensify'); const expensifyClassicContent = document.getElementById('expensify-classic'); @@ -9,7 +9,7 @@ const platformTabs = document.getElementById('platform-tabs'); if (expensifyClassicContent) { const tab = document.createElement('div'); tab.innerHTML = 'Expensify classic'; - tab.id = 'platform-expensify-classic'; + tab.id = 'platform-tab-expensify-classic'; tab.classList.add('active'); platformTabs.appendChild(tab); } @@ -17,7 +17,7 @@ if (expensifyClassicContent) { if (newExpensifyContent) { const tab = document.createElement('div'); tab.innerHTML = 'New expensify'; - tab.id = 'platform-new-expensify'; + tab.id = 'platform-tab-new-expensify'; if (!expensifyClassicContent) { tab.classList.add('active'); From 55e75b836d8e5bc8d9dfe3b32709fd664450c3a2 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 30 Jan 2024 01:33:54 +0530 Subject: [PATCH 05/25] cleanup --- .../getting-started/Using-The-App.md | 24 +++++-------------- docs/assets/js/platform-tabs.js | 4 ++-- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/docs/articles/expensify-classic/getting-started/Using-The-App.md b/docs/articles/expensify-classic/getting-started/Using-The-App.md index 3172aab3b69a..f1bc31793ba8 100644 --- a/docs/articles/expensify-classic/getting-started/Using-The-App.md +++ b/docs/articles/expensify-classic/getting-started/Using-The-App.md @@ -6,18 +6,12 @@ description: Streamline expense management effortlessly with the Expensify mobil
# Overview The Expensify mobile app is the ultimate expense management solution that makes it effortless to track and submit your receipts and expenses. Use the app to snap a picture of your receipts, categorize and submit expenses, and even review and approve expense reports. +# How to install the Expensify app +To get started with Expensify on your mobile device, you need to download the app: +1. Visit the App Store (iOS) or Google Play Store (Android). +2. Search for "Expensify" and select the official Expensify app. +3. Tap "Download" or "Install." - -# How to smart scan - - -To get started with Smartscan: -1. Open the app. -2. Click request money. -3. Allow permissions. -4. Take a photo of a receipt. - - Once the app is installed, open it and log in with your Expensify credentials. If you don't have an Expensify account, you can create one during the sign-up process. # How to enable on push notifications Push notifications keep you informed about expense approvals, reimbursements, and more. To enable push notifications: @@ -65,13 +59,7 @@ Yes, you can use the mobile app offline to capture receipts and create expenses.
-# How to smart scan - +# Coming soon -To get started with Smartscan: -1. Open the app. -2. Click request money. -3. Allow permissions. -4. Take a photo of a receipt.
\ No newline at end of file diff --git a/docs/assets/js/platform-tabs.js b/docs/assets/js/platform-tabs.js index caf547e1d2e9..d49d898517c4 100644 --- a/docs/assets/js/platform-tabs.js +++ b/docs/assets/js/platform-tabs.js @@ -1,16 +1,16 @@ const expensifyClassic = document.getElementById('platform-tab-expensify-classic'); const newExpensify = document.getElementById('platform-tab-new-expensify'); - const expensifyClassicContent = document.getElementById('expensify-classic'); const newExpensifyContent = document.getElementById('new-expensify'); const platformTabs = document.getElementById('platform-tabs'); + if (expensifyClassicContent) { const tab = document.createElement('div'); tab.innerHTML = 'Expensify classic'; tab.id = 'platform-tab-expensify-classic'; - tab.classList.add('active'); + tab.classList.add('active'); platformTabs.appendChild(tab); } From 6acdd897acd6c4b2395a665871913d5338aa747d Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 30 Jan 2024 01:34:38 +0530 Subject: [PATCH 06/25] cleanup --- .../deposit-accounts/Deposit-Accounts-AUD.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-AUD.md b/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-AUD.md index 1863c767c40a..c1082a211443 100644 --- a/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-AUD.md +++ b/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-AUD.md @@ -3,8 +3,6 @@ title: Deposit Accounts (AUD) description: Expensify allows you to add a personal bank account to receive reimbursements for your expenses. We never take money out of this account — it is only a place for us to deposit funds from your employer. This article covers deposit accounts for Australian banks. --- -
- ## How-to add your Australian personal deposit account information 1. Confirm with your Policy Admin that they’ve set up Global Reimbursment 2. Set your default policy (by selecting the correct policy after clicking on your profile picture) before adding your deposit account. @@ -22,9 +20,4 @@ Bank accounts are easy to delete! Simply click the red **Delete** button in the You can complete this process on a computer or on the mobile app. -
- -
-## How-to add your Australian personal deposit account information -
From e07c1001cfd84c682a6a81af75e87c2d392759db Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 30 Jan 2024 01:35:03 +0530 Subject: [PATCH 07/25] cleanup --- .../deposit-accounts/Deposit-Accounts-AUD.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-AUD.md b/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-AUD.md index c1082a211443..6114e98883e0 100644 --- a/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-AUD.md +++ b/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-AUD.md @@ -20,4 +20,3 @@ Bank accounts are easy to delete! Simply click the red **Delete** button in the You can complete this process on a computer or on the mobile app. - From 29a2e31acf9e6721f03e7d56d99e09035eda50e8 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 30 Jan 2024 01:36:37 +0530 Subject: [PATCH 08/25] cleanup --- .../deposit-accounts/Deposit-Accounts-USD.md | 4 +--- .../workspace-and-domain-settings/Domain-Settings-Overview.md | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-USD.md b/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-USD.md index 61a0fe539194..8880e923ce3b 100644 --- a/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-USD.md +++ b/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-USD.md @@ -2,7 +2,6 @@ title: Deposit Accounts - USD description: How to add a deposit account to receive payments for yourself or your business (US) --- -
# Overview @@ -76,5 +75,4 @@ There are a few reasons a reimbursement may be unsuccessful. The first step is t If you aren’t sure, please reach out to Concierge and we can assist! -{% include faq-end.md %} -
\ No newline at end of file +{% include faq-end.md %} \ No newline at end of file diff --git a/docs/articles/new-expensify/workspace-and-domain-settings/Domain-Settings-Overview.md b/docs/articles/new-expensify/workspace-and-domain-settings/Domain-Settings-Overview.md index 40d759479390..730d696d97f4 100644 --- a/docs/articles/new-expensify/workspace-and-domain-settings/Domain-Settings-Overview.md +++ b/docs/articles/new-expensify/workspace-and-domain-settings/Domain-Settings-Overview.md @@ -2,7 +2,7 @@ title: Domains description: Want to gain greater control over your company settings in Expensify? Read on to find out more about our Domains feature and how it can help you save time and effort when managing your company expenses. --- - +
# Overview Domains is a feature in Expensify that allows admins to have more nuanced control over a specific Expensify activity, as well as providing a bird’s eye view of company card expenditure. Think of it as your command center for things like managing user account access, enforcing stricter Workspace rules for certain groups, or issuing cards and reconciling statements. There are several settings within Domains that you can configure so that you have more control and visibility into your organization’s settings. Those features are: @@ -140,3 +140,4 @@ You can manage multiple domains by adding them through **Settings > Domains > Ne Claiming a domain is limited to users with matching email domains, and allows Workspace Admins with a company email to manage bills, company cards, and reconciliation. Verifying a domain offers extra features and security. {% include faq-end.md %} +
\ No newline at end of file From e4c4aab3dc86fff0c48f439a7fb180d77a3c43dd Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 30 Jan 2024 01:39:01 +0530 Subject: [PATCH 09/25] rename to tab --- docs/assets/js/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/assets/js/main.js b/docs/assets/js/main.js index 1de88432edbd..14f455247dd0 100644 --- a/docs/assets/js/main.js +++ b/docs/assets/js/main.js @@ -233,10 +233,10 @@ window.addEventListener('DOMContentLoaded', () => { } expensifyClassicTab?.addEventListener('click', () => { - expensifyClassic.classList.add('active'); + expensifyClassicTab.classList.add('active'); expensifyClassicContent.classList.remove('hidden'); - newExpensify.classList.remove('active'); + newExpensifyTab.classList.remove('active'); newExpensifyContent.classList.add('hidden'); window.tocbot.refresh({ ...tocbotOptions, @@ -245,10 +245,10 @@ window.addEventListener('DOMContentLoaded', () => { }); newExpensifyTab?.addEventListener('click', () => { - newExpensify.classList.add('active'); + newExpensifyTab.classList.add('active'); newExpensifyContent.classList.remove('hidden'); - expensifyClassic.classList.remove('active'); + expensifyClassicTab.classList.remove('active'); expensifyClassicContent.classList.add('hidden'); active = '#new-expensify'; window.tocbot.refresh({ From 5bb3a5b9749e76268c41b49c86b33e67ad945a2c Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 30 Jan 2024 01:42:23 +0530 Subject: [PATCH 10/25] remove jekyll tabs --- docs/Gemfile | 1 - docs/Gemfile.lock | 3 --- docs/_config.yml | 1 - docs/_layouts/default.html | 1 - docs/_sass/_main.scss | 2 +- docs/assets/js/tabs.js | 7 ------- 6 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 docs/assets/js/tabs.js diff --git a/docs/Gemfile b/docs/Gemfile index 3616112f183a..91971b594b4f 100644 --- a/docs/Gemfile +++ b/docs/Gemfile @@ -13,7 +13,6 @@ gem "github-pages", group: :jekyll_plugins # If you have any plugins, put them here! group :jekyll_plugins do gem "jekyll-feed", "~> 0.12" - gem "jekyll-tabs" end # Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 567f66d9c468..de99bbcb48ef 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -149,8 +149,6 @@ GEM jekyll-sitemap (1.4.0) jekyll (>= 3.7, < 5.0) jekyll-swiss (1.0.0) - jekyll-tabs (1.2.1) - jekyll (>= 3.0, < 5.0) jekyll-theme-architect (0.2.0) jekyll (> 3.5, < 5.0) jekyll-seo-tag (~> 2.0) @@ -268,7 +266,6 @@ DEPENDENCIES jekyll-feed (~> 0.12) jekyll-redirect-from jekyll-seo-tag - jekyll-tabs liquid (~> 4.0.4) tzinfo (~> 1.2) tzinfo-data diff --git a/docs/_config.yml b/docs/_config.yml index 12aaed805e1d..b68bcdf8a1f3 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -19,7 +19,6 @@ exclude: [README.md, TEMPLATE.md, vendor] plugins: - jekyll-seo-tag - jekyll-redirect-from - - jekyll-tabs whitelist: diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 4803a53e3960..9c474286797f 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -12,7 +12,6 @@ - diff --git a/docs/_sass/_main.scss b/docs/_sass/_main.scss index dea12a04f3c7..1c0728b152ea 100644 --- a/docs/_sass/_main.scss +++ b/docs/_sass/_main.scss @@ -873,4 +873,4 @@ button { #platform-tabs > .active { color:#fff; background-color: #1A3D32; -} \ No newline at end of file +} diff --git a/docs/assets/js/tabs.js b/docs/assets/js/tabs.js deleted file mode 100644 index 2607f4aeb2f9..000000000000 --- a/docs/assets/js/tabs.js +++ /dev/null @@ -1,7 +0,0 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.jekyllTabs=e():t.jekyllTabs=e()}(self,(()=>{return t={918:t=>{t.exports={getChildPosition:t=>{const e=t.parentNode;for(let o=0;o{const o=document.querySelectorAll(t),a=[];for(let t=0;t{const e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild},addClass:(t,e,o)=>{t.className=t.className?`${t.className} ${e}`:e,setTimeout((()=>{t.className=t.className.replace(e,"").trim()}),o)}}},613:(t,e,o)=>{const{activateTabFromUrl:a,updateUrlWithActiveTab:n,handleTabClicked:s,addCopyToClipboardButtons:r,syncTabsWithSameLabels:l,appendToastMessageHTML:i}=o(925);t.exports={init:(t={})=>{const e={syncTabsWithSameLabels:!1,activateTabFromUrl:!1,addCopyToClipboardButtons:!1,copyToClipboardSettings:{buttonHTML:"",showToastMessageOnCopy:!1,toastMessage:"Code copied to clipboard",toastDuration:3e3}},o={...e,...t,copyToClipboardSettings:{...e.copyToClipboardSettings,...t.copyToClipboardSettings}},c=document.querySelectorAll("ul.tab > li > a");if(Array.prototype.forEach.call(c,(t=>{t.addEventListener("click",(e=>{e.preventDefault(),s(t),o.activateTabFromUrl&&n(t),o.syncTabsWithSameLabels&&l(t)}),!1)})),o.addCopyToClipboardButtons){const t=o.copyToClipboardSettings;r(t),t.showToastMessageOnCopy&&i(t.toastMessage)}o.activateTabFromUrl&&a()}}},925:(t,e,o)=>{const{getChildPosition:a,createElementFromHTML:n,findElementsWithTextContent:s,addClass:r}=o(918),l=t=>{const e=t.querySelectorAll("ul > li");Array.prototype.forEach.call(e,(t=>{t.classList.remove("active")}))},i=t=>{const e=t.parentNode,o=e.parentNode,n=a(e);if(e.className.includes("active"))return;const s=o.getAttribute("data-tab");if(!s)return;const r=document.getElementById(s);l(o),l(r),r.querySelectorAll("ul.tab-content > li")[n].classList.add("active"),e.classList.add("active")},c=(t,e)=>{if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(t);else{const e=document.createElement("textarea");e.value=t,e.style.position="absolute",e.style.left="-999999px",document.body.prepend(e),e.select();try{document.execCommand("copy")}catch(t){console.error(t)}finally{e.remove()}}"function"==typeof e&&e()},d=t=>{r(document.getElementById("jekyll-tabs-copy-to-clipboard-message"),"show",t)};t.exports={removeActiveClasses:l,handleTabClicked:i,copyToClipboard:c,addCopyToClipboardButtons:({buttonHTML:t,showToastMessageOnCopy:e,toastDuration:o})=>{const a=document.querySelectorAll("ul.tab-content > li pre");for(let s=0;s{d(o)}),i.addEventListener("click",(()=>{c(r.innerText,p)}))}},activateTabFromUrl:()=>{const t=window.location.hash?.substring(1);if(!t)return;const e=document.getElementById(t);if(!e)return;const o=new URLSearchParams(window.location.search).get("active_tab");if(!o)return;const a=e.querySelector("li#"+o+" > a");a&&i(a)},updateUrlWithActiveTab:t=>{const e=t.parentNode,o=e.parentNode,a=new URLSearchParams(window.location.search);a.set("active_tab",e.id);const n=window.location.pathname+"?"+a.toString()+"#"+o.id;history.replaceState(null,"",n)},syncTabsWithSameLabels:t=>{const e=s("a",t.textContent);for(let o=0;o{const e=document.createElement("div");e.id="jekyll-tabs-copy-to-clipboard-message",e.textContent=t,document.getElementsByTagName("body")[0].appendChild(e)}}}},e={},function o(a){var n=e[a];if(void 0!==n)return n.exports;var s=e[a]={exports:{}};return t[a](s,s.exports,o),s.exports}(613);var t,e})); - -window.addEventListener('load', function () { - jekyllTabs.init({ - syncTabsWithSameLabels: true, - }); -}); From 1891c00f10b734f45dbbeb0ad652c73a6bd9e9dd Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 30 Jan 2024 01:44:48 +0530 Subject: [PATCH 11/25] rm whitespace --- docs/_config.yml | 1 - .../deposit-accounts/Deposit-Accounts-USD.md | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/_config.yml b/docs/_config.yml index b68bcdf8a1f3..888f0b24a91e 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -20,6 +20,5 @@ plugins: - jekyll-seo-tag - jekyll-redirect-from - whitelist: - jekyll-redirect-from diff --git a/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-USD.md b/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-USD.md index 8880e923ce3b..0bc5cb0ad955 100644 --- a/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-USD.md +++ b/docs/articles/expensify-classic/bank-accounts-and-credit-cards/deposit-accounts/Deposit-Accounts-USD.md @@ -2,7 +2,6 @@ title: Deposit Accounts - USD description: How to add a deposit account to receive payments for yourself or your business (US) --- - # Overview There are two types of deposit-only accounts: @@ -75,4 +74,4 @@ There are a few reasons a reimbursement may be unsuccessful. The first step is t If you aren’t sure, please reach out to Concierge and we can assist! -{% include faq-end.md %} \ No newline at end of file +{% include faq-end.md %} From f3e572665d7f48ade61db8f8bfdb59318134241f Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 30 Jan 2024 02:15:23 +0530 Subject: [PATCH 12/25] fix lint --- docs/assets/js/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/assets/js/main.js b/docs/assets/js/main.js index 14f455247dd0..69252be6d33c 100644 --- a/docs/assets/js/main.js +++ b/docs/assets/js/main.js @@ -232,6 +232,7 @@ window.addEventListener('DOMContentLoaded', () => { }); } + // eslint-disable-line es/no-optional-chaining expensifyClassicTab?.addEventListener('click', () => { expensifyClassicTab.classList.add('active'); expensifyClassicContent.classList.remove('hidden'); @@ -244,13 +245,13 @@ window.addEventListener('DOMContentLoaded', () => { }); }); + // eslint-disable-line es/no-optional-chaining newExpensifyTab?.addEventListener('click', () => { newExpensifyTab.classList.add('active'); newExpensifyContent.classList.remove('hidden'); expensifyClassicTab.classList.remove('active'); expensifyClassicContent.classList.add('hidden'); - active = '#new-expensify'; window.tocbot.refresh({ ...tocbotOptions, contentSelector: '#new-expensify' From 8c4c1766d971a9c1a343a7904155c52c68e2d5eb Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 30 Jan 2024 02:16:29 +0530 Subject: [PATCH 13/25] fix lint --- docs/assets/js/platform-tabs.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/assets/js/platform-tabs.js b/docs/assets/js/platform-tabs.js index d49d898517c4..97e6efc554e2 100644 --- a/docs/assets/js/platform-tabs.js +++ b/docs/assets/js/platform-tabs.js @@ -1,6 +1,3 @@ -const expensifyClassic = document.getElementById('platform-tab-expensify-classic'); -const newExpensify = document.getElementById('platform-tab-new-expensify'); - const expensifyClassicContent = document.getElementById('expensify-classic'); const newExpensifyContent = document.getElementById('new-expensify'); From 889c4bbbd1539c3470ccc50f3608fa1934a8b060 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 30 Jan 2024 02:22:31 +0530 Subject: [PATCH 14/25] fix lint --- docs/assets/js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/assets/js/main.js b/docs/assets/js/main.js index 69252be6d33c..caafd0ac1c67 100644 --- a/docs/assets/js/main.js +++ b/docs/assets/js/main.js @@ -232,7 +232,7 @@ window.addEventListener('DOMContentLoaded', () => { }); } - // eslint-disable-line es/no-optional-chaining + // eslint-disable-next-line es/no-optional-chaining expensifyClassicTab?.addEventListener('click', () => { expensifyClassicTab.classList.add('active'); expensifyClassicContent.classList.remove('hidden'); @@ -245,7 +245,7 @@ window.addEventListener('DOMContentLoaded', () => { }); }); - // eslint-disable-line es/no-optional-chaining + // eslint-disable-next-line es/no-optional-chaining newExpensifyTab?.addEventListener('click', () => { newExpensifyTab.classList.add('active'); newExpensifyContent.classList.remove('hidden'); From 5771cf87191d3edfa2c9161210a3cfe56e5e7cb8 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 30 Jan 2024 02:31:59 +0530 Subject: [PATCH 15/25] add breakpoint for mobile --- docs/_sass/_main.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/_sass/_main.scss b/docs/_sass/_main.scss index 1c0728b152ea..a238b3d0f7f3 100644 --- a/docs/_sass/_main.scss +++ b/docs/_sass/_main.scss @@ -853,6 +853,11 @@ button { h1 { padding: 0; } + + @include maxBreakpoint($breakpoint-tablet) { + flex-direction: column; + gap: 20px; + } } #platform-tabs { From 97a7a4c01269ccf331ef479dbd4124a2bde93343 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 30 Jan 2024 02:41:39 +0530 Subject: [PATCH 16/25] fix lint --- docs/assets/js/main.js | 46 ++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/docs/assets/js/main.js b/docs/assets/js/main.js index caafd0ac1c67..31c480bb8aaf 100644 --- a/docs/assets/js/main.js +++ b/docs/assets/js/main.js @@ -232,31 +232,33 @@ window.addEventListener('DOMContentLoaded', () => { }); } - // eslint-disable-next-line es/no-optional-chaining - expensifyClassicTab?.addEventListener('click', () => { - expensifyClassicTab.classList.add('active'); - expensifyClassicContent.classList.remove('hidden'); - - newExpensifyTab.classList.remove('active'); - newExpensifyContent.classList.add('hidden'); - window.tocbot.refresh({ - ...tocbotOptions, - contentSelector: '#expensify-classic' + if (expensifyClassicTab) { + expensifyClassicTab.addEventListener('click', () => { + expensifyClassicTab.classList.add('active'); + expensifyClassicContent.classList.remove('hidden'); + + newExpensifyTab.classList.remove('active'); + newExpensifyContent.classList.add('hidden'); + window.tocbot.refresh({ + ...tocbotOptions, + contentSelector: '#expensify-classic' + }); }); - }); + } - // eslint-disable-next-line es/no-optional-chaining - newExpensifyTab?.addEventListener('click', () => { - newExpensifyTab.classList.add('active'); - newExpensifyContent.classList.remove('hidden'); - - expensifyClassicTab.classList.remove('active'); - expensifyClassicContent.classList.add('hidden'); - window.tocbot.refresh({ - ...tocbotOptions, - contentSelector: '#new-expensify' + if (newExpensifyTab) { + newExpensifyTab.addEventListener('click', () => { + newExpensifyTab.classList.add('active'); + newExpensifyContent.classList.remove('hidden'); + + expensifyClassicTab.classList.remove('active'); + expensifyClassicContent.classList.add('hidden'); + window.tocbot.refresh({ + ...tocbotOptions, + contentSelector: '#new-expensify' + }); }); - }); + } document.getElementById('header-button').addEventListener('click', toggleHeaderMenu); From b914b57684e3c40d67f19656e27c0b46287fa07b Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 30 Jan 2024 02:43:02 +0530 Subject: [PATCH 17/25] Revert "fix lint" This reverts commit 97a7a4c01269ccf331ef479dbd4124a2bde93343. --- docs/assets/js/main.js | 46 ++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/docs/assets/js/main.js b/docs/assets/js/main.js index 31c480bb8aaf..caafd0ac1c67 100644 --- a/docs/assets/js/main.js +++ b/docs/assets/js/main.js @@ -232,33 +232,31 @@ window.addEventListener('DOMContentLoaded', () => { }); } - if (expensifyClassicTab) { - expensifyClassicTab.addEventListener('click', () => { - expensifyClassicTab.classList.add('active'); - expensifyClassicContent.classList.remove('hidden'); - - newExpensifyTab.classList.remove('active'); - newExpensifyContent.classList.add('hidden'); - window.tocbot.refresh({ - ...tocbotOptions, - contentSelector: '#expensify-classic' - }); + // eslint-disable-next-line es/no-optional-chaining + expensifyClassicTab?.addEventListener('click', () => { + expensifyClassicTab.classList.add('active'); + expensifyClassicContent.classList.remove('hidden'); + + newExpensifyTab.classList.remove('active'); + newExpensifyContent.classList.add('hidden'); + window.tocbot.refresh({ + ...tocbotOptions, + contentSelector: '#expensify-classic' }); - } + }); - if (newExpensifyTab) { - newExpensifyTab.addEventListener('click', () => { - newExpensifyTab.classList.add('active'); - newExpensifyContent.classList.remove('hidden'); - - expensifyClassicTab.classList.remove('active'); - expensifyClassicContent.classList.add('hidden'); - window.tocbot.refresh({ - ...tocbotOptions, - contentSelector: '#new-expensify' - }); + // eslint-disable-next-line es/no-optional-chaining + newExpensifyTab?.addEventListener('click', () => { + newExpensifyTab.classList.add('active'); + newExpensifyContent.classList.remove('hidden'); + + expensifyClassicTab.classList.remove('active'); + expensifyClassicContent.classList.add('hidden'); + window.tocbot.refresh({ + ...tocbotOptions, + contentSelector: '#new-expensify' }); - } + }); document.getElementById('header-button').addEventListener('click', toggleHeaderMenu); From bee81409c5f996f08af54285db5b336d2bd18567 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 30 Jan 2024 02:43:42 +0530 Subject: [PATCH 18/25] run prettier --- docs/assets/js/main.js | 14 +++++++------- docs/assets/js/platform-tabs.js | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/assets/js/main.js b/docs/assets/js/main.js index caafd0ac1c67..473bd544c7b8 100644 --- a/docs/assets/js/main.js +++ b/docs/assets/js/main.js @@ -194,7 +194,7 @@ const tocbotOptions = { // If there is a fixed article scroll container, set to calculate titles' offset scrollContainer: 'content-area', -} +}; window.addEventListener('DOMContentLoaded', () => { injectFooterCopywrite(); @@ -212,14 +212,14 @@ window.addEventListener('DOMContentLoaded', () => { const expensifyClassicTab = document.getElementById('platform-tab-expensify-classic'); const newExpensifyTab = document.getElementById('platform-tab-new-expensify'); - + const expensifyClassicContent = document.getElementById('expensify-classic'); const newExpensifyContent = document.getElementById('new-expensify'); let contentSelector; if (expensifyClassicContent) { contentSelector = '#expensify-classic'; - } else if(newExpensifyContent) { + } else if (newExpensifyContent) { contentSelector = '#new-expensify'; } else { contentSelector = '.article-toc-content'; @@ -236,12 +236,12 @@ window.addEventListener('DOMContentLoaded', () => { expensifyClassicTab?.addEventListener('click', () => { expensifyClassicTab.classList.add('active'); expensifyClassicContent.classList.remove('hidden'); - + newExpensifyTab.classList.remove('active'); newExpensifyContent.classList.add('hidden'); window.tocbot.refresh({ ...tocbotOptions, - contentSelector: '#expensify-classic' + contentSelector: '#expensify-classic', }); }); @@ -249,12 +249,12 @@ window.addEventListener('DOMContentLoaded', () => { newExpensifyTab?.addEventListener('click', () => { newExpensifyTab.classList.add('active'); newExpensifyContent.classList.remove('hidden'); - + expensifyClassicTab.classList.remove('active'); expensifyClassicContent.classList.add('hidden'); window.tocbot.refresh({ ...tocbotOptions, - contentSelector: '#new-expensify' + contentSelector: '#new-expensify', }); }); diff --git a/docs/assets/js/platform-tabs.js b/docs/assets/js/platform-tabs.js index 97e6efc554e2..d9890fde9d25 100644 --- a/docs/assets/js/platform-tabs.js +++ b/docs/assets/js/platform-tabs.js @@ -17,7 +17,7 @@ if (newExpensifyContent) { tab.id = 'platform-tab-new-expensify'; if (!expensifyClassicContent) { - tab.classList.add('active'); + tab.classList.add('active'); } platformTabs.appendChild(tab); } From aaeefdcf3f53a53dbe6bcbab100b631a0bfec577 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 30 Jan 2024 05:02:00 +0530 Subject: [PATCH 19/25] add gap b/w buttons --- docs/_sass/_main.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/_sass/_main.scss b/docs/_sass/_main.scss index a238b3d0f7f3..0689c1b39b56 100644 --- a/docs/_sass/_main.scss +++ b/docs/_sass/_main.scss @@ -867,6 +867,7 @@ button { text-align: center; font-weight: 700; font-size: 13px; + gap: 4px; } #platform-tabs > * { From 687ae7a6813b3053c06a11bcf865ed2f7e3874f5 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 30 Jan 2024 05:03:56 +0530 Subject: [PATCH 20/25] fix case --- docs/assets/js/platform-tabs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/assets/js/platform-tabs.js b/docs/assets/js/platform-tabs.js index d9890fde9d25..18746efc5a84 100644 --- a/docs/assets/js/platform-tabs.js +++ b/docs/assets/js/platform-tabs.js @@ -5,7 +5,7 @@ const platformTabs = document.getElementById('platform-tabs'); if (expensifyClassicContent) { const tab = document.createElement('div'); - tab.innerHTML = 'Expensify classic'; + tab.innerHTML = 'Expensify Classic'; tab.id = 'platform-tab-expensify-classic'; tab.classList.add('active'); platformTabs.appendChild(tab); @@ -13,7 +13,7 @@ if (expensifyClassicContent) { if (newExpensifyContent) { const tab = document.createElement('div'); - tab.innerHTML = 'New expensify'; + tab.innerHTML = 'New Expensify'; tab.id = 'platform-tab-new-expensify'; if (!expensifyClassicContent) { From 72ead7ba41d8a2c74d9a3302fc68baa6783d1338 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 30 Jan 2024 06:07:39 +0530 Subject: [PATCH 21/25] handle long titles --- docs/_sass/_main.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/_sass/_main.scss b/docs/_sass/_main.scss index 0689c1b39b56..f0713796b68e 100644 --- a/docs/_sass/_main.scss +++ b/docs/_sass/_main.scss @@ -350,6 +350,7 @@ button { h1 { &.title { font-size: 2.25em; + flex: 1; } } @@ -873,7 +874,7 @@ button { #platform-tabs > * { cursor: pointer; border-radius: 20px; - padding: 10px 20px; + padding: 9px 20px; } #platform-tabs > .active { From 47c20b94928ba2ebf58f3d47d5cb66e50f6dc495 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 30 Jan 2024 06:11:28 +0530 Subject: [PATCH 22/25] fix color --- docs/_sass/_main.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_sass/_main.scss b/docs/_sass/_main.scss index f0713796b68e..d4ab85a2fa41 100644 --- a/docs/_sass/_main.scss +++ b/docs/_sass/_main.scss @@ -878,6 +878,6 @@ button { } #platform-tabs > .active { - color:#fff; - background-color: #1A3D32; + color: $color-text; + background-color: $color-button-background; } From a8468c7568fdf60dcbf5211f74d2ab12ae91965a Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 30 Jan 2024 06:24:13 +0530 Subject: [PATCH 23/25] fix button size --- docs/_sass/_main.scss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/_sass/_main.scss b/docs/_sass/_main.scss index d4ab85a2fa41..fc95a9cce7f0 100644 --- a/docs/_sass/_main.scss +++ b/docs/_sass/_main.scss @@ -874,7 +874,10 @@ button { #platform-tabs > * { cursor: pointer; border-radius: 20px; - padding: 9px 20px; + padding: 10px 20px; + box-sizing: border-box; + height: 36px; + line-height: 16px; } #platform-tabs > .active { From 88d27a0e312ee856f54adb4d28a6acfbcbeaad6c Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Wed, 31 Jan 2024 17:32:20 +0300 Subject: [PATCH 24/25] Update docs/assets/js/main.js Co-authored-by: Nikki Wines --- docs/assets/js/main.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/assets/js/main.js b/docs/assets/js/main.js index 473bd544c7b8..6b3390148ff0 100644 --- a/docs/assets/js/main.js +++ b/docs/assets/js/main.js @@ -216,13 +216,11 @@ window.addEventListener('DOMContentLoaded', () => { const expensifyClassicContent = document.getElementById('expensify-classic'); const newExpensifyContent = document.getElementById('new-expensify'); - let contentSelector; + let contentSelector = '.article-toc-content'; if (expensifyClassicContent) { contentSelector = '#expensify-classic'; } else if (newExpensifyContent) { contentSelector = '#new-expensify'; - } else { - contentSelector = '.article-toc-content'; } if (window.tocbot) { From db2937ae9fd931949aaa5e8ddbecc6bb571bba43 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Wed, 31 Jan 2024 20:03:10 +0530 Subject: [PATCH 25/25] rm breaker --- docs/assets/js/platform-tabs.js | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/assets/js/platform-tabs.js b/docs/assets/js/platform-tabs.js index 18746efc5a84..e677e58b1e97 100644 --- a/docs/assets/js/platform-tabs.js +++ b/docs/assets/js/platform-tabs.js @@ -1,6 +1,5 @@ const expensifyClassicContent = document.getElementById('expensify-classic'); const newExpensifyContent = document.getElementById('new-expensify'); - const platformTabs = document.getElementById('platform-tabs'); if (expensifyClassicContent) {