with app to create multiple instance of app and break settings.
Revert "Mobile: Add startup screen to show progress of db migration"
This reverts commit 569355a318.
add swapLine(Up/Down)
have `o` use the more complex list indent
enable sync initializing from vim (and maybe emacs)
split keymap stuff into it's own file
This patch includes the translation of missing strings, the improvement of the existing translation
Signed-off-by: Ji-Hyeon Gim <potatogim@potatogim.net>
Issue https://github.com/laurent22/joplin/issues/3711
This patch replaces the 'isLinux' check by a more restrictive version
which fixes the false positive in BSD systems. This was causing Joplin
not to load due to the lack of X11 in headless mode.
* Doc: Fixed a typo in a markdown syntax of a link
* Doc: added an example of a checked checkbox
and added how the checkboxes would get translated when turned to HTML
* Doc: added a picture of a rendered markdown checkbox in Joplin
Previously we'd use the remove-markdown package to create the note
preview however this function would freeze on certain notes, and was
probably unsafe as it used regex to parse Markdown. Replaced this in
favour of Markdown-it along with htmlparser2 to strip all markup from a
note.
The implementation uses / symbol as a nesting separator. I.e. tag/subtag is a nested tag, where tag is the parent tag and subtag is its child. Creating a tag named tag/subtag/subsubtag creates three tags, one for each level. The tags are associated using parent_id field.
In the app, viewing notes with a tag will also show all notes that are associated with any of the tag's descendant tags (same for the note count). Deleting a tag will also delete all its descendant tags.
In the desktop app the tags are shown nested just like the notebooks.
The goal is to allow locking a sync target so that maintenance
operations, such as upgrading the target to a more efficient format,
can be done. For now, only the lock mechanism is in place, as a way to
evaluate it, and to see if it can cause any issue.
The goal is to make the command system more modular, so each command can
be defined as a single object that includes a declaration (name, label,
etc.) and a runtime (to execute the command, test if it should be
enabled, etc.)
Utility methods are provided to convert a command to a menu item or a
toolbar button, thus reducing duplicated and boiler plate code across the
codebase (often the menu item logic was duplicated in the toolbar
button logic and vice versa).
The goal is to make it easier to add new commands (and associated menu
item and toolbar buttons) and to call them from
anywhere. This is also useful for plugins, which can also easily define
new commands.
Could also allow creating a command palette.
* Manually refresh codemirror whenever the parent div size changes
* Set editor width through style rather than adding an extra property
* use Memo for editorStyle
- previously getLineSpan was included line text as a token (dumb
oversight)
- the regex was updated to include a space after a OL element (was
missing for some reason)
This reverts commit f432734338.
This new package has its own glitches and doesn't look good
when button labels are too large. So reverting to the less
glitchy package.
Joplin has 4 panes: side bar, notes list, code and view. Change joplin in a way that these parts can be different windows. Thus it is possible to put these windows on different screens for more space and better overview.
Reverts 468261906a
Disabling the toolbar when the editor is not in focus means it
was disabled when trying to click on one of the button, because
the editor loses focus before the click event is processed.
* Add support for editable resources
* Fixed handling of resource paths
* Add delay before saving resource
* Delete temp files and stop watching when switching notes
* Handle sync when resource has been edited
* Handle resource conflicts
* Refactoring and handle conflicts from edit watcher
* Added test unit for conflict handling when deleting resource
* Trying to fix Travis-ci test units
* Fixed typo
* Update TinyMCE.tsx
* Update AsyncActionQueue.ts
* Added German translations
- Added missing translations
- Motified a few translations
- There is the question whether to translate the English "theme" to a
German word or keep its English version.
* Adjusted translation
* Translation : translate to bahasa indonesia
* fix(translation) : change to one letter
* fix(translation) : consistency N -> T
* rm(unused) : remove unused files
* When attaching an image/resource insert it at the current cursor position
* Correct argument order
* Address code review comments
* Another code review comment
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
* Fix quick actions
* Receive quick actions when the app is cold-launched
* Force side menu close before creating quick note
* Fix react warning: Can't perform a react state update on an unmounted component
The warning was:
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
in NoteScreenComponent (created by Connect(NoteScreenComponent))
in Connect(NoteScreenComponent) (at app-nav.js:74)
* Fix auto title generation for quick notes.
The previous version created a new provisional note but then while handling NAV_BACK at reduxSharedMiddleware:35 the list of provisional note ids was cleared so when NoteScreenComponent was being mounted later the note was no longer considered provisional and Joplin would not generate the note title from its contents.
* Check for quick action data to be present before processing.
For some reason sometimes it gets called with null.
* Disable sending serialized data over the react-native bridge when attaching image or file
* Remove noData opt from DocumentPicker as it's only relevant for ImagePicker
Many users unfortunately don't care about the template asking not post support queries here, so we'll now accept questions but we'll just ignore them and let stale bot take care of them.
Also removed the "invalid" template because I believe it make people try to game the system by posting instead a bug report for their support or feature request. At least now we can hope there will less off-topic issues in the bug label.
Squashed commit of the following:
commit 5fde36f5c3fa7c7efbce6d81f48fe841c823e88c
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 18:43:20 2020 +0100
Cannot fix for now
commit 251284db3c8b7da6db83f3e06fd19bfdc8b8dd3f
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 18:31:08 2020 +0100
Fixed print to multiple PDFs logic
commit 00d9557996fb984b400fe650594150ae2681e03f
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 17:49:20 2020 +0100
Fixed local search in TinyMCE
commit 46778bf0a79f3bba9ddbc27389fadce4f8944507
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 17:37:31 2020 +0100
Restored note toolbar buttons
commit 3e623c98f0a1cf08bf7d0136f0c8982c5e1ddcd8
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 12:30:57 2020 +0100
Various fixes and moved note toolbar to left of title
commit 790262fe9df5b08d4a619e5244d2906047b39855
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 11:21:11 2020 +0100
Clean up
commit cea30f42e69014ecabda6fa5083199a1ba7b7510
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 11:08:23 2020 +0100
Fixed note loading in TinyMCE
As the project is active, 45 days is enough time to label the issue (and then it won't be closed). If it has not been labelled within that time it's probably not important enough to keep it open, or we don't have resources to deal with it.
If user home directory is configured to anything other than `/home/${USER}`, `Exec` command in desktop entry points to non-existing file, and desktop entry is not considered valid, thus does not appear in list of application. Standard way to get home directory is using `${HOME}` environment variable. This could also be possible root cause of https://discourse.joplinapp.org/t/joplin-not-installing-completely/5669/2
* Working on an aritim-dark theme, very WIP still
* Update aritim.js
* Added new theme "Aritim-Dark"
* removing aritim-dark "brace" theme for now
* Updating style with some changes
* Reset branch back to the original upstream state, to create a different pull-request for moving all themes outside
* Reset branch back to the original upstream state
* Moved all themes out into their own .js theme files
* Updating master to use the seperated themes stuff
* Moved themes into their own const
* Removed switch case for themes and simplified it. Thanks Laurent for the help!
* Adding Aritim-Dark to theme options
* Working on an aritim-dark theme, very WIP still
* Update aritim.js
* Added new theme "Aritim-Dark"
* removing aritim-dark "brace" theme for now
* Updating style with some changes
* Reset branch back to the original upstream state, to create a different pull-request for moving all themes outside
* Reset branch back to the original upstream state
* Moved all themes out into their own .js theme files
* Updating master to use the seperated themes stuff
* Moved themes into their own const
* Removed switch case for themes and simplified it. Thanks Laurent for the help!
* Translation: Update ko.po
* Update README.md
Both the words ‘한국어’ and ‘한국말’ are composed of two meaning blocks : Korean + language.
어, which can be written in the Chinese character 語, means “language”, and 말, which is a native Korean word, also means “language”. So basically 한국어 and 한국말 are the same meaning, but I’d say 한국어 is a little more formal word while 한국말 is a more colloquial word.
‘어’ can be found in many other language names, but ‘말’ is not so commonly used other than in the word ‘한국말’ or ‘우리말(uri mal - ‘our language’, which is a word that Korean people use to mean ‘Korean’).
Here are some examples:
English = 영어
Chinese = 중국어
Japanese = 일본어
Arabic = 아랍어
Spanish = 스페인어
French = 프랑스어
Latin = 라틴어
Russian = 러시아어
* change incorect word
* Revert "Update README.md"
This reverts commit 88199a40df.
* Add friendly default filenames to export options
* remove extension from safefilename call
* Load parent folder for all exports
* convert foldername and filename to friendly versions separatly
* Add null guards to the filename export
Make space after '"tag_name":' optional, to avoid the whole script failing without further notice.
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
* Cleaning up the install script
* New `--force` option always downloads the latest version
* New `--notes` option shows the release notes
* Actually print the version installed at the end
* Show download progress, but not extra garbage
* Blue logo
* refactor and cleanup
* Handle space, but no args
* md importer: decode uri encoded links to cover case of special chars in linked image names
* md importer: temp debug logs for linux test pipeline
* md importer: more temp debug logs
* md importer: tests, add special char image name on linux
* md importer: tests, use const not let
* md importer: remove debug logs
* The basic editor is working! No list continuation still though
* List continuation is working! Now to delete when entering again and not typing on line + handle ordered lists
* Supports checkboxes + attempted at setting font
* Editor font works now; now need to fix the delete (look at past state)
* Fix deletion problem
* Add ordered list handler
* Add comments
* Extract insertListLine
* End lists on enter for empty bullets
* Add MarkdownView (renders badly though)
* Save edited text from MarkdownEditor
* Cleanup
* Refactor react-native-markdown-editor/
* Rename react-native-markdown-editor/ => MarkdownEditor/
* Cleanup
* Fix preview styles; still need to fix checkbox problem
* Fix keyboard padding
* Change name back to #body_changeText
* Incorporate PR feedback from @laurent22
* wip: Move MarkdownEditor/ from ReactNativeClient/lib/ to ReactNativeClient/
* Move MarkdownEditor/ from ReactNativeClient/lib/ to ReactNativeClient/
* Remove log statement
* Focus TextInput in MarkdownEditor from grandparent
* Make eslint happy
* Extract textInputRefName to shared variable
* Remove accidental #setState
* Cleanup
* Cleanup
* Run linter
* Cleanup
* Update button order
* Improve styles for config descriptions
* Allow descriptions to be added to BOOL type Setting configs
* Add editorBeta Setting
* Move FailSafe details to description text
* Update descriptionText styles
* Put the editor under the beta flag toggle
* Incorporate PR feedback from @laurent22
* Refactor Markdown editor focusing
* Cleanup
* Reorder MarkdownEditor formats
* Make applyListFormat behavior more intuitive
* Add comment
* Show MarkdownEditor with preview by default
* Show preview by default, then hide on typing
* Fix MarkdownEditor selection bug
* Cleanup
* Update Markdown button styles
* Make Markdown button colors theme-conscious
* Fix merge conflict resolution mistake
* Fix broken import
* Delete package-lock.json
* Reset package-lock.json
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
* Turkish translations updated
* fullpaths updated
* Language string now respects the original one
* Line endings fixed
* Mysterious new lines cleaned
* Revert Readme
* Old translations added back
Adjusted and added some Chinese simplified translation text
I like Joplin very much and hope to do my best
------------
调整和新增了部分中文简体翻译文本
非常喜欢Joplin,希望能尽绵薄之力
Previously it was possible to open Joplin by clicking on the tray icon.
This functionality is no longer available due to changes in Electron.
The following key combination will show or hide Joplin in the current workspace:
- macOS: `Cmd+Opt+J`
- Linux, Windows: `Ctrl+Alt+J`
- replaced Development by Features in `4. Come up with project that you're interested in and discuss it in [Features category](https://discourse.joplinapp.org/c/features)`
-
* finished writing first script version
* added preinstall script
* removed white space and platform if statements
* remove error log
* removed install function
* corrected commands
* changed ls to list
* API: Fix updation of tags when updating a note
* Add test for fix updation of tags
* Rewrite unit test and change variable name
* Use consistent variables and function calls
* Use default function call and change variable
* Handle case when tags is empty string
* Restructure test cases and improve tags check
* Update documentation
* add button to About box to copy Joplin's information to the clipboard
On certain OS it is not possible to copy the text in the About window.
This change allows to copy that info to the Clipboard.
Due to some shortfalls in Electron, it is not possible to set `defaultId` and `cancelId` to 0.
(Actually one can set them to 0, but the result is not what one would expect.)
Thus I had to move the default `OK` button to the left.
I also added a hack to position the `OK` button approximately in the middle of the dialog box (if the copyLabel is not longer than 14 characters).
* remove hack to position button
* add a new bridge function showMessageBox
The function returns the index of the clicked button.
* we don't need the first 3 lines (product name and copyright)
* Ensure after a note is deleted the next note is given focus.
* Fix handling of focus when navigating away from multiple selections.
* Refocus after note deletion.
* Mintor refactor.
* Clean up.
* Remove accidental white space change.
* Remove accidental white space change.
* Trying to get TuiEditor to work
* Tests with TinyMCE
* Fixed build
* Improved asset loading
* Added support for Joplin source blocks
* Added support for Joplin source blocks
* Better integration
* Make sure noteDidUpdate event is always dispatched at the right time
* Minor tweaks
* Fixed tests
* Add support for checkboxes
* Minor refactoring
* Added support for file attachments
* Add support for fenced code blocks
* Fix new line issue on code block
* Added support for Fountain scripts
* Refactoring
* Better handling of saving and loading notes
* Fix saving and loading ntoes
* Handle multi-note selection and fixed new note creation issue
* Fixed newline issue in test
* Fixed newline issue in test
* Improve saving and loading
* Improve saving and loading note
* Removed undeeded prop
* Fixed issue when new note being saved is incorrectly reloaded
* Refactoring and improve saving of note when unmounting component
* Fixed TypeScript error
* Small changes
* Improved further handling of saving and loading notes
* Handle provisional notes and fixed various saving and loading bugs
* Adding back support for HTML notes
* Added support for HTML notes
* Better handling of editable nodes
* Preserve image HTML tag when the size is set
* Handle switching between editor when the note has note finished saving
* Handle templates
* Handle templates
* Handle loading note that is being saved
* Handle note being reloaded via sync
* Clean up
* Clean up and improved logging
* Fixed TS error
* Fixed a few issues
* Fixed test
* Logging
* Various improvements
* Add blockquote support
* Moved CWD operation to shim
* Removed deleted files
* Added support for Joplin commands
* 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>
* 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
* 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>
* 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>
* 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
* 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>
* 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>
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
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)
* 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
* 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
* 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.
* 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>
* 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.
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.
Previously a title with brackets was escaped incorrectly. The brackets were replaced by underscores.
The following title `title [square] (round)` looked like this:
[title _square_ _round_](:/c54794f53e5e4b1aa558699e255d5f95)
Now it looks like this:
[title \[square\] (round)](:/c54794f53e5e4b1aa558699e255d5f95)
fixes#2085
* Add renderer plugin to handle tabs in code blocks.
* Add plugin to renderer package list.
* Attempt to fix unrelated linter issues.
* Fix unrelated linter problems.
The problems exist on master prior to the branch.
* Fix more inherited linter problems.
* Do not show "failed to print" warning dialog after cancelling print.
* Add reason to error string.
* Reform message string.
* Ensure OK button is displayed on error dialog.
* Support multi-line selections for creating ordered lists, unordered lists, checkboxes.
* Modify to maintain previous behaviour wrt insertion of new line if not on empty line.
* Review update: rename variables (or eliminate them).
* Review update: variable naming.
* Add colour hints to the local search bar.
* Refactor.
* Refactor.
* Fix annoying flicker when entering first query character.
* Refactor in response to review comments.
Cache the information at the source, remove state updates during render.
* Move cached data into searchbar component.
* Refactor.
* Show number of matches and disable prev/next buttons when no matches.
* Improve no matches message.
* More note searchbar enhancements.
Indicate selected match
Fade search result text
Ctrl-F selects input content upon repeat
* Update following review.
Modify message to remove need for translation.
Flatten properties structure.
* Made tweaks to avoid having two queries in the state
* Cache searchbox background colour to stop compoenent flashing.
* Update NoteSearchBar.jsx
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
* Emphasise note title and de-emphasise note toolbar.
* Remove redundant titles from pre-packaged notes.
* Revert additions to theme.
* Revert de-emphasis of note toolbar icons.
* Revert bolding of title.
* Undo change to theme
* Use h1 style as basis for title editor style.
Times a factor to make up for html scaling.
* Use text style as basis for editor title style, scaled to match html h1.
* Add version info to profile error message. Add profile version to desktop About Box.
* Add profile error to log.
* Use shim to retrive version number.
* Refactor to use registry instead of BaseModel to get database.
* Remove call to logger.
* Improve code readability.
- version attribute inside `joplin.desktop` is `X-AppImage-Version` and not `X-AppImage-BuildId`
- format is `X-AppImage-Version=X.Y.Z" so we need to change `cut` parameters (split on '=' and get 2nd value)
* Remove personal e-mail address
* Remove personal e-mail address
* Remove personal e-mail address
* Revert "Remove personal e-mail address"
This reverts commit 7a66c4a5b6.
* Remove space
* Remove space
* Edits build instructions to avoid confusion
When i was trying to build the Electron Project, i was a bit confused about which commands to follow for building in the projects on my OS (Windows).
there was two header **Building the Electron application** and **Building the Electron application for windows**, the former can lead a beginner to confusion because it seems to be "a generalized statement", unlike the latter that was more specific. In order to improve the developers experience, i had to change the former heading to "Building the Electron application for Linux and macOS" to help them understand easily.
* Implemented advises from Reviewer (tessus) to further improve the documentation instructions for building the Electron App on Linux, macOS and Windows
- 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.
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
```
npm install
# Building the Electron application
Then you can test the various applications:
```
npm run copyLib
npm run tsc
cd ElectronClient/app
npm install
yarn dist
```
## Testing the desktop application
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`
cd ElectronClient
npm start
If you get a node-gyp related error you might need to manually install it: `npm install -g node-gyp`.
You can also run it under WSL 2. To do so, [follow these instructions](https://www.beekeeperstudio.io/blog/building-electron-windows-ubuntu-wsl2) to setup your environment.
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.
## Testing the Terminal application
That will create the executable file in the `dist` directory.
cd CliClient
npm start
From `/ElectronClient` you can also run `run.sh` to run the app for testing.
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 `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
> The application window doesn't open or is white
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.
> 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.
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
## 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:
```
npm run tsc
cd ReactNativeClient
npm install
react-native run-ios
# Or: react-native run-android
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 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 start` command, followed by your flags. For example:
npm 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.
In the current setup, `tsc` is executed from the root of the project, and will compile everything in CliClient, ElectronClient, etc. This is more convenient to have just one place to compile everything, and it also means there's only one watch command to run. However, one drawback is that TypeScript doesn't find types defined in node_modules folders in sub-directories. For example, if you install `immer` in ElectronClient, then try to use the package, TypeScript will report that it cannot find this module. In theory using `typeRoots`, it should be possible to make it find the right modules but it doesn't seem to work in this case. Currently the workaround is to install any such package at the root of the project. By doing so, TypeScript will find the type definitions and compilation will work. It's not ideal since the module is installed at the root even though it's not used, but for now that will work.
## Hot reload
If you'd like to auto-reload the desktop 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):
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 start"` each time. Here's what the workflow loop looks like in practice:
```
cd CliClient
npm install
./build.sh
```
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 start"`, and hit enter).
Run `run.sh` to start the application for testing.
# Updating Markdown renderer packages
The Markdown renderer is located under ReactNativeClient/lib/joplin-renderer. Whenever updating one of its dependencies, such as Mermaid or Katex, please run `npm run buildAssets` to make sure all assets such as fonts or CSS files are deployed correctly.
# Troubleshooting
Please read for the [Build Troubleshooting Document](https://github.com/laurent22/joplin/blob/master/readme/build_troubleshooting.md) for various tips on how to get the build working.
@@ -7,28 +7,27 @@ The [Joplin Forum](https://discourse.joplinapp.org/) is the community driven pla
File bugs in the [Github Issue Tracker](https://github.com/laurent22/joplin/issues?utf8=%E2%9C%93&q=is%3Aissue). Please follow these guidelines:
- Search existing issues first, make sure yours hasn't already been reported.
- Please follow the template.
- Consider [enabling debug mode](https://joplinapp.org/debugging/) so that you can provide as much details as possible when reporting the issue.
- Stay on topic, but describe the issue in detail so that others can reproduce it.
- Stay on topic, but describe the issue in detail so that others can **reproduce** it.
- **Provide a screenshot** if possible. A screenshot showing the problem is often more useful than a paragraph describing it.
- For web clipper bugs, **please provide the URL causing the issue**. Sometimes the clipper works in one page but not in another so it is important to know what URL has a problem.
# Feature requests
Please check that your request has not already been posted in the [Github Issue Tracker](https://github.com/laurent22/joplin/issues?utf8=%E2%9C%93&q=is%3Aissue). If it has, **up-voting the issue** increases the chances it'll be noticed and implemented in the future. "+1" comments are not tracked.
Feature requests **must be opened and discussed on the [forum](https://discourse.joplinapp.org/c/features)**. After they have been accepted, they can be added to the GitHub tracker.
As a general rule, suggestions to *improve Joplin* should be posted first in the [Joplin Forum](https://discourse.joplinapp.org/) for discussion.
Please check that your request has not already been posted on the forum or the [Github Issue Tracker](https://github.com/laurent22/joplin/issues?utf8=%E2%9C%93&q=is%3Aissue). If it has, **up-voting the issue or topic** increases the chances it'll be noticed and implemented in the future. "+1" comments are not tracked.
Avoid listing multiple requests in one report in the [Github Issue Tracker](https://github.com/laurent22/joplin/issues?utf8=%E2%9C%93&q=is%3Aissue). One issue per request makes it easier to track and discuss it.
Avoid listing multiple requests in one topic. One topic per request makes it easier to track and discuss it.
Finally, when submitting a pull request, don't forget to [test your code](#unit-tests).
Finally, when submitting a pull request, don't forget to [test your code](#automated-tests).
# Contribute to the project
## Contributing to Joplin's translation
# Contributing to Joplin's translation
Joplin is available in multiple languages thanks to the help of its users. You can help translate Joplin to your language or keep it up to date. Please read the documentation about [Localisation](https://joplinapp.org/#localisation).
## Contributing to Joplin's code
# Contributing to Joplin's code
If you want to start contributing to the project's code, please follow these guidelines before creating a pull request:
@@ -36,6 +35,8 @@ 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.
- Pull requests that make many changes using an automated tool, like for spell fixing, styling, etc. will not be accepted. An exception would be if the changes have been discussed in the forum and someone has agreed to review **and test** the pull request.
Building the apps is relatively easy - please [see the build instructions](https://github.com/laurent22/joplin/blob/master/BUILD.md) for more details.
@@ -43,52 +44,49 @@ Building the apps is relatively easy - please [see the build instructions](https
Coding style is enforced by a pre-commit hook that runs eslint. This hook is installed whenever running `npm install` on any of the application directory. If for some reason the pre-commit hook didn't get installed, you can manually install it by running `npm install` at the root of the repository.
## Unit tests
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).
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.
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.
## Automated tests
When submitting a pull request for a new feature or a bug fix, please add automated tests for your code whenever possible. Tests in Joplin are divided into **unit tests** and **feature tests**.
* **Unit tests** are used to test models, services or utility classes - they are relatively low level. Unit tests should be prefixed with the type of class that is being tested - for example "models_Folder" or "services_SearchEngine".
* **Feature tests** on the other hand are to test higher level functionalities such as interactions with the GUI and how they affect the underlying model. Often these tests would dispatch Redux actions, and inspect how the application state has been changed. The feature tests should be prefixed with "feature_", for example "feature_TagList". There's a good explanation on what qualifies as a feature test in [this post](https://github.com/laurent22/joplin/pull/2819#issuecomment-603502230).
The tests are under CliClient/tests. To get them running, you first need to build the CLI app:
cd CliClient
npm i
To run the test units, you must have an instance of the cli app running. In a first window navigate into `CliClient` and run:
```sh
./run.sh
npm install
cd CliClient
```
> If you get an error like `Error: Cannot find module '../locales/index.js'`, this means you must (a) rebuild translations or (b) take > them from one of the other apps. To do option b, you can run the following command to copy them from the `ReactNativeClient` directory:>
> If you get an error like `Error: Cannot find module './path/to/node_sqlite3.node'`, that likely means you need to install sqlite:
>
> ```sh
> npm install sqlite3 --build-from-source
> ```
Then run the tests in a second window. To run all the test units:
./run_test.sh
```sh
npm test
```
To run just one particular file:
./run_test.sh markdownUtils # Don't add the .js extension
```sh
npm 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 test -- --filter="should handle conflict"
```
## About abandoned pull requests
It happens that a pull request is started but not finished and despite our attempts to contact the contributor, we don’t hear from them again.
It happens that a pull request is started but not finished and despite our attempts to contact the contributor, we don't hear from them again.
In that case we will not merge the pull request, even if only small changes are missing. Our policy is simply to close the pull request. Why? Because an unfinished pull request essentially means giving us work and moving on. We would rather not encourage this behaviour.
Also, please note that since we have spent time reviewing the pull request and proposing solutions, we reserve the right to re-use that knowledge to create a new pull request, potentially based on your changes.
We’d much prefer that you complete the pull request though, so we’ll be sure to ping you a few times before that!
We'd much prefer that you complete the pull request though, so we'll be sure to ping you a few times before that!
@@ -15,6 +15,10 @@ class Command extends BaseCommand {
return'Build the API doc';
}
enabled(){
returnfalse;
}
createPropertiesTable(tableFields){
constheaders=[
{name:'name',label:'Name'},
@@ -52,7 +56,6 @@ class Command extends BaseCommand {
lines.push('# Joplin API');
lines.push('');
lines.push('When the Web Clipper service is enabled, Joplin exposes a [REST API](https://en.wikipedia.org/wiki/Representational_state_transfer) which allows third-party applications to access Joplin\'s data and to create, modify or delete notes, notebooks, resources or tags.');
lines.push('');
lines.push('In order to use it, you\'ll first need to find on which port the service is running. To do so, open the Web Clipper Options in Joplin and if the service is running it should tell you on which port. Normally it runs on port **41184**. If you want to find it programmatically, you may follow this kind of algorithm:');
lines.push('');
@@ -287,7 +290,7 @@ class Command extends BaseCommand {
lines.push('');
lines.push('### Creating a note with a specific ID');
lines.push('');
lines.push('When a new note is created, it is automatically assigned a new unique ID so **normally you do not need to set the ID**. However, if for some reason you want to set it, you can supply it as the `id` property. It needs to be a 32 characters long hexadecimal string. **Make sure it is unique**, for example by generating it using whatever GUID function is available in your programming language.');
lines.push('When a new note is created, it is automatically assigned a new unique ID so **normally you do not need to set the ID**. However, if for some reason you want to set it, you can supply it as the `id` property. It needs to be a **32 characters long string** in hexadecimal. **Make sure it is unique**, for example by generating it using whatever GUID function is available in your programming language.');
lines.push('');
lines.push(' curl --data \'{ "id": "00a87474082744c1a8515da6aa5792d2", "title": "My note with custom ID"}\' http://127.0.0.1:41184/notes');
return[['--format <format>',_('Destination format: %s',formats.join(', '))],['--note <note>',_('Exports only the given note.')],['--notebook <notebook>',_('Exports only the given notebook.')]];
@@ -19,19 +19,26 @@ class Command extends BaseCommand {
}
enabled(){
returnfalse;
returntrue;
}
options(){
return[['-n, --limit <num>',_('Displays only the first top <num> notes.')],['-s, --sort <field>',_('Sorts the item by <field> (eg. title, updated_time, created_time).')],['-r, --reverse',_('Reverses the sorting order.')],['-t, --type <type>',_('Displays only the items of the specific type(s). Can be `n` for notes, `t` for to-dos, or `nt` for notes and to-dos (eg. `-tt` would display only the to-dos, while `-ttd` would display notes and to-dos.')],['-f, --format <format>',_('Either "text" or "json"')],['-l, --long',_('Use long list format. Format is ID, NOTE_COUNT (for notebook), DATE, TODO_CHECKED (for to-dos), TITLE')]];
return[
['-n, --limit <num>',_('Displays only the first top <num> notes.')],
['-s, --sort <field>',_('Sorts the item by <field> (eg. title, updated_time, created_time).')],
['-r, --reverse',_('Reverses the sorting order.')],
['-t, --type <type>',_('Displays only the items of the specific type(s). Can be `n` for notes, `t` for to-dos, or `nt` for notes and to-dos (eg. `-tt` would display only the to-dos, while `-ttd` would display notes and to-dos.')],
['-f, --format <format>',_('Either "text" or "json"')],
['-l, --long',_('Use long list format. Format is ID, NOTE_COUNT (for notebook), DATE, TODO_CHECKED (for to-dos), TITLE')],
@@ -26,7 +26,7 @@ class Command extends BaseCommand {
constok=force?true:awaitthis.prompt(notes.length>1?_('%d notes match this pattern. Delete them?',notes.length):_('Delete note?'),{booleanAnswerDefault:'n'});
@@ -46,6 +46,8 @@ class NoteWidget extends TextWidget {
if(this.note_&&this.note_.encryption_applied){
this.text=_('One or more items are currently encrypted and you may need to supply a master password. To do so please type `e2ee decrypt`. If you have already supplied the password, the encrypted items are being decrypted in the background and will be available soon.');
this.text+='\n\n';
this.text+=_('You may also type `status` for more information.');
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.