1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-24 20:19:10 +02:00

Compare commits

...

131 Commits

Author SHA1 Message Date
Laurent Cozic
c2049b21fc Electron release v1.0.187 2020-03-01 11:44:23 +00:00
Laurent Cozic
a415b9d7ae Electron release v1.0.186 2020-03-01 11:43:47 +00:00
Laurent Cozic
cb4fd1ebf9 Tools: Build tools on initial install, and removed build warnings 2020-03-01 11:42:44 +00:00
Anjula Karunarathne
a28b790256 Desktop: Fixes #2615: Fix issue with disappearing button labels in toolbar (#2619)
* Fix undefined showButtonLabels

* Add showButtonLabels to the state; Removed conditional statement checking if state is undefined
2020-03-01 11:12:22 +00:00
Laurent Cozic
55847fa22f Fixed regression 2020-02-29 12:59:10 +00:00
Laurent Cozic
6ca0e6adcc All: Added concept of provisional note to simplify creation and handling of newly created notes 2020-02-29 12:39:23 +00:00
Caleb John
6542a60d61 Merge pull request #2612 from Ullas-Aithal/patch-3
Fixed a typo in faq :)
2020-02-28 14:43:23 -07:00
Ullas Aithal
ef4e1c53b7 Fixed a typo :) 2020-02-28 14:52:46 -06:00
Daulet Amirkhanov
ec64bf2f0f Desktop: Fixes #2476: Fix window dimensions and position when the application starts (#2514)
* ElectronClient window minimum size set

Hardcoded minimum width and height of 100 px.

Signed-off-by: daukadolt <daulet.amirkhanov.official@gmail.com>

* Set Electron window position if outside displays

Set Electron window at the center of primaryDisplay if BrowserWindow is not on any displays.

Signed-off-by: daukadolt <daulet.amirkhanov.official@gmail.com>

* Set Electron window default size dependent on screen

Set Electron window defaultWidth, defaultHeight to 80% of primary display workArea width, height, respectively.

Signed-off-by: daukadolt <daulet.amirkhanov.official@gmail.com>

* Hotfixing Electron defaultHeight depending on width, not height

Hotfix of a typo that calculates Electron app's default height at first run using primary screen's width, not height.

Signed-off-by: daukadolt <daulet.amirkhanov.official@gmail.com>

* Refactoring Electron app defaultWidth/defaultHeight setup

Setting defaultWidth/defaultHeight directly without extra variables.
Rounding defaultWidth/defaultHeight.

Signed-off-by: daukadolt <daulet.amirkhanov.official@gmail.com>
2020-02-27 18:38:08 +00:00
mic704b
54dc2219fe Tests: Integration harness fixes and refactors. (#2569)
* Test harness fixes and integration test refactor and addition.

* Clean up.

* Address review comments.

* Improve method names.
2020-02-27 18:25:42 +00:00
Helmut K. C. Tessarek
a576ad2a39 All: Change geolocation service to freegeoip.app to improve privacy (#2503)
removed unnecessary request to `api.ipify.org`

closes #2469
2020-02-27 09:48:22 +00:00
Runo Saduwa
25a246b6ae Tools: Resolves #2579: Add support for Rule of Hooks plugin (#2579) (#2585)
* installed eslint-plugin-react-hooks and set up rules of hooks

* fixed linter error

* changed react-hooks/exhaustive-deps option to error

* changed spaces to tabs in eslint config
2020-02-27 00:20:55 +00:00
Rishabh Malhotra
4840671f0e Desktop: Fixes #2573: Improved detection of selected text when applying formatting (#2582)
* fixes #2573 

This fixes the bug with spaces

* Update NoteText.jsx
2020-02-27 00:18:57 +00:00
WisdomCode
1d284a3528 Desktop: Fixes #1023: Speed up WebDAV and Nextcloud Sync on Linux (#2577)
* Speed up Linux Sync with KeepAlive Client

* Tidying up

* eslint

* Fix Breaking of building mobile client

* Refactor to make building on android possible

* Coding Convention

* Update shim-init-node.js

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2020-02-27 00:14:40 +00:00
Amit singh
721dd17686 Mobile: Fixes #2496: Allow loading images from plain HTTP urls (#2562) 2020-02-26 23:45:26 +00:00
mic704b
3830f5ee46 Desktop: Fix to update tag list when note is deleted. (#2554)
* Ensure tag list updated when note is deleted.

Add integration tests.

* Revert whitespace changes.
2020-02-26 23:42:14 +00:00
R-L-T-Y
ef8af13500 Desktop: Use asar packing to improve performances (#2531)
* Use the strongly recommended asar packing on linux

* Use asar for macOS packaging

* Update package.json

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2020-02-26 23:39:24 +00:00
Brandon D
16fb1bda53 Doc: Added Styling Information To CONTRIBUTING.md (#2474)
* Added Styling Information To CONTRIBUTING.md

* Typo Fix + Section Movement

* Coding Style Guidelines Init

* Fixes as per requested by devs
2020-02-25 14:06:56 +00:00
Laurent Cozic
e8fcb0cc87 Update CONTRIBUTING.md 2020-02-25 13:47:44 +00:00
Jeremy Robertson
0e23ea5284 Desktop: Resolves #160: Add word counter feature to notes (#2444)
* Add word counter logic

Fix errant whitespace changes

* update to using react hooks
Use React hooks
remove extra theme set
Update styling function

* correct linting and package lock issues

* WIP: update button functionality

* Add line count and update styling from feedback

* corrected file location to fit new build
2020-02-25 09:43:31 +00:00
Pavel Moiseenko
f9143ad817 Improve ISSUE_TEMPLATE.md (#2571) 2020-02-24 19:43:08 -05:00
Helmut K. C. Tessarek
925c03acca Update website 2020-02-24 17:12:27 -05:00
Laurent Cozic
421d7a947f Tools: Added back RN bundler command and cleaned up files 2020-02-24 17:30:11 +00:00
Devon Zuegel
7104d5b480 Doc: Add docs for auto-reloading the Electron client (#2564) 2020-02-24 11:27:26 +00:00
Laurent Cozic
ddb631d800 Merge branch 'refactor_clipper_build' 2020-02-23 21:31:30 +00:00
PackElend
6107af625f change path to GSoC live blog 2020-02-24 11:43:44 +01:00
Laurent Cozic
2ce40e0390 Finished fixing clipper build 2020-02-23 21:15:37 +00:00
Laurent Cozic
3f267f3774 Clean up unusued files 2020-02-23 21:04:14 +00:00
Laurent Cozic
91ef985353 Moved clipper files one level down 2020-02-23 20:51:04 +00:00
PackElend
cc759afe16 added RTFM and ask for structured writting
- added RTFM 
- added to watch the live blog
- added "in a structured manner" to Recommended steps
- Changed [Development  category] to [GSoC category]
2020-02-23 20:05:00 +01:00
StarFang208
fd405457e4 Translation: Update it_IT.po (#2551)
Translated the missing lines.
2020-02-22 17:53:25 -05:00
Sem
65706980a2 Translation: Update de_DE.po (#2557) 2020-02-22 15:48:24 -05:00
Laurent Cozic
04851284ca Merge branch 'master' of github.com:laurent22/joplin 2020-02-22 18:09:17 +00:00
mic704b
fbedc6b29b Desktop: Resolves #262: Implement "show all notes" (#2472)
* Implement "show all notes" feature.

* Ensure middleware is completely flushed and shutdown before continuing tests.
2020-02-22 11:25:16 +00:00
Laurent Cozic
d228ff9fbd Tools: Improve tsc watch 2020-02-22 11:20:41 +00:00
saif elhak awainia
0f28060795 Mobile: Fixing mobile plateform detection in settings (#2549) 2020-02-22 09:03:49 +00:00
PackElend
1df8509e4d escaped < in ## Recommended steps 2020-02-21 23:12:42 +01:00
PackElend
1229b772fe specified introduction topic subject
The subject of the topic shall contain your username, e.g. _Introducing <username>_.
2020-02-21 23:10:47 +01:00
Laurent Cozic
3cf3cd1598 Cli: Fixes #2536: Fixed issue when a notebook does not have a parent 2020-02-21 18:01:15 +00:00
Laurent Cozic
c5f1f11f2d Update stale.yml 2020-02-21 16:31:35 +00:00
Laurent Cozic
b4b424bf8a Tools: Moved testing under "npm run test" and clean-up no longer used shell scripts 2020-02-21 12:15:06 +00:00
mic704b
2d1aa27955 Doc: Update CONTRIBUTING.md (#2543)
Fix instruction to build unit tests.
2020-02-21 11:52:35 +00:00
mic704b
1f803662d3 Tools: Improve test building (#2546) 2020-02-21 11:48:53 +00:00
Laurent Cozic
2cbbc7100a Update BUILD.md 2020-02-21 11:06:00 +00:00
Laurent Cozic
ed2a6f15fd Update BUILD.md 2020-02-21 11:04:56 +00:00
Laurent Cozic
1aa806df85 Update BUILD.md
Typo
2020-02-21 11:00:02 +00:00
Laurent Cozic
17aa5ae243 Update BUILD.md
Removed non-breaking space
2020-02-21 10:55:09 +00:00
Laurent Cozic
1a96ee4c6b Tools: Fixed auto-ignored files and updated BUILD.md 2020-02-21 07:16:03 +00:00
Anjula Karunarathne
0d9ff26d51 Update BUILD.md (#2542) 2020-02-21 00:53:08 -05:00
Helmut K. C. Tessarek
ce40813bcf Desktop: fix Resources menu item on macOS (#2530)
* fix Resources menu item

On macOS the menu item `Resources` never showed up under `Tools`.

* var -> let
2020-02-21 00:33:48 -05:00
genneko
ea1db84fcc Translation: Fix an sprintf format error in ja (#2541) 2020-02-20 23:10:21 -05:00
Laurent Cozic
c79ee74b4c Electron release v1.0.185 2020-02-20 23:00:14 +00:00
Laurent Cozic
3407a31cf6 Tools: Improve and simplify how to build the apps (#2538)
* Improving CLI build

* Improving CLI build

* Remove requirement to build the tools

* Moved Electron app one level down

* Clean up Electron build

* Moved tools to sub-dir

* Updated root script

* update root

* update root

* update root

* update root

* update root

* update root

* Updated build

* Added doc

* Update CI config

* Should not lint index.js

* Fixing jetify

* Fixed linter errors

* Fixed pod build

* Fixed Windows build
2020-02-20 22:59:18 +00:00
PackElend
2dfe693564 added: share your GitHub username
added "share your GitHub username" to recommended steps to track PR more easily
2020-02-20 20:17:38 +01:00
PackElend
e99edd4af9 added: share your GitHub username
added "share your GitHub username" to recommended steps to track PR more easily
2020-02-20 20:06:47 +01:00
genneko
8d43e1215a Translation: Update ja_JP.po (#2537) 2020-02-20 12:02:59 -05:00
Ji-Hyeon Gim
6449289147 Translation: Update ko.po (#2534)
Signed-off-by: Ji-Hyeon Gim <potatogim@potatogim.net>
2020-02-20 12:00:52 -05:00
zaoyifan
5a33dcaf07 Translation: Update zh_CN.po (#2525)
* Improve Simplified Chinese translation

* Improve Simplified Chinese translation
2020-02-20 02:52:59 -05:00
TheoDutch
2e804086eb Translation: Update nl_NL .po (#2526) 2020-02-19 19:02:30 -05:00
Georg Grab
5bbedc7e3c Desktop: Resolves #592: Create a screen that list all the resouces (#2189)
* Add a Basic Resource Screen

Implement "Open in External Viewer"

Add @types/lodash as a devDependency, prettyBytes for pretty printing bytes

Implement display of Orphaned Resources

Implement deletion of Resources

Implement sorting logic

Minor Styling

Remove Compiled js

Review - No more Orphan display, LIMIT resources

ResourceScreen - use DB for sorting

Database - Version 28 (Index on Resource size)

Add compiled JS with eslint --fix

Add ResourceScreen to ignore files, delete from repo

Disable enforce-react-hooks

* Second review round

* Update ResourceScreen.tsx

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2020-02-19 10:13:33 +00:00
Laurent Cozic
9455936f19 Merge branch 'master' of github.com:laurent22/joplin 2020-02-19 00:45:46 +00:00
Helmut K. C. Tessarek
9af4ec7b04 Mobile: Update react-native-version-info to 1.0.1 (#2522) 2020-02-19 00:45:22 +00:00
Laurent Cozic
fb619a0099 Fixed TypeScript issues 2020-02-19 00:41:49 +00:00
Laurent Cozic
35e369ff1a Merge branch 'master' into improve-build 2020-02-19 00:18:38 +00:00
Laurent Cozic
2fa8e2ff09 Fix build 2020-02-19 00:09:19 +00:00
Devon Zuegel
eeb9999334 Mobile: Add quick actions (#2247)
* Super basic QuickAction is working!

* QuickAction successfully creates notes

* Update icons

* Update icons and support new to-do

* Update icons and support new to-do

* Fixed

* Extract QuickActions

* It works as long as you go out of the edit screen (saving is not sufficient)

* working? but still kinda buggy...

* Cleanup

* Cleanup

* Cleanup

* Use the same pattern as onJoplinLinkClick_

* Cleanup

* Cleanup

* Remove pluginAssets/index.js change

* manual Andoid linking

* Transition QuickActions.js to .ts

* Unstage QuickActions.js in favor of .ts

* Move QuickActions out of lib/

* Add comment about userInfo in QuickActions

* Remove redundant QuickActions file

* Remove pluginAssets/index to resolve conflict

* Update CONTRIBUTING.md to include test runner troubleshooting

* Add `npm run tsc` to Unit Tests docs

Co-authored-by: Helmut K. C. Tessarek <tessarek@evermeet.cx>
2020-02-18 23:52:36 +00:00
Helmut K. C. Tessarek
e6cbd8c8f8 Update translations 2020-02-18 15:01:29 -05:00
Mario
5a40204cb3 Translation: add Estonian language (et_EE.po) (#2512)
* Estonian lang

* correction of mistakes
2020-02-18 14:58:13 -05:00
Laurent Cozic
805cf06af7 Merge branch 'master' of github.com:laurent22/joplin 2020-02-18 16:19:25 +00:00
mic704b
bdce832fee Desktop: Ensure tabs act like tabs and spaces act like spaces in editor. (#2508) 2020-02-17 23:28:55 +00:00
Laurent Cozic
4c97aa8542 Improving build 2020-02-17 20:55:09 +00:00
Laurent Cozic
ca9102d4f5 Tools: Move Cli compiles locales under git to simplify build 2020-02-17 20:41:11 +00:00
Laurent Cozic
4f8e7b0e2b Clipper release v1.0.20 2020-02-15 15:22:38 +00:00
Laurent Cozic
9e92c9230b Merge branch 'master' of github.com:laurent22/joplin 2020-02-15 15:22:13 +00:00
Laurent Cozic
2fef4a0c09 Fixing CRA 2020-02-15 15:21:58 +00:00
Helmut K. C. Tessarek
00dc711ffa change clipper manifest to correct version - it will be changed by the release script 2020-02-14 22:48:19 -05:00
Laurent Cozic
a52c261d95 Fixed tests 2020-02-14 09:43:22 +00:00
Laurent Cozic
c63d8a70b8 Desktop: Fixed search bar text not visible in dark mode 2020-02-14 00:57:20 +00:00
Laurent Cozic
79f5bcd2fc All: Fixes #2485: Better handling of rare error in WebDAV server 2020-02-14 00:53:51 +00:00
Laurent Cozic
675ef8aefd Mobile: Fixes #2141: Fixed links not working within TOC 2020-02-14 00:36:11 +00:00
Laurent Cozic
f97bae0b27 iOS: Fixes #2384: Improve support for dark mode 2020-02-14 00:17:09 +00:00
Laurent Cozic
3361901cd8 Merge branch 'master' of github.com:laurent22/joplin 2020-02-13 23:59:34 +00:00
Laurent Cozic
3db47b575b All: Security: Fixed potential Arbitrary File Read via XSS 2020-02-13 23:59:23 +00:00
Helmut K. C. Tessarek
b1ab59b2e6 Desktop: Update Electron to 7.1.12 (#2500)
This is only a minor bump but several issues have been fixed since 7.1.9:

- Fixed an issue where sending complex objects over IPC could in some cases cause the renderer process to be terminated. electron/electron#21922
- Fixed crash with Date.toLocaleString for invalid locale and locale of the format aa@BB. electron/electron#21969
- Fixed flash plugin not working. electron/electron#22109
- Fixed issue where renderers could crash during GC when using the contextBridge module. electron/electron#22112
- Fixed netLog.stopLogging returning undefined instead of the path to the log. electron/electron#21988
- Fixed an edge case in checkbox logic on Windows. electron/electron#21860
- Fixed an issue where window.print() only worked once on a single BrowserWindow. electron/electron#21911
- Fixed an issue where the credits set in About Panel credits were not dark mode aware on macOS. electron/electron#21924
- Fixed error thrown when importing powerMonitor on Linux before app's 'ready' event. electron/electron#21941
- Fixed fuzzy font rendering when hot-plugging displays on macOS Catalina. electron/electron#21872
- Fixed BrowserWindow.setFocusable(true) not working on Windows. electron/electron#21855
- Fixed set-cookie header not passed in net module. electron/electron#21770
- Fixed an issue where custom stream protocols would sometimes not complete responses when the data stream ended. electron/electron#21758
- Fixed crash when restoring minimized hidden window on Windows. electron/electron#21820
- Fixed issue where non-zero size pixels in CSS styles could be rounded down to zero size pixels. electron/electron#21857
- Fixed memory leak when using javascript generator functions. electron/electron#21773
- Fixed potential hang when sending synchronous IPC messages on process shutdown. electron/electron#21776
2020-02-13 00:49:52 +00:00
Bailey
652b852f6d Translation: Update nl_NL.po (#2498)
I felt like improving some of the Dutch translation work for Joplin so here are some more and improved translations

(not all that many but more may come)
2020-02-12 18:03:28 -05:00
Fernando Pindado
54fd2049a8 Translation: Update es_ES.po (#2497)
Updated some already translated messages and translated new ones
2020-02-12 16:28:28 -05:00
Laurent Cozic
06d807d9ff Clipper: Fixes #2489: Fixed clipping of pages that contain images without sources (YouTube), and improved support for SVG graphics 2020-02-12 18:15:16 +00:00
Laurent Cozic
b66b1ba9e6 Clipper: Upgrade create-react-app to remove need for unsafe-eval CSP flag 2020-02-12 17:46:42 +00:00
Laurent Cozic
06f71cea24 Desktop: Resolves #2162: Added zoom controls to the application menu
commit 2285000a6ac09eed12d4215d71b4f88f1660411a
Author: Laurent Cozic <laurent@cozic.net>
Date:   Tue Feb 11 22:25:12 2020 +0000

    Deprecate style.zoom

commit 3a6da4ffee280dd93eee1f4ae8891a72ecaea8e3
Author: Laurent Cozic <laurent@cozic.net>
Date:   Tue Feb 11 22:13:01 2020 +0000

    Fix zoom branch

commit c46c080a06
Author: Elizabeth Schafer <elizabeth.schafer.wenk@gmail.com>
Date:   Sun Dec 15 10:37:10 2019 -0500

    Using componentDidUpdate rather than deprecated componentWillRecieveProps

    https://github.com/laurent22/joplin/pull/2165#discussion_r357441917

commit 069444fd02
Author: Elizabeth Schafer <elizabeth.schafer.wenk@gmail.com>
Date:   Sun Dec 15 10:33:23 2019 -0500

    Zoom factor is saved to private setting

    https://github.com/laurent22/joplin/pull/2165#issuecomment-565258704

commit 34a1b2dc3e
Author: Elizabeth Schafer <elizabeth.schafer.wenk@gmail.com>
Date:   Sun Dec 15 10:30:29 2019 -0500

    Basing new zoom value off redux state

    https://github.com/laurent22/joplin/pull/2165#discussion_r357441406
    https://github.com/laurent22/joplin/pull/2165#discussion_r357441512

commit 7ec15ff4c4
Author: Elizabeth Schafer <elizabeth.schafer.wenk@gmail.com>
Date:   Fri Dec 13 12:50:11 2019 -0500

    Reducer shouldn't have any side effects

    https://github.com/laurent22/joplin/pull/2165#discussion_r357440767

commit 9e676ece13
Author: Elizabeth Schafer <elizabeth.schafer.wenk@gmail.com>
Date:   Sun Dec 8 11:11:28 2019 -0500

    Added zoom options to the view menu
2020-02-12 12:41:32 +00:00
Laurent Cozic
88eed12c78 Merge branch 'master' of github.com:laurent22/joplin 2020-02-12 11:20:46 +00:00
Laurent Cozic
ea75f65e35 Desktop, Mobile: Fixed note renderer asset caching issue 2020-02-12 10:17:15 +00:00
axq
b1a9b448a6 Documentation: Extend copyright date range to 2020 (#2495)
* Minor English improvements in README.md

* Update LICENSE

* Update License.txt

* Update terminal.md

* Extend copyright date range to 2020

Minor housekeeping on copyright date range, so the app doesn't look stale in 2020
2020-02-12 05:14:08 -05:00
Helmut K. C. Tessarek
c27c3c48ba commit files added by buildAssets.js 2020-02-11 22:29:37 -05:00
saif elhak awainia
fdf28c3513 Mobile: Added OLED dark theme (#2368)
* Android: Adding Oled dark theme

* Mobile: Fixing coding style issues

* Making oled dark mode only reachable in mobile app

* Fixing eslint errors

* Update Setting.js

* Update Setting.js

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2020-02-11 23:32:15 +00:00
Helmut K. C. Tessarek
018222a1f4 Desktop, Mobile: Fixes #2477: Add new Katex fonts to improve rendering (#2478)
* add katex font KaTeX_Size4-Regular.woff2

fixes #2477

* deleted:    ElectronClient/app/gui/note-viewer/pluginAssets/katex/fonts/KaTeX_Size4-Regular.woff2

* add font to buildAssets.js

* register font in katex.js

* prepare files in case we need other fonts in the future

* use all fonts
2020-02-11 22:53:12 +00:00
Brandon Wulf
ca5d6c5cfe Desktop: Fix .desktop file & force refresh (#2479) 2020-02-11 22:33:10 +00:00
Laurent Cozic
d02488f00c Merge branch 'master' of github.com:laurent22/joplin 2020-02-11 22:29:02 +00:00
Laurent Cozic
1d14c8a706 Desktop, Mobile: Resolves #2001: Added Mermaid diagrams support
commit ae8a0641ab3681a3b25f6dc4ac40f20d52aaeb4d
Author: Laurent Cozic <laurent@cozic.net>
Date:   Tue Feb 11 17:58:08 2020 +0000

    Fixed plugin asset

commit 03adf7fc7c878f82f6a43515d37fd5e3dd59390f
Author: Laurent Cozic <laurent@cozic.net>
Date:   Mon Feb 10 22:09:18 2020 +0000

    Desktop: Adding Mermaid support
2020-02-11 22:28:43 +00:00
mic704b
573b744293 Desktop: Support export of multiple notes to PDF files. (#2468)
* Support export of multiple notes to pdf files.

* Update in response to review comments.

Find unique filenames when exporting multiple pdfs.
Simplify delay.

* Eliminate redundant retries and fix error message in fs shim unique filename search.

* Make output filenames consistent between single and multi pdf export.

* Remove unnecessary white space.

* Remove legacy sleep in pdf export and add a little more variability to unique filename search.
2020-02-11 14:14:04 +00:00
Marcus Hill
4bd326f72c Clipper: Add ability to launch clipper window with shortcut (#2272)
* Clipper: Add ability to launch clipper window with shortcut

This change adds a command to the manifest.json file for the web clipper
which launches the webclipper rather than clicking on it.
Because this is a WebExtensions feature and not something homegrown,
 users are able to change (or remove) the shortcut using native browser functionality.

* Add commands for all clipping options

* Remove empty suggestedKeys property from extension manifest

* Add ability to focus the webclipper buttons

* Remove debug log

* Change sendClipMessage warning to error

* Refactor to add a sendContentToJoplin command

* Update index.js

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2020-02-11 10:49:07 +00:00
Anjula Karunarathne
d278809659 Desktop: Fixed incorect location format (#2480) 2020-02-11 09:49:48 +00:00
Helmut K. C. Tessarek
8053e11b9a minor improvements of wording
There's no word `toggle-able`. It does not exist.
functionality is a mass noun. There's no plural form. (same as `data` or `information`)
2020-02-10 19:17:02 -05:00
Laurent Cozic
5f544fba8a Update markdown.md 2020-02-11 00:08:29 +00:00
Laurent Cozic
8ee0d8a73e Doc: More info about Markdown plugins and standards 2020-02-11 00:05:43 +00:00
Laurent Cozic
b56352cb4e Updated buildAssets script 2020-02-10 22:26:25 +00:00
Laurent Cozic
6d0cc97635 Removed auto-generated assets 2020-02-10 22:21:43 +00:00
Laurent Cozic
384c7cd831 Merge branch 'master' of github.com:laurent22/joplin 2020-02-10 21:51:18 +00:00
Laurent Cozic
9ec1e84ed0 Desktop, Cli: Fix importing of very large attachments (150MB+) from Evernote ENEX files 2020-02-10 21:50:45 +00:00
Laurent Cozic
691521c5b9 ios-v10.0.44 2020-02-10 21:44:27 +00:00
PackElend
a1e77b4ccd Rename lessons learned to lessons learned.md 2020-02-10 18:08:09 +01:00
PackElend
f90da61a85 Create lessons learned 2020-02-10 18:07:54 +01:00
Helmut K. C. Tessarek
0b0ff15dde Desktop: Use current year in About box (in the copyright text) (#2466) 2020-02-10 15:54:53 +00:00
Laurent Cozic
9b157c7ac3 Android release v1.0.318 2020-02-09 22:25:18 +00:00
Laurent Cozic
525ba12fc8 Merge branch 'master' of github.com:laurent22/joplin 2020-02-09 22:17:10 +00:00
Laurent Cozic
2785b8ffc5 Mobile: Upgrading to React Native to 0.61.5 - fixed Android build 2020-02-09 22:15:36 +00:00
mic704b
cd9d5db3c2 Desktop: Fix to update the note list if the selected tag is deleted. (#2398)
* Refresh the note list if the selected tag is deleted.

* Handle case where last note is untagged (by following the note)

* Corrections.

* Correct call to asynchronous function.
2020-02-09 22:08:24 +00:00
Laurent Cozic
d8ef15a1e2 Mobile: Upgrading to React Native to 0.61.5 2020-02-09 20:21:52 +00:00
Laurent Cozic
f1015ca73d Android release v1.0.317 2020-02-09 17:50:51 +00:00
Laurent Cozic
e865a5d7c6 RN upgrade: Fixing Android app 2020-02-09 17:42:19 +00:00
Laurent Cozic
cd6e5ccfb8 RN upgrade: Fix sidebar dark overlay 2020-02-09 16:41:30 +00:00
Laurent Cozic
46ca24cf9d RN upgrade: Restore iOS notification feature 2020-02-09 16:29:46 +00:00
Laurent Cozic
813137efc9 RN upgrade: Fix SafeAreaView on iOS 2020-02-09 15:48:09 +00:00
Laurent Cozic
4235288c55 Mobile: Upgrading to RN 60 2020-02-09 14:51:12 +00:00
Laurent Cozic
7fd445173d Desktop, Mobile: Fixes #2277: Fix alignment of checkboxes and other list items in rendered note 2020-02-08 17:15:22 +00:00
Laurent Cozic
1e190bbe70 Clipper: Fixes #2294: Clipping selection in some cases would not work, when that selection contains multiple code blocks 2020-02-08 12:16:49 +00:00
Laurent Cozic
0229686203 iOS: Fixes #2301: Removed filesystem sync option, which was not supported 2020-02-08 11:59:19 +00:00
Laurent Cozic
1606076b4e Mobile: Fixes #2401: Fixed code syntax highlighting on dark theme 2020-02-08 11:31:22 +00:00
Laurent Cozic
cd630e9516 Removed auto-copied assets 2020-02-08 11:20:44 +00:00
Laurent Cozic
3b200e5c92 Desktop, Mobile: Fixes #2357: Fix slow rendering and memory leak issues with Katex notes 2020-02-08 11:11:04 +00:00
Helmut K. C. Tessarek
639712c003 Merge branch 'master' of github.com:laurent22/joplin 2020-02-07 20:06:57 -05:00
Helmut K. C. Tessarek
cfb59f2f19 Desktop: show master instead of HEAD as branch in about box (#2465)
Builds in CI are done from a 'detached HEAD' state. Thus `git rev-parse --abbrev-ref HEAD` always returns HEAD, which is not master.
Releases are always created from the master branch, thus HEAD -> master.
2020-02-08 01:02:10 +00:00
527 changed files with 54015 additions and 40397 deletions

View File

@@ -6,6 +6,7 @@ _releases/
Assets/
CliClient/build
CliClient/locales
CliClient/locales-build
CliClient/node_modules
CliClient/tests-build
CliClient/tests/enex_to_md
@@ -14,20 +15,20 @@ CliClient/tests/logs
CliClient/tests/support
CliClient/tests/sync
CliClient/tests/tmp
Clipper/joplin-webclipper/content_scripts/JSDOMParser.js
Clipper/joplin-webclipper/content_scripts/Readability-readerable.js
Clipper/joplin-webclipper/content_scripts/Readability.js
Clipper/joplin-webclipper/dist
Clipper/joplin-webclipper/icons
Clipper/joplin-webclipper/popup/build
Clipper/joplin-webclipper/popup/node_modules
Clipper/content_scripts/JSDOMParser.js
Clipper/content_scripts/Readability-readerable.js
Clipper/content_scripts/Readability.js
Clipper/dist
Clipper/icons
Clipper/popup/build
Clipper/popup/node_modules
docs/
ElectronClient/app/dist
ElectronClient/app/lib
ElectronClient/app/lib/vendor/sjcl-rn.js
ElectronClient/app/lib/vendor/sjcl.js
ElectronClient/app/locales
ElectronClient/app/node_modules
ElectronClient/dist
ElectronClient/lib
ElectronClient/lib/vendor/sjcl-rn.js
ElectronClient/lib/vendor/sjcl.js
ElectronClient/locales
ElectronClient/node_modules
highlight.pack.js
node_modules/
ReactNativeClient/android
@@ -45,11 +46,19 @@ Server/docs/
Server/dist/
Server/bin/
Server/node_modules/
ElectronClient/app/packageInfo.js
ElectronClient/packageInfo.js
ReactNativeClient/pluginAssets/
ReactNativeClient/lib/joplin-renderer/vendor/fountain.min.js
ReactNativeClient/lib/joplin-renderer/assets/
ReactNativeClient/lib/rnInjectedJs/
# Ignore files generated from TypeScript files
ElectronClient/app/gui/ShareNoteDialog.js
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
ElectronClient/gui/NoteContentPropertiesDialog.js
ElectronClient/gui/ResourceScreen.js
ElectronClient/gui/ShareNoteDialog.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/sanitize_html.js
ReactNativeClient/lib/JoplinServerApi.js
ReactNativeClient/PluginAssetsLoader.js
ReactNativeClient/setUpQuickActions.js
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD

View File

@@ -19,7 +19,10 @@ module.exports = {
'expect': 'readonly',
'describe': 'readonly',
'it': 'readonly',
'beforeAll': 'readonly',
'afterAll': 'readonly',
'beforeEach': 'readonly',
'afterEach': 'readonly',
'jasmine': 'readonly',
// React Native variables
@@ -50,10 +53,10 @@ module.exports = {
// possible race conditions in contexts where we know it cannot happen.
"require-atomic-updates": 0,
// -------------------------------
// Coding style preferences
// -------------------------------
"enforce-react-hooks/enforce-react-hooks": 2,
// Checks rules of Hooks
"react-hooks/rules-of-hooks": "error",
// Checks effect dependencies
"react-hooks/exhaustive-deps": "error",
// -------------------------------
// Formatting
@@ -92,6 +95,6 @@ module.exports = {
"plugins": [
"react",
"@typescript-eslint",
"enforce-react-hooks",
"react-hooks"
],
};
};

View File

@@ -19,24 +19,26 @@ labels: 'bug'
## Environment
Joplin version:
Platform:
OS specifcs:
Joplin version:
Platform:
OS specifics:
<!--
Platform can be one of: macOS, Linux, Windows, Android, iOS, terminal (or a combination)
OS specifcs: e.g. OS version, Linux distribution, Android/iOS version, ...
OS specifics: e.g. OS version, Linux distribution, Android/iOS version...
-->
## Steps To Reproduce
## Steps to reproduce
1.
2.
1.
2.
3.
<!--
Issues without reproduction steps are likely to stall.
-->
Describe what you expected to happen:
## Describe what you expected to happen

1
.github/stale.yml vendored
View File

@@ -12,6 +12,7 @@ exemptLabels:
- "nice to have"
- "upstream"
- "backlog"
- "high"
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable

14
.gitignore vendored
View File

@@ -40,13 +40,19 @@ Tools/github_oauth_token.txt
_releases
ReactNativeClient/lib/csstojs/
ReactNativeClient/lib/rnInjectedJs/
ElectronClient/app/gui/note-viewer/fonts/
ElectronClient/app/gui/note-viewer/lib.js
ElectronClient/gui/note-viewer/fonts/
ElectronClient/gui/note-viewer/lib.js
Tools/commit_hook.txt
.vscode/*
*.map
# Ignore files generated from TypeScript files
ElectronClient/app/gui/ShareNoteDialog.js
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
ElectronClient/gui/NoteContentPropertiesDialog.js
ElectronClient/gui/ResourceScreen.js
ElectronClient/gui/ShareNoteDialog.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/sanitize_html.js
ReactNativeClient/lib/JoplinServerApi.js
ReactNativeClient/PluginAssetsLoader.js
ReactNativeClient/setUpQuickActions.js
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD

View File

@@ -55,12 +55,8 @@ before_install:
script:
- |
# Copy lib
rsync -aP --delete ReactNativeClient/lib/ ElectronClient/app/lib/
# Install tools
npm install
npm run tsc
cd Tools
npm install
cd ..
@@ -70,8 +66,7 @@ script:
# and that would break the desktop release.
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
cd CliClient
npm install
./run_test.sh
npm run test
testResult=$?
if [ $testResult -ne 0 ]; then
exit $testResult
@@ -113,5 +108,5 @@ script:
fi
# Prepare the Electron app and build it
cd ElectronClient/app
npm install && USE_HARD_LINKS=false yarn dist
cd ElectronClient
USE_HARD_LINKS=false yarn dist

159
BUILD.md
View File

@@ -1,81 +1,104 @@
[![Travis Build Status](https://travis-ci.org/laurent22/joplin.svg?branch=master)](https://travis-ci.org/laurent22/joplin) [![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/github/laurent22/joplin?branch=master&passingText=master%20-%20OK&svg=true)](https://ci.appveyor.com/project/laurent22/joplin)
# General information
# Building the applications
- All the applications share the same library, which, for historical reasons, is in ReactNativeClient/lib. This library is copied to the relevant directories when building each app.
- In general, most of the backend (anything to do with the database, synchronisation, data import or export, etc.) is shared across all the apps, so when making a change please consider how it will affect all the apps.
Note that all the applications share the same library, which, for historical reasons, is in `ReactNativeClient/lib`. This library is copied to the relevant directories when building each app.
# TypeScript
Most of the application is written in JavaScript, however new classes and files should generally be written in [TypeScript](https://www.typescriptlang.org/). Even if you don't write TypeScript code, you will need to build the existing .ts and .tsx files. This is done from the root of the project, by running `npm run tsc`.
If you are modifying TypeScript code, the best is to have the compiler watch for changes from a terminal. To do so, run `npm run tsc-watch`.
All TypeScript files are generated next to the .ts or .tsx file. So for example, if there's a file "lib/MyClass.ts", there will be a generated "lib/MyClass.js" next to it. If you create a new TypeScript file, make sure you add the generated .js file to .gitignore. It is implemented that way as it requires minimal changes to integrate TypeScript in the existing JavaScript code base.
## macOS dependencies
brew install yarn node
echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
## Linux and Windows (WSL) dependencies
## Required dependencies
- Install yarn - https://yarnpkg.com/lang/en/docs/install/
- Install node v10.x (check with `node --version`) - https://nodejs.org/en/
- If you get a node-gyp related error you might need to manually install it: `npm install -g node-gyp`
- Install node - https://nodejs.org/en/
# Building the tools
## Building
Before building any of the applications, you need to build the tools and pre-commit hooks:
Before doing anything else, from the root of the project, run:
```
npm install && cd Tools && npm install && cd ..
npm install
Then you can test the various applications:
## Testing the desktop application
cd ElectronClient
npm run start
If you'd like to auto-reload the app on changes rather than having to quit and restart it manually each time, you can use [watchman-make](https://facebook.github.io/watchman/docs/watchman-make.html):
```sh
cd ElectronClient
watchman-make -p '**/*.js' '**/*.jsx' --run "npm run start"
```
# Building the Electron application
It still requires you to quit the application each time you want it to rebuild, but at least you don't have to re-run `"npm run start"` each time. Here's what the workflow loop looks like in practice:
## Linux and macOS
1. Edit and save files in your text editor.
2. Switch to the Electron app and <kbd>cmd</kbd>+<kbd>Q</kbd> to quit it.
3. `watchman` immediately restarts the app for you (whereas usually you'd have to switch back to the terminal, type `"npm run start"`, and hit enter).
```
npm run copyLib
npm run tsc
cd ElectronClient/app
npm install
yarn dist
```
## Testing the Terminal application
cd CliClient
npm run start
## Testing the Mobile application
First you need to setup React Native to build projects with native code. For this, follow the instructions on the [Get Started](https://facebook.github.io/react-native/docs/getting-started.html) tutorial, in the "React Native CLI Quickstart" tab.
Then:
cd ReactNativeClient
npm run start-android
# Or: npm run start-ios
To run the iOS application, it might be easier to open the file `ios/Joplin.xcworkspace` on XCode and run the app from there.
Normally the bundler should start automatically with the application. If it doesn't run `npm run start`.
## Building the clipper
cd Clipper/popup
npm install
npm run watch # To watch for changes
To test the extension please refer to the relevant pages for each browser: [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension#Trying_it_out) / [Chrome](https://developer.chrome.com/extensions/faq#faq-dev-01). Please note that the extension in dev mode will only connect to a dev instance of the desktop app (and vice-versa).
## Watching files
To make changes to the application, you'll need to rebuild any TypeScript file you've changed, and rebuild the lib. The simplest way to do all this is to watch for changes from the root of the project. Simply run this command, and it should take care of the rest:
npm run watch
Running `npm run build` would have the same effect, but without watching.
## Running an application with additional parameters
You can specify additional parameters when running the desktop or CLI application. To do so, add `--` to the `npm run start` command, followed by your flags. For example:
npm run start -- --profile ~/MyTestProfile
## TypeScript
Most of the application is written in JavaScript, however new classes and files should generally be written in [TypeScript](https://www.typescriptlang.org/). All TypeScript files are generated next to the .ts or .tsx file. So for example, if there's a file "lib/MyClass.ts", there will be a generated "lib/MyClass.js" next to it. It is implemented that way as it requires minimal changes to integrate TypeScript in the existing JavaScript code base.
# Troubleshooting desktop application
## On Linux and macOS
If there's an error `while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory`, run `sudo apt-get install libgconf-2-4`
If you get a node-gyp related error you might need to manually install it: `npm install -g node-gyp`.
If you get a node-gyp related error, you might need to manually install it: `npm install -g node-gyp`.
If you get the error `libtool: unrecognized option '-static'`, follow the instructions [in this post](https://stackoverflow.com/a/38552393/561309) to use the correct libtool version.
That will create the executable file in the `dist` directory.
## On Windows
From `/ElectronClient` you can also run `run.sh` to run the app for testing.
## Windows
Run the following commands on Windows Command prompt running as Administrator:
```
xcopy /C /I /H /R /Y /S ReactNativeClient\lib ElectronClient\app\lib
npm run tsc
cd ElectronClient\app
npm install
yarn dist
```
If node-gyp does not works (MSBUILD: error MSB3428: Could not load the Visual C++ component "VCBuild.exe"), you might need to install the `windows-build-tools` using `npm install --global windows-build-tools`.
If node-gyp does not work (MSBUILD: error MSB3428: Could not load the Visual C++ component "VCBuild.exe"), you might need to install `windows-build-tools` using `npm install --global windows-build-tools`.
If `yarn dist` fails, it may need administrative rights.
If you get an `error MSB8020: The build tools for v140 cannot be found.` try to run with a different toolset version, eg `npm install --toolset=v141` (See [here](https://github.com/mapbox/node-sqlite3/issues/1124) for more info).
The [building\_win32\_tips on this page](./readme/building_win32_tips.md) might be helpful.
## Troubleshooting desktop application
## Other issues
> The application window doesn't open or is white
@@ -84,34 +107,10 @@ This is an indication that there's an early initialisation error. Try this:
- In ElectronAppWrapper, set `debugEarlyBugs` to `true`. This will force the window to show up and should open the console next to it, which should display any error.
- In more rare cases, an already open instance of Joplin can create strange low-level bugs that will display no error but will result in this white window. A non-dev instance of Joplin, or a dev instance that wasn't properly closed might cause this. So make sure you close everything and try again. Perhaps even other Electron apps running (Skype, Slack, etc.) could cause this?
- Also try to delete node_modules and rebuild.
- If all else fail, switch your computer off and on again, to make sure you start clean.
- If all else fails, switch your computer off and on again, to make sure you start clean.
> How to work on the app from Windows?
You should not use WSL at all because this is a GUI app that lives outside of WSL, and the WSL layer can cause all kind of very hard to debug issues. It can also lock files in node_modules that cannot be unlocked when the app crashes (you need to restart your computer). Likewise, don't run the TypeScript watch command from WSL.
**You should not use WSL at all** because this is a GUI app that lives outside of WSL, and the WSL layer can cause all kind of very hard to debug issues. It can also lock files in node_modules that cannot be unlocked when the app crashes. (You need to restart your computer.) Likewise, don't run the TypeScript watch command from WSL.
So everything should be done from a Windows Command prompt running as Administrator. You can use `run.bat` to run the app in dev mode.
# Building the Mobile application
First you need to setup React Native to build projects with native code. For this, follow the instructions on the [Get Started](https://facebook.github.io/react-native/docs/getting-started.html) tutorial, in the "React Native CLI Quickstart" tab.
Then:
```
npm run tsc
cd ReactNativeClient
npm install
react-native run-ios
# Or: react-native run-android
```
# Building the Terminal application
```
cd CliClient
npm install
./build.sh
```
Run `run.sh` to start the application for testing.
So everything should be done from a Windows Command prompt or Windows PowerShell running as Administrator. All build and start commands are designed to work cross-platform, including on Windows.

View File

@@ -37,6 +37,7 @@ If you want to start contributing to the project's code, please follow these gui
- A good way to easily start contributing is to pick and work on a [good first issue](https://github.com/laurent22/joplin/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). We try to make these issues as clear as possible and provide basic info on how the code should be changed, and if something is unclear feel free to ask for more information on the issue.
- Before adding a new feature, ask about it in the [Github Issue Tracker](https://github.com/laurent22/joplin/issues?utf8=%E2%9C%93&q=is%3Aissue) or the [Joplin Forum](https://discourse.joplinapp.org/), or check if existing discussions exist to make sure the new functionality is desired.
- **Changes that will consist in more than 50 lines of code should be discussed the [Joplin Forum](https://discourse.joplinapp.org/)**, so that you don't spend too much time implementing something that might not be accepted.
- All the applications share the same backend (database, synchronisation, settings, models, business logic, etc.) so if you change something in the backend in one app, makes sure it still work in the other apps. Usually it does, but keep this in mind.
Building the apps is relatively easy - please [see the build instructions](https://github.com/laurent22/joplin/blob/master/BUILD.md) for more details.
@@ -46,27 +47,39 @@ Coding style is enforced by a pre-commit hook that runs eslint. This hook is ins
For new React components, please use [React Hooks](https://reactjs.org/docs/hooks-intro.html). For new code in general, please use TypeScript (unless you are modifying a file that was originally in JavaScript).
For changes made to the Desktop client that affect the user interface, refer to `ElectronClient/app/theme.js` for all styling information. The goal is to create a consistent user interface to allow for easy navigation of Joplin's various features and improve the overall user experience.
### Unit tests
When submitting a pull request for a new feature or bug fix, please add unit tests for your code. Unit testing GUI changes is not always possible so it is not required, but any change in a file under /lib for example should be unit tested.
The tests are under CliClient/tests. To get them running, you first need to build the CLI app:
cd CliClient
npm i
./build.sh
```sh
npm run tsc # Build the .ts and .tsx files
cd CliClient
npm install
```
To run all the test units:
./run_test.sh
```sh
npm run test
```
To run just one particular file:
./run_test.sh markdownUtils # Don't add the .js extension
```sh
npm run test -- --filter=markdownUtils # Don't add the .js extension
```
To filter tests:
To filter tests. For example, to run all the test units that contain "should handle conflict" in their description:
./run_test.sh "should handle conflict" # Will run all the test units that contain "should handle conflict" in their description
```sh
npm run test -- --filter="should handle conflict"
```
If you get the error `Cannot find module '/joplin/CliClient/node_modules/sqlite3/lib/binding/node-v79-darwin-x64/node_sqlite3.node'`, you may need to run `npm rebuild`.
## About abandoned pull requests

View File

@@ -1,4 +1,3 @@
build/
node_modules/
app/src
tests-build/
@@ -20,4 +19,5 @@ tests/sync
out.txt
linkToLocal.sh
yarn-error.log
tests/support/dropbox-auth.txt
tests/support/dropbox-auth.txt
build/

View File

@@ -40,7 +40,7 @@ class FolderListWidget extends ListWidget {
let output = 0;
while (true) {
const folder = BaseModel.byId(folders, folderId);
if (!folder.parent_id) return output;
if (!folder || !folder.parent_id) return output;
output++;
folderId = folder.parent_id;
}

View File

@@ -1,3 +1,3 @@
#!/bin/bash
set -e
./build.sh && NODE_PATH=build node build/build-doc.js
npm run build && NODE_PATH=build node build/build-doc.js

View File

@@ -1,16 +0,0 @@
#!/bin/bash
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
BUILD_DIR="$ROOT_DIR/build"
rsync -a --exclude "node_modules/" "$ROOT_DIR/app/" "$BUILD_DIR/"
rsync -a --delete "$ROOT_DIR/../ReactNativeClient/lib/" "$BUILD_DIR/lib/"
rsync -a --delete "$ROOT_DIR/../ReactNativeClient/locales/" "$BUILD_DIR/locales/"
cp "$ROOT_DIR/package.json" "$BUILD_DIR"
# Don't add TypeScript here or make it silent as output of Cli app must be clean
# cd $ROOT_DIR/..
# npm run tsc
# cd $ROOT_DIR
chmod 755 "$BUILD_DIR/main.js"

View File

@@ -1,3 +1,3 @@
#!/bin/bash
set -e
./build.sh && NODE_PATH="build/" node build/cli-integration-tests.js
npm run build && NODE_PATH="build/" node build/cli-integration-tests.js

View File

@@ -1,3 +1,3 @@
#!/bin/bash
set -e
./build.sh && NODE_PATH="build/" node build/fuzzing.js
npm run build && NODE_PATH="build/" node build/fuzzing.js

40
CliClient/gulpfile.js Normal file
View File

@@ -0,0 +1,40 @@
const gulp = require('gulp');
const fs = require('fs-extra');
const utils = require('../Tools/gulp/utils');
const tasks = {
copyLib: require('../Tools/gulp/tasks/copyLib'),
};
tasks.build = {
fn: async () => {
const buildDir = `${__dirname}/build`;
await utils.copyDir(`${__dirname}/app`, buildDir, {
excluded: ['node_modules'],
});
await utils.copyDir(`${__dirname}/locales-build`, `${buildDir}/locales`);
await tasks.copyLib.fn();
await utils.copyFile(`${__dirname}/package.json`, `${buildDir}/package.json`);
fs.chmodSync(`${buildDir}/main.js`, 0o755);
},
};
tasks.buildTests = {
fn: async () => {
const testBuildDir = `${__dirname}/tests-build`;
await utils.copyDir(`${__dirname}/tests`, testBuildDir, {
excluded: [
'lib/',
'locales/',
'node_modules/',
],
});
await utils.copyDir(`${__dirname}/../ReactNativeClient/lib`, `${testBuildDir}/lib`);
await utils.copyDir(`${__dirname}/../ReactNativeClient/locales`, `${testBuildDir}/locales`);
await fs.mkdirp(`${testBuildDir}/data`);
},
};
gulp.task('build', tasks.build.fn);
gulp.task('buildTests', tasks.buildTests.fn);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,73 @@
var locales = {};
var stats = {};
locales['en_GB'] = require('./en_GB.json');
locales['ar'] = require('./ar.json');
locales['bg_BG'] = require('./bg_BG.json');
locales['bs_BA'] = require('./bs_BA.json');
locales['ca'] = require('./ca.json');
locales['cs_CZ'] = require('./cs_CZ.json');
locales['da_DK'] = require('./da_DK.json');
locales['de_DE'] = require('./de_DE.json');
locales['el_GR'] = require('./el_GR.json');
locales['en_US'] = require('./en_US.json');
locales['eo'] = require('./eo.json');
locales['es_ES'] = require('./es_ES.json');
locales['et_EE'] = require('./et_EE.json');
locales['eu'] = require('./eu.json');
locales['fa'] = require('./fa.json');
locales['fr_FR'] = require('./fr_FR.json');
locales['gl_ES'] = require('./gl_ES.json');
locales['hr_HR'] = require('./hr_HR.json');
locales['it_IT'] = require('./it_IT.json');
locales['ja_JP'] = require('./ja_JP.json');
locales['ko'] = require('./ko.json');
locales['nb_NO'] = require('./nb_NO.json');
locales['nl_BE'] = require('./nl_BE.json');
locales['nl_NL'] = require('./nl_NL.json');
locales['pl_PL'] = require('./pl_PL.json');
locales['pt_BR'] = require('./pt_BR.json');
locales['pt_PT'] = require('./pt_PT.json');
locales['ro'] = require('./ro.json');
locales['ru_RU'] = require('./ru_RU.json');
locales['sl_SI'] = require('./sl_SI.json');
locales['sr_RS'] = require('./sr_RS.json');
locales['sv'] = require('./sv.json');
locales['tr_TR'] = require('./tr_TR.json');
locales['zh_CN'] = require('./zh_CN.json');
locales['zh_TW'] = require('./zh_TW.json');
stats['ar'] = { 'percentDone': 94 };
stats['eu'] = { 'percentDone': 40 };
stats['bs_BA'] = { 'percentDone': 88 };
stats['bg_BG'] = { 'percentDone': 79 };
stats['ca'] = { 'percentDone': 62 };
stats['hr_HR'] = { 'percentDone': 33 };
stats['cs_CZ'] = { 'percentDone': 97 };
stats['da_DK'] = { 'percentDone': 87 };
stats['de_DE'] = { 'percentDone': 98 };
stats['et_EE'] = { 'percentDone': 78 };
stats['en_GB'] = { 'percentDone': 100 };
stats['en_US'] = { 'percentDone': 100 };
stats['es_ES'] = { 'percentDone': 97 };
stats['eo'] = { 'percentDone': 45 };
stats['fr_FR'] = { 'percentDone': 98 };
stats['gl_ES'] = { 'percentDone': 51 };
stats['it_IT'] = { 'percentDone': 93 };
stats['nl_NL'] = { 'percentDone': 89 };
stats['nl_BE'] = { 'percentDone': 40 };
stats['nb_NO'] = { 'percentDone': 91 };
stats['fa'] = { 'percentDone': 39 };
stats['pl_PL'] = { 'percentDone': 77 };
stats['pt_PT'] = { 'percentDone': 93 };
stats['pt_BR'] = { 'percentDone': 90 };
stats['ro'] = { 'percentDone': 40 };
stats['sl_SI'] = { 'percentDone': 51 };
stats['sv'] = { 'percentDone': 69 };
stats['tr_TR'] = { 'percentDone': 94 };
stats['el_GR'] = { 'percentDone': 96 };
stats['ru_RU'] = { 'percentDone': 98 };
stats['sr_RS'] = { 'percentDone': 77 };
stats['zh_CN'] = { 'percentDone': 97 };
stats['zh_TW'] = { 'percentDone': 94 };
stats['ja_JP'] = { 'percentDone': 98 };
stats['ko'] = { 'percentDone': 92 };
module.exports = { locales: locales, stats: stats };

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

3297
CliClient/locales/et_EE.po Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -3,6 +3,12 @@
"description": "Joplin CLI Client",
"license": "MIT",
"author": "Laurent Cozic",
"scripts": {
"test": "gulp buildTests -L && jasmine --config=tests/support/jasmine.json",
"postinstall": "patch-package && npm run build",
"build": "gulp build",
"start": "gulp build -L && node 'build/main.js' --profile ~/Temp/TestNotes2 --stack-trace-enabled --log-level debug --env dev"
},
"bugs": {
"url": "https://github.com/laurent22/joplin/issues"
},
@@ -32,6 +38,7 @@
"app-module-path": "^2.2.0",
"async-mutex": "^0.1.3",
"base-64": "^0.1.0",
"base64-stream": "^1.0.0",
"clean-html": "^1.5.0",
"compare-version": "^0.1.2",
"diacritics": "^1.3.0",
@@ -39,31 +46,50 @@
"es6-promise-pool": "^2.5.0",
"file-uri-to-path": "^1.0.0",
"follow-redirects": "^1.2.4",
"font-awesome-filetypes": "^2.1.0",
"form-data": "^2.1.4",
"fs-extra": "^5.0.0",
"highlight.js": "^9.17.1",
"html-entities": "^1.2.1",
"html-minifier": "^3.5.15",
"image-data-uri": "^2.0.0",
"image-type": "^3.0.0",
"joplin-turndown": "^4.0.19",
"joplin-turndown-plugin-gfm": "^1.0.12",
"json-stringify-safe": "^5.0.1",
"jssha": "^2.3.0",
"katex": "^0.11.1",
"levenshtein": "^1.0.5",
"markdown-it": "^10.0.0",
"markdown-it-abbr": "^1.0.4",
"markdown-it-anchor": "^5.2.5",
"markdown-it-deflist": "^2.0.3",
"markdown-it-emoji": "^1.4.0",
"markdown-it-expand-tabs": "^1.0.13",
"markdown-it-footnote": "^3.0.2",
"markdown-it-ins": "^3.0.0",
"markdown-it-mark": "^3.0.0",
"markdown-it-multimd-table": "^4.0.1",
"markdown-it-sub": "^1.0.0",
"markdown-it-sup": "^1.0.0",
"markdown-it-toc-done-right": "^4.1.0",
"md5": "^2.2.1",
"md5-file": "^4.0.0",
"memory-cache": "^0.2.0",
"mime": "^2.0.3",
"moment": "^2.24.0",
"multiparty": "^4.2.1",
"node-emoji": "^1.8.1",
"node-fetch": "^1.7.1",
"node-persist": "^2.1.0",
"patch-package": "^6.2.0",
"promise": "^7.1.1",
"proper-lockfile": "^2.0.1",
"query-string": "4.3.4",
"read-chunk": "^2.1.0",
"redux": "^3.7.2",
"request": "^2.88.0",
"sax": "^1.2.2",
"sax": "^1.2.4",
"server-destroy": "^1.0.1",
"sharp": "^0.23.2",
"sprintf-js": "^1.1.1",
@@ -77,33 +103,17 @@
"terminal-kit": "^1.30.0",
"tkwidgets": "^0.5.26",
"url-parse": "^1.4.7",
"uslug": "^1.0.4",
"uuid": "^3.0.1",
"valid-url": "^1.0.9",
"word-wrap": "^1.2.3",
"xml2js": "^0.4.19",
"yargs-parser": "^7.0.0",
"font-awesome-filetypes": "^2.1.0",
"highlight.js": "^9.17.1",
"json-stringify-safe": "^5.0.1",
"katex": "^0.11.1",
"markdown-it-abbr": "^1.0.4",
"markdown-it-anchor": "^5.2.5",
"markdown-it-deflist": "^2.0.3",
"markdown-it-emoji": "^1.4.0",
"markdown-it-expand-tabs": "^1.0.13",
"markdown-it-footnote": "^3.0.2",
"markdown-it-ins": "^3.0.0",
"markdown-it-mark": "^3.0.0",
"markdown-it-multimd-table": "^4.0.1",
"markdown-it-sub": "^1.0.0",
"markdown-it-sup": "^1.0.0",
"markdown-it-toc-done-right": "^4.1.0",
"uslug": "^1.0.4"
"node-html-parser": "^1.2.4"
},
"devDependencies": {
"jasmine": "^3.5.0"
},
"scripts": {
"test": "jasmine"
"gulp": "^4.0.2",
"jasmine": "^3.5.0",
"temp": "^0.9.1"
}
}

View File

@@ -0,0 +1,18 @@
diff --git a/node_modules/sax/lib/sax.js b/node_modules/sax/lib/sax.js
index 795d607..ccad5d8 100644
--- a/node_modules/sax/lib/sax.js
+++ b/node_modules/sax/lib/sax.js
@@ -1040,6 +1040,13 @@
parser.textNode += c
}
}
+
+ // Sax is kind of buggy when handling large text node. It has a function to check that
+ // the buffer doesn't run out of space but it doesn't seem to call it for text node.
+ // The result is that parser.textNode reaches 1GB and then the app crashes. So here
+ // we call checkBufferLength to make sure the buffer is cleared and the "text" event
+ // emitted so that the caller can handle memory properly.
+ checkBufferLength(parser);
continue
case S.SCRIPT:

View File

@@ -1,21 +0,0 @@
#!/bin/bash
echo "Deprecated! Use `node Tools/release-cli.js`"
exit 1
set -e
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR"
npm version patch
touch "$SCRIPT_DIR/app/main.js"
bash $SCRIPT_DIR/build.sh
cp "$SCRIPT_DIR/package.json" build/
cp "$SCRIPT_DIR/../README.md" build/
cd "$SCRIPT_DIR/build"
npm publish
NEW_VERSION=$(cat package.json | jq -r .version)
git add -A
git commit -m "CLI v$NEW_VERSION"
git tag "cli-v$NEW_VERSION"
git push && git push --tags

View File

@@ -1,6 +0,0 @@
#!/bin/bash
set -e
CLIENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
bash "$CLIENT_DIR/build.sh" && node "$CLIENT_DIR/build/main.js" --profile ~/Temp/TestNotes2 --stack-trace-enabled --log-level debug --env dev "$@"
# bash "$CLIENT_DIR/build.sh" && node "$CLIENT_DIR/build/main.js" --profile ~/.config/joplin --stack-trace-enabled --log-level debug --env dev "$@"

View File

@@ -1,24 +0,0 @@
#!/bin/bash
START_DIR="$(pwd)"
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
BUILD_DIR="$ROOT_DIR/tests-build"
FILTER="$1"
rsync -a --exclude "node_modules/" "$ROOT_DIR/tests/" "$BUILD_DIR/"
rsync -a "$ROOT_DIR/../ReactNativeClient/lib/" "$BUILD_DIR/lib/"
rsync -a "$ROOT_DIR/../ReactNativeClient/locales/" "$BUILD_DIR/locales/"
mkdir -p "$BUILD_DIR/data"
function finish {
cd "$START_DIR"
}
trap finish EXIT
cd "$ROOT_DIR"
if [[ $FILTER != "" ]]; then
npx jasmine --config=tests/support/jasmine.json --filter="$FILTER"
else
npx jasmine --config=tests/support/jasmine.json
fi

View File

@@ -0,0 +1,79 @@
/* eslint-disable no-unused-vars */
require('app-module-path').addPath(__dirname);
const os = require('os');
const { time } = require('lib/time-utils.js');
const { filename } = require('lib/path-utils.js');
const { asyncTest, fileContentEqual, setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync } = require('test-utils.js');
const Folder = require('lib/models/Folder.js');
const Note = require('lib/models/Note.js');
const BaseModel = require('lib/BaseModel.js');
const { shim } = require('lib/shim');
const HtmlToHtml = require('lib/joplin-renderer/HtmlToHtml');
const { enexXmlToMd } = require('lib/import-enex-md-gen.js');
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60 * 60 * 1000; // Can run for a while since everything is in the same test unit
process.on('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
});
describe('HtmlToHtml', function() {
beforeEach(async (done) => {
await setupDatabaseAndSynchronizer(1);
await switchClient(1);
done();
});
it('should convert from Html to Html', asyncTest(async () => {
const basePath = `${__dirname}/html_to_html`;
const files = await shim.fsDriver().readDirStats(basePath);
const htmlToHtml = new HtmlToHtml();
for (let i = 0; i < files.length; i++) {
const htmlSourceFilename = files[i].path;
if (htmlSourceFilename.indexOf('.src.html') < 0) continue;
const htmlSourceFilePath = `${basePath}/${htmlSourceFilename}`;
const htmlDestPath = `${basePath}/${filename(filename(htmlSourceFilePath))}.dest.html`;
// if (htmlSourceFilename !== 'table_with_header.html') continue;
const htmlToHtmlOptions = {
bodyOnly: true,
};
const sourceHtml = await shim.fsDriver().readFile(htmlSourceFilePath);
let expectedHtml = await shim.fsDriver().readFile(htmlDestPath);
const result = await htmlToHtml.render(sourceHtml, null, htmlToHtmlOptions);
let actualHtml = result.html;
if (os.EOL === '\r\n') {
expectedHtml = expectedHtml.replace(/\r\n/g, '\n');
actualHtml = actualHtml.replace(/\r\n/g, '\n');
}
if (actualHtml !== expectedHtml) {
console.info('');
console.info(`Error converting file: ${htmlSourceFilename}`);
console.info('--------------------------------- Got:');
console.info(actualHtml);
console.info('--------------------------------- Raw:');
console.info(actualHtml.split('\n'));
console.info('--------------------------------- Expected:');
console.info(expectedHtml.split('\n'));
console.info('--------------------------------------------');
console.info('');
expect(false).toBe(true);
// return;
} else {
expect(true).toBe(true);
}
}
}));
});

View File

@@ -0,0 +1,79 @@
/* eslint-disable no-unused-vars */
require('app-module-path').addPath(__dirname);
const os = require('os');
const { time } = require('lib/time-utils.js');
const { filename } = require('lib/path-utils.js');
const { asyncTest, fileContentEqual, setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync } = require('test-utils.js');
const Folder = require('lib/models/Folder.js');
const Note = require('lib/models/Note.js');
const BaseModel = require('lib/BaseModel.js');
const { shim } = require('lib/shim');
const MdToHtml = require('lib/joplin-renderer/MdToHtml');
const { enexXmlToMd } = require('lib/import-enex-md-gen.js');
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60 * 60 * 1000; // Can run for a while since everything is in the same test unit
process.on('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
});
describe('MdToHtml', function() {
beforeEach(async (done) => {
await setupDatabaseAndSynchronizer(1);
await switchClient(1);
done();
});
it('should convert from Markdown to Html', asyncTest(async () => {
const basePath = `${__dirname}/md_to_html`;
const files = await shim.fsDriver().readDirStats(basePath);
const mdToHtml = new MdToHtml();
for (let i = 0; i < files.length; i++) {
const mdFilename = files[i].path;
if (mdFilename.indexOf('.md') < 0) continue;
const mdFilePath = `${basePath}/${mdFilename}`;
const htmlPath = `${basePath}/${filename(mdFilePath)}.html`;
// if (mdFilename !== 'table_with_header.html') continue;
const mdToHtmlOptions = {
bodyOnly: true,
};
const markdown = await shim.fsDriver().readFile(mdFilePath);
let expectedHtml = await shim.fsDriver().readFile(htmlPath);
const result = await mdToHtml.render(markdown, null, mdToHtmlOptions);
let actualHtml = result.html;
if (os.EOL === '\r\n') {
expectedHtml = expectedHtml.replace(/\r\n/g, '\n');
actualHtml = actualHtml.replace(/\r\n/g, '\n');
}
if (actualHtml !== expectedHtml) {
console.info('');
console.info(`Error converting file: ${mdFilename}`);
console.info('--------------------------------- Got:');
console.info(actualHtml);
console.info('--------------------------------- Raw:');
console.info(actualHtml.split('\n'));
console.info('--------------------------------- Expected:');
console.info(expectedHtml.split('\n'));
console.info('--------------------------------------------');
console.info('');
expect(false).toBe(true);
// return;
} else {
expect(true).toBe(true);
}
}
}));
});

View File

@@ -20,6 +20,7 @@ describe('htmlUtils', function() {
['<img src="http://test.com/img.png"/>', ['http://test.com/img.png']],
['<img src="http://test.com/img.png"/> <img src="http://test.com/img2.png"/>', ['http://test.com/img.png', 'http://test.com/img2.png']],
['<img src="http://test.com/img.png" alt="testing" >', ['http://test.com/img.png']],
['<img src=""/> <img src="http://test.com/img2.png"/>', ['http://test.com/img2.png']],
['nothing here', []],
['', []],
];

View File

@@ -0,0 +1,2 @@
<img src onerror="" />
<img src onerror="" />

View File

@@ -0,0 +1,3 @@
<img src="" onerror="alert('ohno')"/>
<img src=""
onerror="alert('ohno')"/>

View File

@@ -0,0 +1,93 @@
/* eslint-disable no-unused-vars */
require('app-module-path').addPath(__dirname);
const { setupDatabaseAndSynchronizer, switchClient, asyncTest, id, ids, sortedIds, at, createNTestFolders, createNTestNotes, createNTestTags, TestApp } = require('test-utils.js');
const Setting = require('lib/models/Setting.js');
const Folder = require('lib/models/Folder.js');
const Note = require('lib/models/Note.js');
const Tag = require('lib/models/Tag.js');
const { time } = require('lib/time-utils.js');
const { ALL_NOTES_FILTER_ID } = require('lib/reserved-ids.js');
//
// The integration tests are to test the integration of the core system, comprising the
// base application with middleware, reducer and models in response to dispatched events.
//
// The general strategy for each integration test is:
// - create a starting application state,
// - inject the event to be tested
// - check the resulting application state
//
// Important: sleep must be used after TestApp dispatch to allow the async processing
// to complete
//
// use this until Javascript arr.flat() function works in Travis
function flatten(arr) {
return (arr.reduce((acc, val) => acc.concat(val), []));
}
let testApp = null;
describe('integration_ShowAllNotes', function() {
beforeEach(async (done) => {
testApp = new TestApp();
await testApp.start(['--no-welcome']);
done();
});
afterEach(async (done) => {
if (testApp !== null) await testApp.destroy();
testApp = null;
done();
});
it('should show all notes', asyncTest(async () => {
// setup
let folders = await createNTestFolders(3);
Folder.moveToFolder(id(folders[2]), id(folders[1])); // subfolder
await time.msleep(100);
let notes0 = await createNTestNotes(3, folders[0]);
let notes1 = await createNTestNotes(3, folders[1]);
let notes2 = await createNTestNotes(3, folders[2]);
// TEST ACTION: View all-notes
testApp.dispatch({ type: 'SMART_FILTER_SELECT', id: ALL_NOTES_FILTER_ID });
await time.msleep(100);
// check: all the notes are shown
let state = testApp.store().getState();
expect(state.notesParentType).toEqual('SmartFilter');
expect(state.selectedSmartFilterId).toEqual(ALL_NOTES_FILTER_ID);
expect(sortedIds(state.notes)).toEqual(sortedIds(notes0.concat(notes1).concat(notes2)));
}));
it('should show retain note selection when going from a folder to all-notes', asyncTest(async () => {
// setup
let folders = await createNTestFolders(2);
let notes0 = await createNTestNotes(3, folders[0]);
let notes1 = await createNTestNotes(3, folders[1]);
testApp.dispatch({ type: 'FOLDER_SELECT', id: id(folders[1]) });
await time.msleep(100);
testApp.dispatch({ type: 'NOTE_SELECT', id: id(notes1[1]) });
await time.msleep(100);
// check the state is set up as expected
let state = testApp.store().getState();
expect(state.notesParentType).toEqual('Folder');
expect(state.selectedFolderId).toEqual(id(folders[1]));
expect(sortedIds(state.notes)).toEqual(sortedIds(notes1));
expect(state.selectedNoteIds).toEqual(ids([notes1[1]]));
// TEST ACTION: View all-notes
testApp.dispatch({ type: 'SMART_FILTER_SELECT', id: ALL_NOTES_FILTER_ID });
await time.msleep(100);
// check: all the notes are shown
state = testApp.store().getState();
expect(state.notesParentType).toEqual('SmartFilter');
expect(state.selectedSmartFilterId).toEqual(ALL_NOTES_FILTER_ID);
expect(sortedIds(state.notes)).toEqual(sortedIds(notes0.concat(notes1)));
expect(state.selectedNoteIds).toEqual(ids([notes1[1]]));
}));
});

Some files were not shown because too many files have changed in this diff Show More