Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified create view [B: 1791] #526

Draft
wants to merge 80 commits into
base: dev
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
0c4a822
Removed extra dependencies and eslint
droberts-ctrlo Jan 2, 2025
9302204
Updated libraries and tooling
droberts-ctrlo Jan 2, 2025
e91d1b3
Upgraded react version
droberts-ctrlo Jan 2, 2025
c95be37
Refactoring React components - tests to follow
droberts-ctrlo Jan 7, 2025
05130f5
Package changes (should have been in previous commit)
droberts-ctrlo Jan 7, 2025
d0242cc
In retrospect, changes to the react components isn't necessary
droberts-ctrlo Jan 9, 2025
a67726e
Added Jest setup script rather than having to import every time
droberts-ctrlo Jan 9, 2025
5c90124
Further button tests
droberts-ctrlo Jan 13, 2025
4d6bccb
Working on BS4 - 5 migration
droberts-ctrlo Jan 13, 2025
32ab0c1
Update of files - *currently tests are broken due to BS5 setup*
droberts-ctrlo Jan 16, 2025
9a730bd
Updated Cypress tests
droberts-ctrlo Jan 16, 2025
d19ff93
Merge branch 'dev' into js-fixes
droberts-ctrlo Jan 20, 2025
98084a7
Cypress tests now pass
droberts-ctrlo Jan 20, 2025
022100c
Updated styling
droberts-ctrlo Jan 21, 2025
2f0f51f
Merged in current v2.6
droberts-ctrlo Jan 21, 2025
564b495
Update .gitignore
droberts-ctrlo Jan 21, 2025
821be46
Undo accidental staging of public directory
droberts-ctrlo Jan 21, 2025
4a65544
Merge remote-tracking branch 'origin/js-fixes' into js-fixes
droberts-ctrlo Jan 21, 2025
e93c7d3
Removed incorrect unit test
droberts-ctrlo Jan 21, 2025
640c270
Removed extra changes to webpack.config
droberts-ctrlo Jan 21, 2025
e91e5c1
Added definitions for jQuery and test to ensure it's defined correctly
droberts-ctrlo Jan 21, 2025
76e7bfc
Added build stage to Cypress tests
droberts-ctrlo Jan 21, 2025
5acf741
Updates to webdriver tests
droberts-ctrlo Jan 21, 2025
5f204da
`webpack.config` changes
droberts-ctrlo Jan 21, 2025
54a3674
Updated modal close button and added fileDrag component to code
droberts-ctrlo Jan 21, 2025
f064e8c
DataTables display fixes
droberts-ctrlo Jan 21, 2025
59cb863
Updated dashboard components
droberts-ctrlo Jan 23, 2025
4afd8c3
Updated view and removed logging from tests where it wasn't needed
droberts-ctrlo Jan 23, 2025
51a5bc0
Added tests to dashboard
droberts-ctrlo Jan 23, 2025
197a27f
Fixes for styling in react components
droberts-ctrlo Jan 24, 2025
2c553c9
Added further dashboard tests
droberts-ctrlo Jan 24, 2025
7590502
Merge branch 'dev' into js-fixes
droberts-ctrlo Jan 24, 2025
0e7a3ac
Removed edits from BS changes
droberts-ctrlo Jan 24, 2025
12887aa
Merge remote-tracking branch 'origin/js-fixes' into js-fixes
droberts-ctrlo Jan 24, 2025
bca6579
Test updates and fixes for Jest
droberts-ctrlo Jan 24, 2025
3698fa5
Fix for header overflow causing excess page width
droberts-ctrlo Jan 29, 2025
3a64204
Updated dashboard components to use `react-bootstrap`
droberts-ctrlo Feb 6, 2025
770c19a
Bootstrap changes
droberts-ctrlo Feb 6, 2025
b30508f
Bootstrap Changes
droberts-ctrlo Feb 7, 2025
f59c24c
Updated failing tests on React components
droberts-ctrlo Feb 10, 2025
2c7d7ef
React fixes
droberts-ctrlo Feb 10, 2025
f6c9629
Fixes for failing Cypress tests
droberts-ctrlo Feb 10, 2025
2325e0f
DataTables table view fix
droberts-ctrlo Feb 13, 2025
465334f
Started work on cards
droberts-ctrlo Feb 14, 2025
2de548f
Fixed tests and removed skipped tests
droberts-ctrlo Feb 14, 2025
b2d2b23
Cards finished
droberts-ctrlo Feb 24, 2025
5a85f41
Fixed header row
droberts-ctrlo Feb 24, 2025
86cd4c2
Updated view to align items correctly in edit
droberts-ctrlo Feb 24, 2025
b8537a4
Cleaned up sidebar
droberts-ctrlo Feb 24, 2025
8c9148d
Added component for bootstrap popover
droberts-ctrlo Feb 27, 2025
bb97ae7
Modified button config for btn-info
droberts-ctrlo Feb 27, 2025
514c5d4
Add undefined check to bootstrap-select
droberts-ctrlo Feb 27, 2025
4509460
Removed extra logging
droberts-ctrlo Feb 27, 2025
12fb67b
Moved DataTables styling out of general CSS
droberts-ctrlo Feb 27, 2025
4e115cd
Added bootstrap popover and moved init code into closure
droberts-ctrlo Feb 27, 2025
e0e6722
Completed DataTables code
droberts-ctrlo Mar 3, 2025
8e3a415
Further updates to cards for editing and other changes
droberts-ctrlo Mar 3, 2025
c31345e
Fixes for Cypress tests
droberts-ctrlo Mar 4, 2025
93dcaa5
Further Cypress fixes
droberts-ctrlo Mar 4, 2025
21e6e9f
Removed comments containing old code from `_card.scss`
droberts-ctrlo Mar 4, 2025
07363f6
Removed old popover component
droberts-ctrlo Mar 4, 2025
0228c4b
Moved over to Bootstrap 5 tabs
droberts-ctrlo Mar 4, 2025
1cc5949
Updated table permissions view
droberts-ctrlo Mar 5, 2025
aa4d2a1
Updated data-table with hover and clickable rows
droberts-ctrlo Mar 6, 2025
51820e0
Removed collapsible component as this can be handled by BS5
droberts-ctrlo Mar 6, 2025
9305808
Modified bootstrap popover to use more complex content
droberts-ctrlo Mar 6, 2025
ca8f5a1
Various changes
droberts-ctrlo Mar 6, 2025
6993c6a
Removed screenshots for Cypress tests
droberts-ctrlo Mar 7, 2025
76d0e93
Removed transitions that were causing rendering issues
droberts-ctrlo Mar 10, 2025
eaadc19
Merge branch 'dev' into js-fixes
droberts-ctrlo Mar 14, 2025
ab8cda4
Merge branch 'dev' into js-fixes
droberts-ctrlo Mar 14, 2025
c4d4722
Merge branch 'js-fixes' into bootstrap-integration
droberts-ctrlo Mar 14, 2025
cfffff6
Added ts-expect-error for `window.test`
droberts-ctrlo Mar 14, 2025
cb2798c
Typescript changes
droberts-ctrlo Mar 20, 2025
b101730
New listbox with better bootstrap integration and fixes
droberts-ctrlo Mar 20, 2025
3c8d5d2
Added select all and select none buttons
droberts-ctrlo Mar 20, 2025
812ff4e
Updated styling
droberts-ctrlo Mar 20, 2025
d0e06f6
Updated cards in views where they were missed
droberts-ctrlo Mar 20, 2025
1f50888
Merge branch 'bootstrap-integration' into view-listbox-changes
droberts-ctrlo Mar 20, 2025
cc18ff9
Re-styled to bring the control closer to old control and added search
droberts-ctrlo Mar 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated libraries and tooling
- Upgraded basic packages in `package.json` to latest version where possible
- Updated `webpack.config.js` to use latest versions of plugins and builders
- Updated `tsconfig.json` and `jest.config.js` to enable more consistent imports
- Updated JS, TS, and TSX files with the above changes
- Removed stale ESLint directives
- Updated configurations, and code to ensure tests now pass where they were failing due to breaking changes to libraries
- Updated configurations, and code to allow Webpack build to succeed
droberts-ctrlo committed Jan 2, 2025

Verified

This commit was signed with the committer’s verified signature.
droberts-ctrlo Dave Roberts
commit 93022044e19da666659dc523f5ee1414c552c6c6
1 change: 0 additions & 1 deletion cypress/support/commands.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-namespace */
/// <reference types="cypress" />

import { IBuildable } from "./builders/layout/interfaces";
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -94,6 +94,7 @@ const config = {
"^validation$": "<rootDir>/src/frontend/js/lib/validation",
"^logging$": "<rootDir>/src/frontend/js/lib/logging",
"^util/(.*)$": "<rootDir>/src/frontend/js/lib/util/$1",
"^testing/(.*)$": "<rootDir>/src/frontend/testing/$1",
},

// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
87 changes: 45 additions & 42 deletions package.json
Original file line number Diff line number Diff line change
@@ -16,76 +16,79 @@
"e2e:electron": "yarn cypress run --browser electron"
},
"dependencies": {
"@egjs/hammerjs": "^2.0.0",
"@egjs/hammerjs": "^2.0.17",
"@lol768/jquery-querybuilder-no-eval": "^2.6.0",
"@types/form-serialize": "^0.7.4",
"@types/react-modal": "^3.16.3",
"bootstrap": "4.6",
"bootstrap-datepicker": "^1.9.0",
"bootstrap-html5sortable": "^1.0.0",
"bootstrap-select": "^1.13.18",
"component-emitter": "^1.3.0",
"datatables.net-bs4": "^2.0.8",
"datatables.net-buttons-bs4": "^3.0.2",
"datatables.net-responsive-bs4": "^3.0.2",
"datatables.net-bs4": "^2.1.8",
"datatables.net-buttons-bs4": "^3.2.0",
"datatables.net-responsive-bs4": "^3.0.3",
"datatables.net-rowreorder-bs4": "^1.5.0",
"form-serialize": "^0.7.2",
"handlebars": "^4.7.7",
"imports-loader": "^1.2.0",
"jquery": "^3.6.0",
"handlebars": "^4.7.8",
"imports-loader": "^5.0.0",
"jquery": "^3.7.1",
"jquery-ui-sortable-npm": "^1.0.0",
"jstree": "^3.3.12",
"keycharm": "^0.3.0",
"marked": "^9.1.1",
"moment": "^2.24.0",
"jstree": "^3.3.17",
"keycharm": "^0.4.0",
"marked": "^15.0.4",
"moment": "^2.30.1",
"popper.js": "^1.16.1",
"propagating-hammerjs": "^1.4.0",
"postcss": "^8.1.0",
"propagating-hammerjs": "^2.0.0",
"react": "^16.13.1",
"react-app-polyfill": "^1.0.6",
"react-dom": "^16.13.1",
"react-grid-layout": "^0.18.3",
"react-modal": "^3.11.2",
"regenerator-runtime": "^0.13.11",
"summernote": "^0.8.20",
"regenerator-runtime": "^0.14.1",
"summernote": "^0.9.1",
"tippy.js": "^6.3.7",
"typeahead.js": "^0.11.1",
"uuid": "^7.0.0",
"vis-data": "^6.3.0",
"vis-timeline": "7.4.3",
"vis-util": "^4.0.0"
"uuid": "^9.0.0",
"vis-data": "^7.1.9",
"vis-timeline": "^7.7.3",
"vis-util": "^5.0.1",
"xss": "^1.0.0"
},
"devDependencies": {
"@babel/core": "^7.14.6",
"@babel/plugin-transform-react-jsx": "^7.22.15",
"@babel/preset-env": "^7.14.7",
"@babel/preset-react": "^7.16.7",
"@babel/preset-typescript": "^7.16.7",
"@babel/runtime-corejs3": "^7.14.7",
"@babel/core": "^7.26.0",
"@babel/plugin-transform-react-jsx": "^7.25.9",
"@babel/preset-env": "^7.26.0",
"@babel/preset-react": "^7.26.3",
"@babel/preset-typescript": "^7.26.0",
"@babel/runtime-corejs3": "^7.26.0",
"@jest/globals": "^29.7.0",
"@types/jquery": "^3.5.24",
"@types/jquery": "^3.5.32",
"@types/jstree": "^3.3.46",
"@types/react": "^17.0.41",
"@types/react-dom": "^17.0.14",
"@types/react-grid-layout": "^1.3.2",
"@types/typeahead.js": "^0.11.6",
"@webpack-cli/serve": "^2.0.1",
"autoprefixer": "^9.8.8",
"babel-loader": "^8.2.2",
"buffer": "^6.0.3",
"@webpack-cli/serve": "^3.0.1",
"autoprefixer": "^10.4.20",
"babel-loader": "^9.2.1",
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "6",
"core-js": "^3.15.2",
"css-loader": "^3.2.0",
"cypress": "^13.7.2",
"copy-webpack-plugin": "^12.0.2",
"core-js": "^3.39.0",
"css-loader": "^7.1.2",
"cypress": "^13.17.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"mini-css-extract-plugin": "^2.7.2",
"postcss-loader": "^3.0.0",
"sass": "^1.23.7",
"sass-loader": "^8.0.0",
"terser-webpack-plugin": "^5.3.6",
"ts-loader": "~8.2.0",
"typescript": "5.4.3",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1",
"mini-css-extract-plugin": "^2.9.2",
"postcss-loader": "^8.1.1",
"sass": "^1.83.0",
"sass-loader": "^16.0.4",
"terser-webpack-plugin": "^5.3.11",
"ts-loader": "^9.5.1",
"typescript": "^5.7.2",
"webpack": "^5.97.1",
"webpack-cli": "^6.0.1",
"webpack-manifest-plugin": "^5.0.0"
},
"browserslist": [
3 changes: 2 additions & 1 deletion src/frontend/components/button/lib/component.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import "../../../testing/globals.definitions";
import { describe, it, expect} from "@jest/globals";
import "testing/globals.definitions";
import ButtonComponent from './component';

describe("Button Component", () => {
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "../../../testing/globals.definitions";
import "testing/globals.definitions";
import {validateRequiredFields} from 'validation';
import CreateReportButtonComponent from "./create-report-button";
import {describe, expect, it, jest} from "@jest/globals";

describe('create-report-button', () => {
it('does not submit form if no checkboxes are checked', () => {
@@ -24,7 +25,7 @@ describe('create-report-button', () => {

const $submit = $('#submit');
new CreateReportButtonComponent($submit);
const submitSpy = jest.fn((ev) => {
const submitSpy = jest.fn((ev: Event) => {
ev.preventDefault();
ev.stopPropagation();
});
@@ -56,7 +57,7 @@ describe('create-report-button', () => {

let $submit = $('#submit');
new CreateReportButtonComponent($submit);
const submitSpy = jest.fn((ev) => {
const submitSpy = jest.fn((ev:Event) => {
ev.preventDefault();
ev.stopPropagation();
});
@@ -90,7 +91,7 @@ describe('create-report-button', () => {

const $submit = $('#submit');
new CreateReportButtonComponent($submit);
const formSpyFn = jest.fn((ev) => {
const formSpyFn = jest.fn((ev:Event) => {
ev.preventDefault();
ev.stopPropagation();
});
17 changes: 10 additions & 7 deletions src/frontend/components/button/lib/rename-button.ts
Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ declare global {
renameButton(): JQuery<TElement>;
/**
* Handle the rename event
* @template TElement The element type
* @param { RenameEvent } events The event name
* @param { 'rename' } handler The event handler
* @returns {JQuery<TElement>} the JQuery element
@@ -102,16 +103,17 @@ class RenameButton {
/**
* Perform click event
* @param {number} id The id of the field
* @param {JQuery.ClickEvent} ev The event object
* @param {JQuery.ClickEvent} ev The event object
*/
private renameClick(id: number, ev: JQuery.ClickEvent) {
ev.preventDefault();
const original = $(`#current-${id}`)
let $current = $(`#current-${id}`);
const original = $current
.text()
.split('.')
.slice(0, -1)
.join('.');
$(`#current-${id}`)
$current
.addClass('hidden')
.attr('aria-hidden', 'true');
$(`#file-rename-${id}`)
@@ -127,7 +129,7 @@ class RenameButton {
.removeClass('hidden')
.attr('aria-hidden', null)
.on('click', (e) => {
this.triggerRename(id, ev.target, e)
this.triggerRename(id, ev.target, <any>e)
});
$(`#rename-cancel-${id}`)
.removeClass('hidden')
@@ -158,12 +160,13 @@ class RenameButton {
* @param {JQuery<HTMLButtonElement>} button The button that was clicked
* @param {JQuery.BlurEvent} ev The blur event
*/
private triggerRename(id: number, button: JQuery<HTMLButtonElement>, e: JQuery.Event) {
const previousValue = $(`#current-${id}`).text();
private triggerRename(id: number, button: JQuery<HTMLButtonElement>, ev: JQuery.BlurEvent) {
let $current = $(`#current-${id}`);
const previousValue = $current.text();
const extension = '.' + previousValue.split('.').pop();
const newName = this.value.endsWith(extension) ? this.value : this.value + extension;
if (newName === '' || newName === previousValue) return;
$(`#current-${id}`).text(newName);
$current.text(newName);
const event = $.Event('rename', { oldName: previousValue, newName, target: button });
$(button).trigger(event);
this.hideRenameControls(id, button);
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { initGlobals } from "../../../testing/globals.definitions";
import {describe, beforeEach, it, expect} from "@jest/globals";
import { initGlobals } from "testing/globals.definitions";
import SubmitFieldButtonComponent from "./submit-field-button";

describe("Submit field button tests", () => {
2 changes: 1 addition & 1 deletion src/frontend/components/button/lib/submit-field-button.ts
Original file line number Diff line number Diff line change
@@ -90,7 +90,6 @@ export default class SubmitFieldButton {
url: this.getURL(data),
data: {data: mytext, csrf_token: data.csrfToken}
}).done(() => {
// eslint-disable-next-line no-alert
alert('Tree has been updated')
});
}
@@ -127,6 +126,7 @@ export default class SubmitFieldButton {
* @returns The URL for the tree API
*/
private getURL(data:JQuery.PlainObject):string {
// @ts-expect-error - This is a global variable
if (window.test) return "";

const devEndpoint = window.siteConfig && window.siteConfig.urls.treeApi;
12 changes: 7 additions & 5 deletions src/frontend/components/dashboard/lib/react/app.tsx
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ import RGL, { WidthProvider } from "react-grid-layout";
import Header from "./Header";
import Widget from './Widget';
import Footer from "./Footer";
import { sidebarObservable } from '../../../sidebar/lib/sidebarObservable';
import { sidebarObservable } from 'components/sidebar/lib/sidebarObservable';

declare global {
interface Window {
@@ -257,8 +257,9 @@ class App extends React.Component<any, any> {
return false;
}

renderModal = () => (
<Modal
renderModal = () =>{
// @ts-expect-error "Modal is not a valid component"
return (<Modal
isOpen={this.state.editModalOpen}
onRequestClose={this.closeModal}
style={modalStyle}
@@ -286,7 +287,7 @@ class App extends React.Component<any, any> {
</div>
</div>
</Modal>
)
)}

overWriteSubmitEventListener = () => {
const formContainer = document.getElementById("ld-form-container");
@@ -320,6 +321,7 @@ class App extends React.Component<any, any> {
/>}
{this.renderModal()}
<div className="content-block__main">
{// @ts-expect-error "ReactGridLayout is not a valid JSX element"
<ReactGridLayout
className={`content-block__main-content ${this.props.readOnly ? "" : "react-grid-layout--editable"}`}
isDraggable={!this.props.readOnly}
@@ -332,7 +334,7 @@ class App extends React.Component<any, any> {
{...this.props.gridConfig}
>
{this.generateDOM()}
</ReactGridLayout>
</ReactGridLayout>}
</div>
{this.props.hideMenu ? null : <Footer
addWidget={this.addWidget}
2 changes: 0 additions & 2 deletions src/frontend/components/data-table/lib/component.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-this-alias */

import { Component, initializeRegisteredComponents } from 'component'
import 'datatables.net-bs4'
@@ -714,7 +713,6 @@ class DataTableComponent extends Component {
I have tried manually changing the DOM, as well as the methods already present in the code, and I currently believe there is a bug within the DataTables button
code that is meaning that this won't change (although I am open to the fact that I am being a little slow and missing something glaringly obvious).
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
toggleFullScreenMode(buttonElement) {
const table = document.querySelector("table.data-table");
const currentTable = $(table);
Original file line number Diff line number Diff line change
@@ -63,7 +63,6 @@ class CalcFieldsComponent extends Component {
});

// Evaluate the code with the values
// eslint-disable-next-line no-undef
var func = fengari.load(code)()
var first = vars.shift()
// Use apply() to be able to pass the params as a single array. The
2 changes: 0 additions & 2 deletions src/frontend/components/form-group/common/bootstrap-select.js
Original file line number Diff line number Diff line change
@@ -12,8 +12,6 @@ export const refreshSelects = (el)=>{
ruleFilterSelect.data("live-search","true");
ruleFilterSelect.selectpicker();
});

// eslint-disable-next-line @typescript-eslint/no-unused-vars
el.on("afterCreateRuleOperators.queryBuilder", (e, rule, operators) => {
const operatorSelect = $(rule.$el.find(`select[name=${rule.id}_operator]`));
if(!operatorSelect || !operatorSelect[0]) {
1 change: 0 additions & 1 deletion src/frontend/components/form-group/filter/lib/component.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-this-alias */
import { Component } from 'component'
import '@lol768/jquery-querybuilder-no-eval/dist/js/query-builder.standalone.min'
import 'bootstrap-select/dist/js/bootstrap-select'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import initDateField from "../../../datepicker/lib/helper";
import initDateField from "components/datepicker/lib/helper";

class DateComponent {
readonly type = 'date';
Original file line number Diff line number Diff line change
@@ -83,7 +83,10 @@ class DocumentComponent {

async handleAjaxUpload(uri: string, csrf_token: string, file: File) {
try {
if (!file) throw this.showException(new Error('No file provided'));
if (!file) {
this.showException(new Error('No file provided'));
return;
}

const fileData = formdataMapper({ file, csrf_token });

Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ class FileComponent {
const dropTarget = this.el.closest('.file-upload');
if (dropTarget) {
const dragOptions = { allowMultiple: false };
(dropTarget as any).filedrag(dragOptions).on('onFileDrop', (ev, file) => { // eslint-disable-line @typescript-eslint/no-explicit-any
(dropTarget as any).filedrag(dragOptions).on('onFileDrop', (ev, file) => {
this.handleFormUpload(file);
});
} else {
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-this-alias */
import { Component } from 'component'
import { logging } from 'logging'
import { initValidationOnField } from 'validation'
3 changes: 2 additions & 1 deletion src/frontend/components/help-view/lib/component.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import "../../../testing/globals.definitions";
import "testing/globals.definitions";
import HelpView from "./component";
import {describe, expect, it} from "@jest/globals";

class TestHelpView extends HelpView {
public get button() {
2 changes: 1 addition & 1 deletion src/frontend/components/markdown/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getComponentElements, initializeComponent } from "../../js/lib/component";
import { getComponentElements, initializeComponent } from "component";

export default (scope) => {
if (getComponentElements(scope, ".js-markdown-section").length === 0) return;
2 changes: 1 addition & 1 deletion src/frontend/components/markdown/lib/component.js
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ class MarkdownComponent extends Component {

renderMarkdown(md) {
const mdEncoded = $('<span>').text(md).html()
return marked(mdEncoded);
return marked(mdEncoded, {async: false});
}

initMarkdownEditor() {
1 change: 0 additions & 1 deletion src/frontend/components/modal/lib/component.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-this-alias */
import { Component } from 'component'
import { modal } from './modal'
import { Frame } from './frame'
Loading