From 7bfa8104d5459201ad39489fd2bf9430d9e320e0 Mon Sep 17 00:00:00 2001 From: Tushar Raj Date: Sun, 4 Sep 2022 15:21:09 +0530 Subject: [PATCH 1/7] docs: used relative links and fixed typos Signed-off-by: Tushar Raj --- README.md | 43 ++++++++++++++++--------------------------- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 945488b2d..cd9f7dff0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

-Notesnook Logo +Notesnook Logo

Notesnook

@@ -34,33 +34,22 @@ Notesnook is built using the following technologies: ### Monorepo structure -| Name | Path | Description | -| -------------------------- | ---------------------------------------- | ----------------------------------------------------------------- | -| `@notesnook/web` | [/apps/web][web] | Web/desktop clients | -| `@notesnook/mobile` | [/apps/mobile][mobile] | Android/iOS clients | -| `@notesnook/core` | [/packages/core][core] | Shared core between all platforms | -| `@notesnook/crypto` | [/packages/crypto][crypto] | Cryptography library wrapper around libsodium | -| `@notesnook/editor` | [/packages/editor][editor] | Notesnook editor + all extensions | -| `@notesnook/editor-mobile` | [/packages/editor-mobile][editor-mobile] | A very thin wrapper around `@notesnook/editor` for mobile clients | -| `@notesnook/logger` | [/packages/logger][logger] | Simple & pluggable logger | -| `@notesnook/crypto-worker` | [/packages/crypto-worker][crypto-worker] | Helpers to use `@notesnook/crypto` from a Worker | -| `@notesnook/streamable-fs` | [/packages/streamable-fs][streamable-fs] | Streaming interface around an IndexedDB based file system | -| `@notesnook/theme` | [/packages/theme][theme] | The core theme used in web & desktop clients | - -[web]: /apps/web -[mobile]: /apps/mobile -[core]: /packages/core -[crypto]: /packages/crypto -[editor]: /packages/editor -[editor-mobile]: /packages/editor-mobile -[logger]: /packages/logger -[crypto-worker]: /packages/crypto-worker -[streamable-fs]: /packages/streamable-fs -[theme]: /packages/theme +| Name | Path | Description | +| -------------------------- | -------------------------------------------------- | ----------------------------------------------------------------- | +| `@notesnook/web` | [/apps/web](/apps/web) | Web/Desktop clients | +| `@notesnook/mobile` | [/apps/mobile](/apps/mobile) | Android/iOS clients | +| `@notesnook/core` | [/packages/core](/packages/core) | Shared core between all platforms | +| `@notesnook/crypto` | [/packages/crypto](/packages/crypto) | Cryptography library wrapper around libsodium | +| `@notesnook/editor` | [/packages/editor](/packages/editor) | Notesnook editor + all extensions | +| `@notesnook/editor-mobile` | [/packages/editor-mobile](/packages/editor-mobile) | A very thin wrapper around `@notesnook/editor` for mobile clients | +| `@notesnook/logger` | [/packages/logger](/packages/logger) | Simple & pluggable logger | +| `@notesnook/crypto-worker` | [/packages/crypto-worker](/packages/crypto-worker) | Helpers to use `@notesnook/crypto` from a Worker | +| `@notesnook/streamable-fs` | [/packages/streamable-fs](/packages/streamable-fs) | Streaming interface around an IndexedDB based file system | +| `@notesnook/theme` | [/packages/theme](/packages/theme) | The core theme used in web & desktop clients | ### Contributing guidelines -If you are interested in contributing to Notesnook, I highly recommend checking out [the contributing guidelines](/CONTRIBUTING.md) here. You'll find all the relevant information such as [style guideline](/CONTRIBUTING.md#style-guidelines), [how to make a PR](/CONTRIBUTING.md#opening--submitting-a-pull-request), [how to commit](/CONTRIBUTING.md#commit-guidelines) etc., there. +If you are interested in contributing to Notesnook, I highly recommend checking out the [contributing guidelines](/CONTRIBUTING.md) You'll find all the relevant information such as [style guideline](/CONTRIBUTING.md#style-guidelines), [how to make a PR](/CONTRIBUTING.md#opening--submitting-a-pull-request), [how to commit](/CONTRIBUTING.md#commit-guidelines) etc., there. ### Support & help @@ -75,7 +64,7 @@ We take all queries, issues and bug reports that you might have. Feel free to as ## Additional Resources -- [Migrating & importing your data from other apps — Importer](https://importer.notesnook.com/) -- [Privacy policy](https://notesnook.com/privacy) & [terms of service](https://notesnook.com/terms) +- [Migrating & Importing your data from other apps — Importer](https://importer.notesnook.com/) +- [Privacy policy](https://notesnook.com/privacy) & [Terms of service](https://notesnook.com/terms) - [Verify Notesnook encryption claims yourself — Vericrypt](https://vericrypt.notesnook.com/) - [Why Notesnook requires an email address?](https://blog.notesnook.com/why-notesnook-requires-an-email-address/) From ef9f29633d4b573a4196114bfbb451534403bd1a Mon Sep 17 00:00:00 2001 From: Dibyakanti Ta <64345702+d-kanti@users.noreply.github.com> Date: Sun, 4 Sep 2022 22:19:28 +0530 Subject: [PATCH 2/7] docs: fixed a small typo in readme (#881) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cd9f7dff0..8fd67f01c 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Website | About us | Roadmap | Downloads | Twitter | Discord

-> **To celebrate the open sourcing of Notesnook, we have giving away first year of Notesnook Pro at 75% off. [Support us by subscribing](https://app.notesnook.com/#/buy/yearly/OPENSOURCE)!** +> **To celebrate the open sourcing of Notesnook, we are giving away first year of Notesnook Pro at 75% off. [Support us by subscribing](https://app.notesnook.com/#/buy/yearly/OPENSOURCE)!** ## Overview From cb7fe6061f89767d7ab5963aa6cf3d8b3aa31a3a Mon Sep 17 00:00:00 2001 From: Tushar Raj <43772524+tushar-1728@users.noreply.github.com> Date: Mon, 5 Sep 2022 00:23:22 +0530 Subject: [PATCH 3/7] docs: fix broken links, grammatical & MD errors (#882) * docs: fixed typo Signed-off-by: Tushar Raj * docs: fixed markdown typos and gramatical errors Signed-off-by: Tushar Raj * docs: fixed new issue url Signed-off-by: Tushar Raj Signed-off-by: Tushar Raj --- CONTRIBUTING.md | 28 ++++++++++++++-------------- README.md | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 887f20d02..de2b8cf8c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,19 +2,19 @@ Thank you so much for considering to contribute to Notesnook! If you have no idea where to start, what to do, what you _can_ do then you are in the right place. There are plenty of ways you can contribute to Notesnook; many don't even require coding skills. -## **Ways to Contribute** +## Ways to Contribute -### **Reporting a bug** +### Reporting a bug Ugh! Bugs! -> A bug is when software behaves in a way that you didn't expect and the developer didn't intend. +> A bug is when software behaves in a way that you didn't expect, and the developer didn't intend. To help us understand what's going on, we first want to **make sure you're using the latest version of Notesnook**. Once you've **confirmed that the bug still exists in the latest version**, you'll want to check to make sure it's not something we already know about in the [opened GitHub issues](https://github.com/streetwriters/notesnook/issues). -If you've **upgraded to the latest version and you can't find it in our open issues** list, it's time to [open a new issue](https://github.com/streetwriters/notesnook/issues/new/choose). It is recommended that you fill out all the fields in the GitHub issue form with as much detail as possible. This includes: +If you've **upgraded to the latest version, and you can't find it in our open issues** list, it's time to [open a new issue](https://github.com/streetwriters/notesnook/issues/new/choose). It is recommended that you fill out all the fields in the GitHub issue form with as much detail as possible. This includes: 1. Exact steps to reproduce the problem 2. Video or picture showing the problem @@ -36,7 +36,7 @@ If you find a mistake in the documentation or would like to contribute something ### Helping out in the issue tracker -There are always new issues getting opened that need to be triaged, sorted & organized so the developers can easily find the most critical and/or relevant bugs to fix. Any help in this regard is appreciated. +There are always new issues getting opened that need to be triaged, sorted & organized, so the developers can easily find the most critical and/or relevant bugs to fix. Any help in this regard is appreciated. In addition to this, you can help out in the following ways: @@ -49,7 +49,7 @@ In addition to this, you can help out in the following ways: > Before you start contributing code, **make sure to read the [commit guidelines](#commit-guidelines), [git branch organization](#git-branch-organization) & [style guidelines](#style-guidelines).** -As with other types of contributions, **the first step is to **[**open an issue**](https://github.com/streetwriters/notesnook/issues/new/choose)** on GitHub**. Opening an issue before you make changes ensures that someone else isn't already working on that particular problem. It also lets us all work together to find the right approach before you spend a bunch of time on a PR. **So again, when in doubt, open an issue**. +As with other types of contributions, **the first step is to [open an issue](https://github.com/streetwriters/notesnook/issues/new/choose) on GitHub**. Opening an issue before you make changes ensures that someone else isn't already working on that particular problem. It also lets us all work together to find the right approach before you spend a bunch of time on a PR. **So again, when in doubt, open an issue**. #### Implementing a new feature or fixing a bug @@ -72,16 +72,16 @@ Once you are done, [open a new pull request](https://docs.github.com/en/pull-req 4. Ensure the test suite passes (`npm run test`). 5. Format your code with prettier (`npm run prettier`). 6. Make sure your code lints (`npm run lint`). Tip: `npm run linc` to only check changed files. -7. Read & follow the commit guidelines -8. Read & follow the style guidelines +7. Read & follow the commit guidelines. +8. Read & follow the style guidelines. ### Commit guidelines #### Sign-off your commits -To keep Notesnook 100% open source we use [DCO (Developer Certificate of Origin)](http://DeveloperCertificate.org) instead of CLA. We respect intellectual property rights of others and a Developer Certificate of Origin **(DCO) is a lightweight mechanism to make sure all incoming contributions are correctly attributed and licensed**. +To keep Notesnook 100% open source we use [DCO (Developer Certificate of Origin)](http://DeveloperCertificate.org) instead of CLA. We respect intellectual property rights of others, and a **Developer Certificate of Origin (DCO) is a lightweight mechanism to make sure all incoming contributions are correctly attributed and licensed**. -The DCO is a declaration attached to every contribution made by every developer in the message of every commit. The developer simply adds a `Signed-off-by` statement and thereby agrees to the DCO, which at [DeveloperCertificate.org](http://DeveloperCertificate.org). +The DCO is a declaration attached to every contribution made by every developer in the message of every commit. The developer simply adds a `Signed-off-by` statement and thereby agrees to the DCO, which can be viewed at [DeveloperCertificate.org](http://DeveloperCertificate.org). **We require that every contribution to Notesnook is signed with a Developer Certificate of Origin**. Additionally, **please use your real name**. We do not accept anonymous contributors nor those utilizing pseudonyms. @@ -114,7 +114,7 @@ All commits must include valid scopes in the commit message. **Valid commit scop 1. `config`: changes related to config of installed tools in the repo (e.g. eslint rules) 2. `ci`: changes related to CI -3. `setup`: setting up someting new in the repo (e.g. eslint, commitlint) +3. `setup`: setting up something new in the repo (e.g. eslint, commitlint) 4. `docs`: changes related to documentation (README etc.) 5. `misc`: miscellaneous changes like package-lock.json updates @@ -136,14 +136,14 @@ However, there are still some styles that the linter cannot pick up. If you are ## Git Branch Organization -Submit all changes directly to the [`master branch`](https://github.com/facebook/react/tree/main). We don’t use separate branches for development or for upcoming releases. This requires us to always keep the `master` branch in a deployable state which means: +Submit all changes directly to the [`master branch`](https://github.com/streetwriters/notesnook). We don’t use separate branches for development or for upcoming releases. This requires us to always keep the `master` branch in a deployable state which means: 1. All tests must be passing at all times 2. There should be as few breaking changes as possible -## **Review Process** +## Review Process -We deeply appreciate everyone who takes the time to make a contribution. We will review all contributions as quickly as possible. **As a reminder, **[**opening an issue**](https://github.com/opensearch-project/OpenSearch/issues/new/choose)** discussing your change before you make it is the best way to smooth the PR process.** This will prevent a rejection because someone else is already working on the problem, or because the solution is incompatible with the architectural direction. +We deeply appreciate everyone who takes the time to make a contribution. We will review all contributions as quickly as possible. **As a reminder, [opening an issue](https://github.com/streetwriters/notesnook/issues/new/choose) and discussing your change before you make it, is the best way to smooth the PR process.** This will prevent a rejection because someone else is already working on the problem, or because the solution is incompatible with the architectural direction. During the PR process, expect that there will be some back-and-forth. Please try to respond to comments in a timely fashion, and: diff --git a/README.md b/README.md index 8fd67f01c..9c721eadd 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Notesnook is built using the following technologies: ### Contributing guidelines -If you are interested in contributing to Notesnook, I highly recommend checking out the [contributing guidelines](/CONTRIBUTING.md) You'll find all the relevant information such as [style guideline](/CONTRIBUTING.md#style-guidelines), [how to make a PR](/CONTRIBUTING.md#opening--submitting-a-pull-request), [how to commit](/CONTRIBUTING.md#commit-guidelines) etc., there. +If you are interested in contributing to Notesnook, I highly recommend checking out the [contributing guidelines](/CONTRIBUTING.md). You'll find all the relevant information such as [style guideline](/CONTRIBUTING.md#style-guidelines), [how to make a PR](/CONTRIBUTING.md#opening--submitting-a-pull-request), [how to commit](/CONTRIBUTING.md#commit-guidelines) etc., there. ### Support & help From 206a11669e556b92cd783523abf8f1794366a686 Mon Sep 17 00:00:00 2001 From: Tushar Raj <43772524+tushar-1728@users.noreply.github.com> Date: Sun, 4 Sep 2022 19:46:34 +0000 Subject: [PATCH 4/7] docs: add changes suggested by npm lint Signed-off-by: Tushar Raj <43772524+tushar-1728@users.noreply.github.com> --- CODE_OF_CONDUCT.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index a2d01e3a3..bb8e6da12 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community. Examples of behavior that contributes to a positive environment for our community include: -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -* Focusing on what is best not just for us as individuals, but for the +- Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: -* The use of sexualized language or imagery, and sexual attention or +- The use of sexualized language or imagery, and sexual attention or advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a +- Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an +standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within From 54ab117417cf2d9b5011d67c9fd3162f1aa607c4 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Mon, 5 Sep 2022 12:08:47 +0500 Subject: [PATCH 5/7] misc: add opencollective sponsorship --- .github/FUNDING.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000..5e8c3f57e --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +open_collective: notesnook From 289e6eefb326eb402660c6a74bab54fd645adcc0 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Mon, 5 Sep 2022 18:00:33 +0500 Subject: [PATCH 6/7] core: move pricing test to e2e tests --- .../__tests__ => __e2e__}/pricing.test.js | 2 +- .../__snapshots__/pricing.test.js.snap | 82 ------------------- 2 files changed, 1 insertion(+), 83 deletions(-) rename packages/core/{api/__tests__ => __e2e__}/pricing.test.js (97%) delete mode 100644 packages/core/api/__tests__/__snapshots__/pricing.test.js.snap diff --git a/packages/core/api/__tests__/pricing.test.js b/packages/core/__e2e__/pricing.test.js similarity index 97% rename from packages/core/api/__tests__/pricing.test.js rename to packages/core/__e2e__/pricing.test.js index 5583832f8..4947d5e3d 100644 --- a/packages/core/api/__tests__/pricing.test.js +++ b/packages/core/__e2e__/pricing.test.js @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -import Pricing from "../pricing"; +import Pricing from "../api/pricing"; test.each(["monthly", "yearly", undefined])(`get %s price`, async (period) => { const pricing = new Pricing(); diff --git a/packages/core/api/__tests__/__snapshots__/pricing.test.js.snap b/packages/core/api/__tests__/__snapshots__/pricing.test.js.snap deleted file mode 100644 index 0797f5d19..000000000 --- a/packages/core/api/__tests__/__snapshots__/pricing.test.js.snap +++ /dev/null @@ -1,82 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`get android pricing tier get monthly android tier: monthly-android-pricing 1`] = ` -Object { - "country": "Pakistan", - "countryCode": "PK", - "discount": 78, - "sku": "com.streetwriters.notesnook.sub.mo.tier3", -} -`; - -exports[`get android pricing tier get yearly android tier: yearly-android-pricing 1`] = ` -Object { - "country": "Pakistan", - "countryCode": "PK", - "discount": 80, - "sku": "com.streetwriters.notesnook.sub.yr.tier3", -} -`; - -exports[`get ios pricing tier get monthly ios tier: monthly-ios-pricing 1`] = ` -Object { - "country": "Pakistan", - "countryCode": "PK", - "discount": 78, - "sku": "com.streetwriters.notesnook.sub.mo.tier3", -} -`; - -exports[`get ios pricing tier get yearly ios tier: yearly-ios-pricing 1`] = ` -Object { - "country": "Pakistan", - "countryCode": "PK", - "discount": 80, - "sku": "com.streetwriters.notesnook.sub.yr.tier3", -} -`; - -exports[`get monthly price: monthly-pricing 1`] = ` -Object { - "country": "Pakistan", - "countryCode": "PK", - "discount": 78, - "price": 0.99, -} -`; - -exports[`get undefined price: monthly-pricing 1`] = ` -Object { - "country": "Pakistan", - "countryCode": "PK", - "discount": 78, - "price": 0.99, -} -`; - -exports[`get web pricing tier get monthly web tier: monthly-web-pricing 1`] = ` -Object { - "country": "Pakistan", - "countryCode": "PK", - "discount": 78, - "sku": "763943", -} -`; - -exports[`get web pricing tier get yearly web tier: yearly-web-pricing 1`] = ` -Object { - "country": "Pakistan", - "countryCode": "PK", - "discount": 80, - "sku": "763945", -} -`; - -exports[`get yearly price: yearly-pricing 1`] = ` -Object { - "country": "Pakistan", - "countryCode": "PK", - "discount": 80, - "price": 9.99, -} -`; From 8cfb21e771480c5c7134b87f1310bb836aa7b3f7 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Mon, 5 Sep 2022 22:44:27 +0500 Subject: [PATCH 7/7] web: fix announcement cta not working --- apps/web/src/components/announcements/body.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/web/src/components/announcements/body.js b/apps/web/src/components/announcements/body.js index a753b9b19..1cff5d731 100644 --- a/apps/web/src/components/announcements/body.js +++ b/apps/web/src/components/announcements/body.js @@ -84,7 +84,12 @@ export default function AnnouncementBody({ /> ); case "callToActions": - return ; + return ( + + ); case "text": return ( @@ -278,6 +283,7 @@ function InlineCalltoActions({ item }) { mr: 1 } }} + removeAnnouncement={removeAnnouncement} /> ))} @@ -290,7 +296,7 @@ function CalltoAction({ action, variant, sx, removeAnnouncement }) { variant={variant} sx={sx} onClick={async () => { - removeAnnouncement(); + if (removeAnnouncement) removeAnnouncement(); closeOpenedDialog(); trackEvent(ANALYTICS_EVENTS.announcementCta, action.data); switch (action.type) {