Commit graph

476 commits

Author SHA1 Message Date
Philip Molares
29709d2ba4
Add YAML-metadata for notes and change the document title accordingly (#310)
* Added yaml-frontmatter extracting and error handling
* add tests
* changed document-title, so the editor can change the title to the title of the yaml metadata. closes #303
* extracted first line parsing in a core rule of markdown-it
document title will now be determined like this:
1. yaml metadata title
2. opengraph title
3. first level one heading
4. 'Untitled'
* added documentTitle e2e test

Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Co-authored-by: Philip Molares <philip@mauricedoepke.de>
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: mrdrogdrog <mr.drogdrog@gmail.com>
2020-07-18 22:17:36 +02:00
renovate[bot]
07fed5c67e
Update typescript-eslint monorepo to v3.6.1 (#339)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-18 02:47:31 +02:00
renovate[bot]
9915de86f5
Update dependency typescript to v3.9.7 (#338)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-18 02:44:49 +02:00
renovate[bot]
67fce02f76
Update dependency @types/codemirror to v0.0.97 (#335)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-18 02:41:01 +02:00
renovate[bot]
eb7ae240a4
Update dependency i18next-http-backend to v1.0.17 (#337)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-18 02:39:47 +02:00
renovate[bot]
0577cc4294
Update dependency i18next to v19.6.2 (#336)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-18 02:38:12 +02:00
renovate[bot]
100c772add
Update JS test packages (#334)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-18 02:35:35 +02:00
renovate[bot]
bb3b685988
Pin dependencies (#333)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-18 02:34:34 +02:00
Erik Michelson
8216958f91
Add Asciinema integration (#326)
* Added Asciinema integration

* Added CHANGELOG entry
2020-07-16 22:14:47 +02:00
Philip Molares
1b52bac838
readd toolbar (#302)
* added all functionality to the toolbar buttons
* added unit tests for the toolbar functions
* added unit tests to CI
* Added translated titles to buttons of toolbar

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-07-16 11:34:56 +02:00
Philip Molares
f0fe7f5ac2
added e2e tests (#298)
- added e2e tests for
  - banner
  - history
  - intro
  - language
  - link
- added e2e workflow
- added cypress badge to README
2020-07-16 11:22:53 +02:00
renovate[bot]
1a5d4f6db8
Update dependency react-bootstrap to v1.2.1 (#320)
* Update dependency react-bootstrap to v1.2.1

* Fixed sort-button event name

With the upgrade to Bootstrap-React 1.2.1 the ButtonProps extend now React.HTMLAttributes which in favor extends the DOMAttributes interface. This interface defines almost every possible attribute for DOM-/HTML-elements.

Our SortButtonProps interface introduced an onChange event handler with a type matching our condition. With the BS-React upgrade the onChange event must not be redefined/overriden with this type and therefore I renamed it.

* updated react-bootstrap to 1.2.2

* fixed wrong prop name in HistoryToolbar

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Co-authored-by: Philip Molares <philip.molares@udo.edu>
2020-07-15 23:34:34 +02:00
renovate[bot]
12bd76a8c1
Update dependency @testing-library/react to v10.4.5 (#318)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-12 01:18:49 +02:00
renovate[bot]
a0db095088
Update typescript-eslint monorepo to v3.6.0 (#321)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-12 01:13:02 +02:00
renovate[bot]
41670a3daa
Update dependency i18next to v19.6.0 (#319)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-12 01:09:52 +02:00
renovate[bot]
85c3e0b739
Update definitelyTyped (#317)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-11 23:43:12 +02:00
renovate[bot]
079264bb72
Update dependency i18next-http-backend to v1.0.16 (#307)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-04 03:40:36 +02:00
renovate[bot]
b1199e726f
Update dependency i18next to v19.5.4 (#306)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-04 03:38:49 +02:00
renovate[bot]
74cecfc1e9
Update dependency eslint-plugin-flowtype to v5.2.0 (#305)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-04 03:38:11 +02:00
renovate[bot]
949337e1bc
Update dependency typescript to v3.9.6 (#308)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-04 03:26:40 +02:00
renovate[bot]
fb008c0634
Update typescript-eslint monorepo to v3.5.0 (#309)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-04 03:22:19 +02:00
Tilman Vatteroth
bee715b8f9 Remove log message and fix null check
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-07-02 23:17:16 +02:00
Erik Michelson
e1e8a76fda
Add note deletion and removal from history modals (#299)
* Fix history element's entry menu deletion button

The note deletion button inside the EntryMenu of a history element has one button to remove the note from the user's history and one to delete the note from the system. Both buttons pointed to the history-removal.

* Added modals for note deletion and note from history removal

* Removed redundant code

* Added CHANGELOG entry

* Added note title in deletion/removal prompts

* Refactored DeleteNoteItem and RemoveNoteEntryItem into one common component

* Refactored DeleteRemoveNoteItem-component and added two composition components

* Redesigned modal dialog to make the note title more clearly readable

* Renamed the generic dropdown-with-deletion-modal-component
2020-07-01 23:28:49 +02:00
Philip Molares
b23a73ac51
added branding option (#301)
added branding option via '@ <logo>' or '@ <name>' after the CodiMD logo and text.

This was a user can personalize their CodiMD instance

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-07-01 23:20:00 +02:00
mrdrogdrog
50b04c8403
Add toc sidebar+dropdown (#272)
* Replace markdown-it-table-of-contents with markdown-it-toc-done-right

Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Co-authored-by: Philip Molares <philip.molares@udo.edu>

Extract render window code

Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Co-authored-by: Philip Molares <philip.molares@udo.edu>

add new package

fix stickyness

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

show toc sidebar only if there is enough space

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

* add min height class

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

* Move markdown toc into own component

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

* add sidebar buttons

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

* Use other button color

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

* Change name of component

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

* Fix merge issues and make toc work again

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

* pin dependencies

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

* remove blank line

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

* pin dependency

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

* Fix anchors

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

* Add use memo

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

* Add change log entry for removal of custom slugify
2020-06-29 17:51:40 +02:00
Erik Michelson
8ab7776a82
Replace links to /features with /n/features (#297)
* Replaced links to /features with /n/features

It was discussed and agreed on that all notes should reside under the /n/ namespace in the future. Even if we want to redirect all pre-2.0-notes from the root namespace to the /n/ namespace, it might be better to set the internal links for the features page properly instead on relying on the redirect.

* Improved note placeholder text
2020-06-28 21:25:22 +02:00
Erik Michelson
d13adcc9c3
Refactoring of modals (#294)
* Refactored modals (added CommonModal and DeletionModal besides ErrorModal)

This change allows more code reusage by defining a common modal that has a translated title with an optional icon.

* Replace the eslint-hack with a proper TypeScript conform solution

Instead of asserting non-null and disabling eslint, the 'as ...'-syntax is used to convince the compiler that everything is fine.

* Improved property names and ShowIf-construct

* Fixed missing renamings
2020-06-28 00:00:05 +02:00
renovate[bot]
17102d7d44
Update JS test packages (#296)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-27 11:55:27 +02:00
renovate[bot]
fe8a5ed4d2
Update dependency eslint-plugin-import to v2.22.0 (#295)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-27 11:53:58 +02:00
Erik Michelson
4be74f885a
Updated test-class matching rule of renovate (#293)
As seen in multiple PRs that renovate raised today, the @testing-library/ packages are not bundled in the 'packages:jsTest' pre-defined group. As they aren't relevant to be separated, this commit changes the config of renovate to treat them as one big PR in the future.
2020-06-27 11:41:37 +02:00
Philip Molares
fe55ef7e13 changed comment in markdown-renderer.scss file to explain why the usage of * is necessary
see https://github.com/codimd/react-client/pull/271#pullrequestreview-437942115
2020-06-27 11:23:22 +02:00
renovate[bot]
0c078d6d62
Update dependency codemirror to v5.55.0 (#289)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-27 03:20:10 +02:00
renovate[bot]
6a7d077f02
Update typescript-eslint monorepo to v3.4.0 (#292)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-27 03:14:33 +02:00
renovate[bot]
a3f5513167
Update dependency i18next to v19.5.1 (#290)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-27 03:12:38 +02:00
renovate[bot]
63ae582099
Update definitelyTyped (#285)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-27 03:07:18 +02:00
renovate[bot]
c29be50ce9
Update dependency react-bootstrap-typeahead to v5.1.0 (#291)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-27 03:06:50 +02:00
renovate[bot]
a501bbcd65
Pin dependencies (#284)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-27 02:45:45 +02:00
Erik Michelson
17cc691403
Fixed bug that two p-tags were encapsulated inside each other (#278)
* Fixed bug that two p-tags were encapsulated inside each other

This bug was introduced because the wider-possible-replacer replaced each element that was subject to be enlarged with a brand new p-surrounding. That surrounding got the key of the old (now inner) element and therefore casts an duplicate key exception.
This fix solves that problem by setting the 'wider-possible' class attribute directly on the selected tag instead of creating a surrounding.

* Removed unnecessary console log

* Optimized attribute assignment to not fail on elements without attribs

* Added comment describing the node.attribs assignment
2020-06-26 00:07:15 +02:00
Philip Molares
937a2e9eb9
View mode wider (#271)
made some components wider in View Mode
These objects include
- `<img>` alone in a paragraph
- `<codimd-youtube>`
- `<codimd-vimeo>`
- `<codimd-pdf>`

This can be toggled via the `wider` prop in `MarkdownRenderer`

Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-06-25 22:38:10 +02:00
Erik Michelson
0df90c1a2a
Added click-to-load text for pdf embeddings and general option for texts on the embedding preview (#277)
* Added possibility to add a text below the icon on the preview

* Changes naming of i18nKey argument

* Rebase fixes

* Show preview image only if defined
2020-06-25 22:29:09 +02:00
Philip Molares
1db1bcf248
added image-replacer (#273)
added image-replacer

this component replaces all `<img>`'s in the markdown-it output with an ImageFrame component. This enables us to implement image proxies and other per image customization in the future.

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-06-25 22:25:22 +02:00
mrdrogdrog
0a48fd0aa5
Change pdf embedding size when clicked (#275)
* Add activation callback to one-click-embedding
* use activation callback to change size of pdf

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-06-25 21:49:15 +02:00
Tilman Vatteroth
66602d98f4 Move fonts into subdirs
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-06-25 21:16:58 +02:00
Tilman Vatteroth
729144eca3 Add spaces to highlighted code regex
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-06-25 21:16:36 +02:00
mrdrogdrog
312c86e702
Add "start with line number" and "continue line number" syntax to highlighted code blocks (#267)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-06-24 23:53:26 +02:00
mrdrogdrog
cdadc7b41a
Add a wrapper for linkify (#268)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-06-24 23:52:45 +02:00
mrdrogdrog
b74bb8e71d
Restructure replacers (#266)
* Restructure replacers

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-06-23 23:04:51 +02:00
mrdrogdrog
eb56da7871
Restructure highlight code to enable line wrapping (#265)
* Restructure highlight code to enable line wrapping

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-06-23 22:09:56 +02:00
Erik Michelson
6bf214542e
Added image resizing support via markdown-it-imsize (#262) 2020-06-23 21:44:16 +02:00
Erik Michelson
6a808e76d9
Fixed TOC only showing up to 2 levels instead of 3 (#260) 2020-06-23 21:43:52 +02:00