Commit graph

196 commits

Author SHA1 Message Date
mrdrogdrog
5381f8ed90
Fix render pane scrolling (#613) 2020-09-30 20:31:04 +02:00
Erik Michelson
01a68b1efe
Change element.io links to matrix.to links (#614)
* Change element.io links to matrix.to links

Following to the discussion in codimd/server#496, this commit changes element.io links to matrix.to in the new react-client as well.

* Updated cypress test for new link
2020-09-30 18:19:17 +02:00
mrdrogdrog
101292da92
Feature/lazy load components (#590) 2020-09-26 09:54:17 +02:00
Philip Molares
9c38655a92
fixed highlight fence in regard to '=' (showLines) and '!' (wrapLines) (#594)
this was just a simple index problem. The 0. entry of a regex result is the whole string and not the first capture group

added e2e tests to fix this in the future
cypress does currently not support copy to clipboard in firefox so this part of the test is commented out (for the time being)
2020-09-22 23:17:19 +02:00
mrdrogdrog
985abe230e
Remove unused prop (#589)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-09-20 22:55:31 +02:00
Philip Molares
8e8190b800
Add copy-to-clipboard-button to all code blocks (#566)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

Co-authored-by: mrdrogdrog <mr.drogdrog@gmail.com>
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-09-19 22:24:49 +02:00
Philip Molares
005c80ff55
added markmap support to the markdown-renderer (#572)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-09-19 20:34:44 +02:00
Philip Molares
cac9b7ea37
Expand image button (#570)
added full-screen image modal when clicking on img's

Co-authored-by: Erik Michelson <github@erik.michelson.eu>
2020-09-19 20:12:57 +02:00
Philip Molares
553cd3577d
add vega-lite diagram (#574)
added vega-lite diagrams
Update CHANGELOG.md

Co-authored-by: mrdrogdrog <mr.drogdrog@gmail.com>
2020-09-19 19:34:24 +02:00
Philip Molares
b772a0ab8f
removed unnecessary export of GeneralLinkProp (#569) 2020-09-16 15:49:15 +02:00
renovate[bot]
d57f6577a5
Update dependency markdown-it-deflist to v2.1.0 (#561)
* Update dependency markdown-it-deflist to v2.1.0

* Include end line number into key

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Update src/components/markdown-renderer/utils/html-react-transformer.tsx

Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-09-15 21:23:06 +02:00
Erik Michelson
8842fff06f
Add info message on empty toc (#567) 2020-09-15 10:22:49 +02:00
Philip Molares
5972932d33
Feature/d3 graphviz (#564)
added graphviz diagrams via d3-graphviz
added craco and webpack-copy-plugin to copy wasm files

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-09-15 09:26:44 +02:00
Philip Molares
44637c753e
Add dark mode (#554) 2020-09-13 18:04:02 +02:00
Erik Michelson
be2428f22c
Extract URLs in extra file and change riot link to element-link (#551)
* Update matrix chat link to new element URL

* Correct other usages of the element link

* Extracted static external links into separate file
2020-09-13 16:38:53 +02:00
Erik Michelson
f636e5ec10
Save editor preferences to localStorage (#541 / #553)
* Added editor-preferences to redux store

* Add local-storage saving and retrieval of EditorConfig

* Change import to be in a single line

* Add equality check to redux-selector (as suggested by @mrdrogdrog)

* Save and load editor-config to/from localStorage
2020-09-09 11:22:52 +02:00
mrdrogdrog
a86d4cbc58
modularize renderer (#552) 2020-09-08 21:49:42 +02:00
Philip Molares
ac00bc98c0
build new permissions modal (#532)
build new permissions modal

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-09-08 18:16:13 +02:00
Erik Michelson
d500ebcd19 Replace MathJax with KaTex in our test note-content 2020-09-07 20:34:29 +02:00
Philip Molares
2d3d587c78
added error boundary (#540)
added error boundary
this prevents any faulty components to completely crash the app and instead shows this page with some help about what to do and where to report bugs.
2020-09-07 20:18:03 +02:00
Erik Michelson
79469c5ddc
Show warning if note is longer than configured maximum length (#534)
* Add maximum document length config option

* Show remaining characters in tooltip of status-bar length-info

* Remove unnecessary checkDocumentLength function

* Add max-length warning

* Update translation wording

* Set dialog to medium size

* Add coloring to status-bar length info

* Improve wording in warning modal

* Add cypress e2e tests

I included the cypress-commands package and set the language level to ES6 to allow easier testing e.g. of element attributes.

* Changed way how the modal-advice was styled and positioned

* Show warning modal only on first length exceeding

* Improved length tooltip by adding messages when exceeding or reaching limit
2020-09-05 16:36:46 +02:00
mrdrogdrog
e58e53a116
Remove keys from replacers (#539) 2020-09-05 10:34:43 +02:00
mrdrogdrog
63b24fa5bf
Feature/sequence diagram (#538) 2020-09-05 08:23:20 +02:00
mrdrogdrog
119c9512e7
Add abcjs (#537) 2020-09-05 08:17:15 +02:00
Philip Molares
a1d48002dd
added mermaid diagram (#525)
added mermaid diagram

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
2020-09-04 13:28:14 +02:00
Tilman Vatteroth
ed523ec5ba Add markdown body to cheatsheet
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-09-03 22:03:38 +02:00
Erik Michelson
a99bb62f12
Replace history-menu icon from bars to vertical dots (#531)
* Replace bars-icon with ellipsis-h-icon

* Replace horizontal icon with vertical one
2020-09-03 15:45:49 +02:00
Erik Michelson
d597438c42
Add revisions dialog (#485)
* Add mock files

Note that revisions-list needs to be called revisions in the reality to be confirm with the API spec, but our mocking solution doesn't allow that...

* Add revisions API calls

* Fix line endings in mock files

* Extend CommonModal to accept size and additionalClasses

* Clarify variable name in API request

* Add react-diff-viewer as dependency

* Add revision chooser modal

* Fix type of route params

* Added and updated mock files

* Added user-icon list per revision

* Added translation to alt text of avatars

* Updated mock file to remove inconsistencies

* Add caching for revisions

* Sort mock file revisions-list descending by timestamp

* Pre-select first/newest revision on first modal open

* Regenerated yarn.lock file from scratch

* Applied requested changes in variable names and line lengths

* User UserAvatar component instead of manually set image

* Move revision-modal-list-entry to own component

* Removed unnecessary return statements
2020-09-02 22:57:44 +02:00
mrdrogdrog
0fecda027c
Fix missed code (#530)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-09-02 21:57:31 +02:00
mrdrogdrog
0e912d64dd
Rename codimd to hedgedoc (#434)
Rename codimd to hedgedoc
2020-09-02 21:17:26 +02:00
mrdrogdrog
3a0e35a9f3
Improve render performance (#511)
Massive improvement of render performance by:
- replacing the codimd-line-marker with an in-memory map
- an observation of the changed markdown code to identify changed lines
- a unique react-key calculation
2020-09-02 20:51:47 +02:00
mrdrogdrog
df7c4cb19e
adjust some review suggestions (#528) 2020-09-02 16:45:25 +02:00
Jakob Klepp
528e7e5904
Add clickable todos (#283) 2020-09-02 13:44:13 +02:00
Erik Michelson
0f30803529
Replace editor toolbar dividers with css pseudo-selector (#527)
* Remove useless divider-spans from toolbar and change css-selector

The use of extra divider elements is not needed as we can set the css-after pseudo-class to the button groups with the same styling.
This way we can reduce the amount of elements in the DOM by a hand full.

* Use scss syntax and include one rule into another more common one
2020-09-01 22:28:37 +02:00
Philip Molares
db4f2a4478
add missing autocompletions (#514)
* added missing autocompletions:
- code-block
- container
- header
- image
- link
- pdf

* added extraTags ([name=], [time=], [color=]) to the link autocompletion, because they trigger on the same characters
added getUser in /redux/user/methods to retrive the current user outside of .tsx files
improve the regexps on several autocompletion

* renamed hints to auto
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-09-01 22:28:08 +02:00
Philip Molares
2decfc1fa2 added title attribute to images
fixes #518
2020-09-01 10:55:20 +02:00
Erik Michelson
84df2ea1cf
Add 'yarn lint' command and run it in GH actions (#517)
* Add 'yarn lint' command and run it in GH actions

* Move linting to own workflow

* Remove linting from build-workflow

* Solve linting warnings

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-08-31 12:48:58 +02:00
mrdrogdrog
a41d3d1515
Correct use selector (#515) 2020-08-30 21:24:34 +02:00
Tilman Vatteroth
971421925a Remove TOC replacer
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-08-30 12:57:17 +02:00
Philip Molares
33648f1645
Added flowchart diagrams (#510)
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: mrdrogdrog <mr.drogdrog@gmail.com>
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
2020-08-29 23:56:27 +02:00
Philip Molares
d482065d72
Feature/csv table (#500)
- added csv-replacer
- changed highlghted-code plugin:
     each replacer extracts what he need from the data-extra attribute now
- changed CHANGELOG.md

Co-authored-by: Erik Michelson <github@erik.michelson.eu>
2020-08-29 15:55:42 +02:00
mrdrogdrog
ef36123377
Replace MathJax with KaTeX (#497)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-08-27 15:13:35 +02:00
Erik Michelson
db080e29d3
Fix editor being filled with €-symbols when pressing the editor-mode-shortcut (#493)
This fix needs a little bit of explanation. Normally the 'keyUp' prevent is preferred because it fires after being sure, that not some buttons more belong to the shortcut. Additionally some platforms set the key-property of the 'keyDown'-event to the composition result of the key-combination thus resolving under certain environments to '€' while in other environments to 'e'.
The browser's event flow is as following: keyDown -> keyPress -> textInput -> keyUp.
As the keyUp-event is too late (after textinput) and the keyPress-event does not work properly with the modifiers, we felt compelled to use 'keyDown' and watch for 'e' as well as '€' key-properties. If some other keyboard locale does output different characters than these two, that person got a problem - meaning no functionality of the shortcut. But still better than nothing.
2020-08-27 14:32:06 +02:00
mrdrogdrog
7f04db9389
Reduce space between editor toolbar buttons (#494) 2020-08-27 10:48:29 +02:00
Philip Molares
36af0dc841 fixed shortcuts for macs 2020-08-26 22:36:05 +02:00
Philip Molares
9439855b08 fixed "PDF does not work. Why?" link in export menu
this also opens a new tab
2020-08-26 22:31:53 +02:00
Tilman Vatteroth
34ceef9d98 Add key prop to shortcut listgroup
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-08-26 22:01:29 +02:00
mrdrogdrog
52fb372b9b
Fix scroll bugs (#487)
* Check line presence before calculating position
* Fix jump bug
2020-08-26 21:59:03 +02:00
Philip Molares
8a9c2c923d
added viewMode shortcuts (#486)
added viewMode shortcuts
2020-08-26 21:42:05 +02:00
Tilman Vatteroth
058b6ab97a Add fork-awesome-stack.tsx and extract types
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-08-26 21:28:46 +02:00