Skip to content

Commit

Permalink
fix merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
yesil committed Jan 10, 2025
1 parent e498d50 commit 49db0a1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions studio/src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ export const ANALYTICS_LINK_IDS = [
// TODO remove these?
export const EVENT_CHANGE = 'change';
export const EVENT_INPUT = 'input';

export const EVENT_OST_SELECT = 'ost-select';
1 change: 1 addition & 0 deletions studio/src/editor-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ export default class EditorPanel extends LitElement {

handleKeyDown(event) {
if (event.code === 'Escape') this.close();
if (!event.ctrlKey) return;
if (event.code === 'ArrowLeft' && event.shiftKey)
this.updatePosition('left');
if (event.code === 'ArrowRight' && event.shiftKey)
Expand Down
3 changes: 1 addition & 2 deletions studio/src/rte/ost.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { html } from 'lit';
import { CHECKOUT_CTA_TEXTS } from '../constants.js';
import { EVENT_OST_SELECT } from '../events.js';
import { CHECKOUT_CTA_TEXTS, EVENT_OST_SELECT } from '../constants.js';

let ostRoot = document.getElementById('ost');
let closeFunction;
Expand Down
3 changes: 2 additions & 1 deletion studio/src/rte/rte-field.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
} from './ost.js';

import prosemirrorStyles from './prosemirror.css.js';
import { EVENT_OST_SELECT } from '../events.js';
import { EVENT_OST_SELECT } from '../constants.js';
import throttle from '../utils/throttle.js';

const CUSTOM_ELEMENT_CHECKOUT_LINK = 'checkout-link';
Expand Down Expand Up @@ -697,6 +697,7 @@ class RteField extends LitElement {
}

#updateLength() {
console.log(this.editorView.dom.innerText);
this.length = this.editorView.dom.innerText.length;
}

Expand Down
2 changes: 1 addition & 1 deletion studio/test/rte/ost.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect } from '@esm-bundle/chai';
import sinon from 'sinon';

import { EVENT_OST_SELECT } from '../../src/events.js';
import { EVENT_OST_SELECT } from '../../src/constants.js';

describe('onSelect', () => {
let dispatchEventStub;
Expand Down

0 comments on commit 49db0a1

Please sign in to comment.