Commit graph

374 commits

Author SHA1 Message Date
Tilman Vatteroth
543fc9f987 Use IframeEditorToRendererCommunicatorContextProvider in document read only mode
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-23 13:12:43 +02:00
Tilman Vatteroth
6cfcc37b1c
Fix Splitter issues (#1343)
Fix Splitter issues

* Replace code with hook useAdjustedRelativeSplitValue
* Add e2e tests for splitter

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-21 23:13:39 +02:00
Tilman Vatteroth
015a5cf496 Extract the render ready status into an extra redux state
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-21 21:38:36 +02:00
Tilman Vatteroth
5893680e53 Adjust code to new options structure
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-21 12:34:05 +02:00
Tilman Vatteroth
1fef30bebc Add new data property to iframe that indicates if the content is ready.
Some tests fail because the iframe hasn't loaded the inner hedgedoc renderer yet
but cypress tries to travel through the dom and verify the render results.

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-19 16:41:43 +02:00
Tilman Vatteroth
cfb2de8909 Add renderer ready state to global application state
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-19 16:02:55 +02:00
Tilman Vatteroth
82472227f9
Replace react-html-parser with html-to-react (#1327)
* Replace react-html-parser with html-to-react

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-18 23:26:36 +02:00
Tilman Vatteroth
b13c1ce8a0 Fix unique key in ui-notification-toast
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-18 22:03:40 +02:00
Tilman Vatteroth
31ca77ebfa Throw error if no communicator was found in a react context
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-17 23:32:47 +02:00
Erik Michelson
57f46f489b
Add word count in document info modal (#738)
Co-authored-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-17 22:31:28 +02:00
Tilman Vatteroth
93722f4161
Improve stability and speed of E2E tests (#1319)
* Change cypress settings in CI job
* Catch error from highlight js chunk loading in auto completion
* Refactor code
* Show notification if highlightjs loading failed

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-13 23:02:39 +02:00
Tilman Vatteroth
1c5c3c3258 Deduplicate code
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-12 18:25:47 +02:00
Tilman Vatteroth
baa4af7f30 Remove PDF mimetype
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-12 18:25:47 +02:00
Tilman Vatteroth
ed9f4aefab Add mock for upload response
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-12 18:25:47 +02:00
renovate[bot]
5933fb801d
Update dependency prettier to v2.3.1 (#1312)
* Update dependency prettier to v2.3.1

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-12 16:20:06 +00:00
Tilman Vatteroth
4580bc9658
Fix splitter (#1307)
Use window for splitter resizing

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-12 16:20:11 +02:00
Tilman Vatteroth
6285af458a
Iframe communicator context (2/3) (#1310)
* Add type

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Extract code and add new context provider

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Adjust import

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-12 16:14:46 +02:00
Tilman Vatteroth
829cc2fe48
Add application state hook (#1308)
* Add application state hook

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Add docs

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-11 15:21:24 +02:00
Tilman Vatteroth
4720f2d36b
Extract toc button (#1302)
* Extract toc button

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-07 22:09:13 +02:00
Erik Michelson
0aae1f70d2
Add prettier for codestyle and re-format everything (#1294) 2021-06-06 23:14:00 +02:00
Tilman Vatteroth
8b78154075 Replace twemoji files with twemoji npm package
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-05 23:53:21 +02:00
Erik Michelson
1eea135a9d
Replace deprecated highlight.js syntax (#1295)
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2021-06-05 20:21:54 +00:00
Tilman Vatteroth
c867673072
Replace emojibase-data with emoji-picker-element-data (#1293)
* Add Twemoji 13.1
* Use emoji-picker-element instead of emojibase

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-05 22:16:46 +02:00
renovate[bot]
7647475183
Update dependency highlight.js to v11 (#1292)
* Update dependency highlight.js to v11

Signed-off-by: Renovate Bot <bot@renovateapp.com>

* Migrate code

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-01 19:57:37 +00:00
Erik Michelson
327c872532
Fix broken links for share dialog and avatar images (#1249) 2021-05-11 12:31:20 +02:00
Tilman Vatteroth
9a62f27303 Remove unnecessary assertion
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-05-08 22:45:08 +02:00
Tilman Vatteroth
a48b4f60bb
Change schema of url environment variables (#1237)
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-05-05 22:33:30 +02:00
Erik Michelson
3887de4309
The History PR: III - Editor integration (#1158)
* Update history on editor load and title change

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Add pinning to history from sidebar

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Add CHANGELOG entry

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Only update local history entries

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Update property names to match backend ones

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Show error notification on failure

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Apply requested changes from review

- rename use hook to reflect the situation that only local entries will be updated
- extract the update ready check from the hook
- rename vars to make comparison more clear

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2021-05-04 20:35:08 +02:00
Erik Michelson
726b084509
Fix task list checkboxes for numbered lists (#1233)
* Fix replacer regex

This regex handles the replacement of the [ ] with [x] and reverse.
Until now it was build to check for an unordered list beginning with "*" or "-".
This change permits "+" as well as digits followed by a dot (ordered lists).

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Add cypress tests for task lists

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Add bracket syntax for numbered lists

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2021-05-04 20:34:16 +02:00
Tilman Vatteroth
eac288cebc Fix spinner visibility on intro-page
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-05-03 22:49:06 +02:00
Tilman Vatteroth
0264e9a420
Fetch banner.txt from public URL instead of config (#1216) 2021-05-03 19:57:55 +00:00
Tilman Vatteroth
e1d096ba1d
Don't show error if no intro.md was found (#1221) 2021-05-03 19:56:44 +00:00
Tilman Vatteroth
2c5a03b3ee
Restructures + New Evironment Variables (#1230)
* Use document base uri for react router

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Rename getAndSetUser to fetchAndSetUser

Getter should be reserved for simple get functions.
Everything that does a bit more logic should use a more meaningful verb.

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Rename getFrontPageContent to fetchFrontPageContent

Getter should be reserved for simple get functions.
Everything that does a bit more logic should use a more meaningful verb.

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Reformat code

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Use PUBLIC_URL env var in index.html

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Introduce new environment variables

For better testing (especially if you have multiple endpoints) this commit introduces
REACT_APP_BACKEND_BASE_URL, REACT_APP_FRONTEND_ASSETS_URL and REACT_APP_CUSTOMIZE_ASSETS_URL

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Remove redundant license information

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Remove redundant license information

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Fix rebase issues

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Remove unused file

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Correct parameter

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Fix run tasks

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Force use of bash

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Fix link to cypress picture

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* revert change

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* fix url

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Remove license info

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Revert rebase issues

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Add missing banner code

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Fix test url

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Useless change to trigger github

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Don't set backend base url because this break the mock mode detection

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

Co-authored-by: Philip Molares <philip.molares@udo.edu>
2021-05-02 22:38:43 +02:00
Philip Molares
9cf7980334
Fix Communication between frontend and backend (#1201)
Co-authored-by: Tilman Vatteroth <git@tilmanvatteroth.de>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-05-01 21:01:42 +00:00
Philip Molares
f01a821810
Reuse: Fix typo in HedgeDoc Icon Usage Guidelines (#1215)
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-25 22:04:43 +02:00
Erik Michelson
003658dc4d
The History PR: II - Add URL params (#1157)
* Add location state dependency

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Split toolbar state into single location states

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Add CHANGELOG entry

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Pin dependency

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Use react state for view because of side-effects

The locationState was resetted on each search or tags filter update because these updates pushed a change to the location thus resulting in loss of the location state for the view.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Remove unneeded import

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Change CHANGELOG entry

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Removed unnecessary typecast

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2021-04-24 23:25:01 +02:00
Erik Michelson
8e5a667d18
The History PR: I - Move to redux (#1156) 2021-04-22 22:46:24 +02:00
Philip Molares
bba2b207c4
TablePicker: Change table cells in picker (#1202)
- Fix error that the border of table cells was invisible in dark mode
- Add margin to table cells
- Add full border to table cells
- Change border-color while hovering over table cells

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-22 12:55:51 +02:00
Tilman Vatteroth
bfcb617eeb Use module build of markmap-lib
If we use the default import then webpack will use the "browser"
bundle which relies on CDN lazy loading of dependencies.

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-04-15 22:18:12 +02:00
Tilman Vatteroth
64fe7233e7 Fix code highlight indentation
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-04-15 22:14:02 +02:00
Philip Molares
29d9d49f5a
Change api route to /api/private (#1189) 2021-04-15 22:10:15 +02:00
Erik Michelson
7a21a26166
Disallow data and javascript URIs (#1186)
* Disallow data and javascript URIs

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2021-04-11 22:48:31 +02:00
renovate[bot]
ab9f89f39f
Update dependency vega to v5.20.2 (#1152)
* Update dependency vega to v5.20.2

Signed-off-by: Renovate Bot <bot@renovateapp.com>

* Add type to error object

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

Add renovate group for vega

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

Update vega code

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Regenerate yarn.lock

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-04-10 15:27:42 +00:00
Tilman Vatteroth
af887877aa
Add context for iframe communicator in editor page (#1146)
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-04-03 12:59:14 +02:00
Tilman Vatteroth
a86789dbef
Add toasts (#1073)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2021-03-11 20:51:11 +01:00
Erik Michelson
0b4a0afa16
Add table formatting on paste of detected table (#957) 2021-03-10 22:52:20 +01:00
Tilman Vatteroth
107f0f6fa3
Code improvements (#1086)
* Extract code into hook
* Refactor code to remove let
* Reformat code
* Extract version-info-modal into components
* Use main block in landinglayout
* Add fixedWidth and classname attribute to IconButton

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2021-03-10 22:45:05 +01:00
Erik Michelson
6d2dde477c
Add one-click login if possible (#1043) 2021-03-09 23:00:14 +01:00
Tilman Vatteroth
a6c80ac1f0 Extract code into hook
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2021-03-09 22:40:24 +01:00
Erik Michelson
a1698047a8
Set sanitized note title as filename for download (#1057) 2021-02-22 23:36:09 +01:00