stable

Clone or download

Read-only

Preview in Tracker artifact view

Part of story #18337 markdown replace text How to test: Run the test on the folowing places: - When you create a new artifact in Text fields - When you edit an existing artifact in Text fields and new follow-up comment - When you edit an existing follow-up comment - When you Mass-change artifacts and add a new follow-up comment - When you open an existing artifact in the Modal v2 (Cardwall) In all these cases, try the following: - When you click on the "Preview" button, the textarea is hidden and a <div> shows a preview of the Markdown text you entered with references (like art \#1234) converted to links. - While it is loading, there is a spinner on the "Preview" button. - If there is an error, the "preview area" shows a bootstrap "alert" with the error. You can still retry by toggling "Edit" again. - If you submit the artifact or the comment while in "Preview" mode, the format and content (Markdown text) are saved. - There is no XSS if you write a <script> tag in your Markdown. Change-Id: I78ecb540d3ffd738fc780064feac7303c2372423

Modified Files

Name
M plugins/tracker/include/Tracker/Artifact/RichTextareaProvider.php +1 −0 Go to diff View file
M plugins/tracker/include/Tracker/Masschange_Presenter.class.php +6 −1 Go to diff View file
M plugins/tracker/include/Tracker/Tracker.class.php +1 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-ckeditor-image-upload/README.md +22 −1 Go to diff View file
M plugins/tracker/scripts/lib/rich-text-editor/README.md +42 −9 Go to diff View file
M plugins/tracker/scripts/lib/rich-text-editor/package-lock.json +20 −0 Go to diff View file
M plugins/tracker/scripts/lib/rich-text-editor/package.json +3 −0 Go to diff View file
M plugins/tracker/scripts/lib/rich-text-editor/po/fr_FR.po +3 −0 Go to diff View file
M plugins/tracker/scripts/lib/rich-text-editor/src/RichTextEditorFactory.ts +2 −4 Go to diff View file
A plugins/tracker/scripts/lib/rich-text-editor/src/api/tuleap-api.test.ts +65 −0 Go to diff View file
A plugins/tracker/scripts/lib/rich-text-editor/src/api/tuleap-api.ts +36 −0 Go to diff View file
M plugins/tracker/scripts/lib/rich-text-editor/src/format-selector/ExistingFormatSelector.test.ts +29 −12 Go to diff View file
M plugins/tracker/scripts/lib/rich-text-editor/src/format-selector/ExistingFormatSelector.ts +1 −1 Go to diff View file
M plugins/tracker/scripts/lib/rich-text-editor/src/format-selector/FormatSelectorInterface.ts +5 −6 Go to diff View file
M plugins/tracker/scripts/lib/rich-text-editor/src/format-selector/editor-area/EditorAreaRenderer.test.ts +37 −8 Go to diff View file
M plugins/tracker/scripts/lib/rich-text-editor/src/format-selector/editor-area/EditorAreaRenderer.ts +56 −20 Go to diff View file
M plugins/tracker/scripts/lib/rich-text-editor/src/format-selector/editor-area/EditorAreaState.test.ts +50 −4 Go to diff View file
M plugins/tracker/scripts/lib/rich-text-editor/src/format-selector/editor-area/EditorAreaState.ts +21 −4 Go to diff View file
M plugins/tracker/scripts/lib/rich-text-editor/src/format-selector/editor-area/EditorAreaStateInterface.ts +1 −0 Go to diff View file
A plugins/tracker/scripts/lib/rich-text-editor/src/format-selector/editor-area/components/FormatHiddenInput.test.ts +41 −0 Go to diff View file
A plugins/tracker/scripts/lib/rich-text-editor/src/format-selector/editor-area/components/FormatHiddenInput.ts +32 −0 Go to diff View file
A plugins/tracker/scripts/lib/rich-text-editor/src/format-selector/editor-area/components/PreviewArea.test.ts +84 −0 Go to diff View file
A plugins/tracker/scripts/lib/rich-text-editor/src/format-selector/editor-area/components/PreviewArea.ts +52 −0 Go to diff View file
M plugins/tracker/scripts/lib/rich-text-editor/src/format-selector/editor-area/components/PreviewEditButton.test.ts +47 −2 Go to diff View file
M plugins/tracker/scripts/lib/rich-text-editor/src/format-selector/editor-area/components/PreviewEditButton.ts +18 −2 Go to diff View file
M plugins/tracker/scripts/lib/rich-text-editor/src/format-selector/editor-area/lit-html-adapter.test.ts +51 −5 Go to diff View file
M plugins/tracker/scripts/lib/rich-text-editor/src/format-selector/editor-area/lit-html-adapter.ts +26 −7 Go to diff View file
M plugins/tracker/scripts/lib/rich-text-editor/themes/style.css +4 −0 Go to diff View file
M plugins/tracker/scripts/lib/rich-text-editor/tsconfig.json +1 −1 Go to diff View file
M plugins/tracker/templates/masschange.mustache +8 −1 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/RichTextareaProviderTest.php +21 −20 Go to diff View file
M tests/jest/jest.base.config.js +1 −0 Go to diff View file