diff --git a/webpack/assets/javascripts/react_app/components/ConfigReports/DiffModal/__tests__/DiffModal.test.js b/webpack/assets/javascripts/react_app/components/ConfigReports/DiffModal/__tests__/DiffModal.test.js
index 1aae849a671..b7f867a1240 100644
--- a/webpack/assets/javascripts/react_app/components/ConfigReports/DiffModal/__tests__/DiffModal.test.js
+++ b/webpack/assets/javascripts/react_app/components/ConfigReports/DiffModal/__tests__/DiffModal.test.js
@@ -15,7 +15,7 @@ const fixtures = {
changeViewType: changeState,
},
};
-configure({ testIdAttribute: 'data-ouia-component-id'})
+configure({ testIdAttribute: 'data-ouia-component-id' });
describe('DiffModal', () => {
describe('rendering', () => {
diff --git a/webpack/assets/javascripts/react_app/components/DiffView/Diff.fixtures.js b/webpack/assets/javascripts/react_app/components/DiffView/Diff.fixtures.js
index f93ffe96478..fe2f00f96d5 100644
--- a/webpack/assets/javascripts/react_app/components/DiffView/Diff.fixtures.js
+++ b/webpack/assets/javascripts/react_app/components/DiffView/Diff.fixtures.js
@@ -30,8 +30,8 @@ export const patchMock = {
};
export const fixtures = {
- 'render DiffView w/oldText & newText': diffMock,
- 'render DiffView w/Patch': patchMock,
+ diffMock,
+ patchMock,
};
export const PF_SELECTED = 'pf-m-selected';
diff --git a/webpack/assets/javascripts/react_app/components/DiffView/DiffView.test.js b/webpack/assets/javascripts/react_app/components/DiffView/DiffView.test.js
index bd01f933647..a2507bf4d59 100644
--- a/webpack/assets/javascripts/react_app/components/DiffView/DiffView.test.js
+++ b/webpack/assets/javascripts/react_app/components/DiffView/DiffView.test.js
@@ -1,9 +1,26 @@
+import React from 'react';
import { fixtures } from './Diff.fixtures';
-import { testComponentSnapshotsWithFixtures } from '../../common/testHelpers';
+import { render, screen } from '@testing-library/react';
+import '@testing-library/jest-dom/extend-expect';
import DiffView from './DiffView';
describe('DiffView', () => {
- describe('rendering', () =>
- testComponentSnapshotsWithFixtures(DiffView, fixtures));
+ describe('rendering', () => {
+ it('render DiffView w/oldText & newText', () => {
+ render()
+ const table = screen.getByRole('table')
+
+ expect(table).toHaveClass("diff-split")
+ expect(screen.getByText('hello there friend')).toBeInTheDocument()
+ })
+
+ it('render DiffView w/Patch', () => {
+ render()
+ const table = screen.getByRole('table')
+
+ expect(table).toHaveClass("diff-unified")
+ expect(screen.getByText('fooo')).toBeInTheDocument()
+ })
+ })
});
diff --git a/webpack/assets/javascripts/react_app/components/DiffView/__snapshots__/DiffView.test.js.snap b/webpack/assets/javascripts/react_app/components/DiffView/__snapshots__/DiffView.test.js.snap
deleted file mode 100644
index 84dc24525dc..00000000000
--- a/webpack/assets/javascripts/react_app/components/DiffView/__snapshots__/DiffView.test.js.snap
+++ /dev/null
@@ -1,90 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`DiffView rendering render DiffView w/Patch 1`] = `
-
-
-
-`;
-
-exports[`DiffView rendering render DiffView w/oldText & newText 1`] = `
-
-`;
diff --git a/webpack/assets/javascripts/react_app/components/DiffView/diffview.scss b/webpack/assets/javascripts/react_app/components/DiffView/diffview.scss
index e12c314ae9f..9609ce3bcaa 100644
--- a/webpack/assets/javascripts/react_app/components/DiffView/diffview.scss
+++ b/webpack/assets/javascripts/react_app/components/DiffView/diffview.scss
@@ -1,6 +1,4 @@
#diff-toggle-buttons {
- margin-bottom: 5px;
-
.diff-button {
text-transform: capitalize;
}
diff --git a/webpack/assets/javascripts/react_app/components/Editor/Editor.js b/webpack/assets/javascripts/react_app/components/Editor/Editor.js
index cca90d77ab4..31f648ef7c4 100644
--- a/webpack/assets/javascripts/react_app/components/Editor/Editor.js
+++ b/webpack/assets/javascripts/react_app/components/Editor/Editor.js
@@ -1,7 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Alert, AlertActionCloseButton } from '@patternfly/react-core';
-
import { noop } from '../../common/helpers';
import DiffView from '../DiffView/DiffView';
import EditorView from './components/EditorView';
@@ -11,6 +10,7 @@ import {
EDITOR_THEMES,
EDITOR_KEYBINDINGS,
EDITOR_MODES,
+ EDITOR_TAB_NAMES,
} from './EditorConstants';
import './editor.scss';
@@ -185,19 +185,19 @@ class Editor extends React.Component {
{...editorViewProps}
key="editorPreview"
name={editorNameTab.preview}
- isSelected={selectedView === 'preview'}
+ isSelected={selectedView === EDITOR_TAB_NAMES.preview}
className="ace_editor_form ace_preview"
/>
({
});
const fixtures = {
- 'renders editor': editorOptions,
+ renders: editorOptions,
};
+const renderEditor = (props = fixtures.renders) => render();
+
describe('Editor', () => {
- jest.useFakeTimers();
- describe('rendering', () =>
- testComponentSnapshotsWithFixtures(Editor, fixtures));
+ describe('rendering', () => {
+ const getAceEditors = () => screen.getAllByRole('textbox', { name: 'Cursor at row 1' })
+
+ it('renders', () => {
+ renderEditor();
+
+ expect(screen.getByText(' />')).toBeInTheDocument();
+ expect(getAceEditors().length).toBe(2);
+ });
+ it('re-renders', () => {
+ const { rerender } = renderEditor();
+ const props = { ...editorOptions, ...didMountStubs() };
+ rerender();
+ expect(getAceEditors().length).toBe(2);
+ });
+ });
describe('triggering', () => {
+ const getTabById = id =>
+ screen.getAllByRole('presentation', { current: "page" })
+ .find(tab => (tab.getAttribute('id') || '').match(id));
+
it('should trigger input view', async () => {
const props = { ...editorOptions, ...didMountStubs() };
- const component = mount();
- await act(async () => jest.advanceTimersByTime(1000));
- expect(
- component
- .find('li[role="presentation"]')
- .at(0)
- .hasClass('active')
- ).toBe(true);
+ renderEditor(props);
+ const inputTab = getTabById('input-navitem');
+
+ expect(inputTab).toBeInTheDocument();
+ expect(inputTab.parentElement).toHaveClass('pf-m-current');
+ expect(inputTab).toHaveTextContent('Editor');
});
it('should trigger input view with no template', async () => {
const props = {
@@ -40,9 +57,11 @@ describe('Editor', () => {
...didMountStubs(),
data: { ...editorOptions.data, template: null },
};
- const component = mount();
- await act(async () => jest.advanceTimersByTime(1000));
- expect(component.props().template).toBe(' />');
+ renderEditor(props);
+ const aceEditors = document.querySelectorAll('.ace_editor_form');
+ const hasTemplateText = Array.from(aceEditors).some(container => container.textContent.includes(' />'));
+
+ expect(hasTemplateText).toBe(false);
});
it('should trigger diff view', async () => {
const props = {
@@ -50,14 +69,12 @@ describe('Editor', () => {
...didMountStubs(),
selectedView: 'diff',
};
- const component = mount();
- await act(async () => jest.advanceTimersByTime(1000));
- expect(
- component
- .find('li[role="presentation"]')
- .at(1)
- .hasClass('active')
- ).toBe(true);
+ renderEditor(props);
+ const diffTab = getTabById('diff-navitem');
+
+ expect(diffTab).toBeInTheDocument();
+ expect(diffTab.parentElement).toHaveClass('pf-m-current');
+ expect(diffTab).toHaveTextContent('Changes');
});
it('should trigger preview view', async () => {
const props = {
@@ -66,18 +83,14 @@ describe('Editor', () => {
selectedView: 'preview',
isRendering: true,
};
- const wrapper = mount();
- wrapper.find('button.close').simulate('click');
- await act(async () => jest.advanceTimersByTime(1000));
- const component = mount();
- await act(async () => jest.advanceTimersByTime(1000));
-
- expect(
- component
- .find('li[role="presentation"]')
- .at(2)
- .hasClass('active')
- ).toBe(true);
+ renderEditor(props);
+ const closeButton = screen.queryByLabelText(/close danger alert/i);
+
+ if (closeButton) await act(async () => await fireEvent.click(closeButton));
+ const previewTab = getTabById('preview-navitem');
+
+ expect(previewTab).toBeInTheDocument();
+ expect(previewTab.parentElement).toHaveClass('pf-m-current');
});
});
it('should trigger hidden value editor', async () => {
@@ -88,20 +101,29 @@ describe('Editor', () => {
isRendering: true,
isMasked: true,
};
- const wrapper = mount();
- await act(async () => jest.advanceTimersByTime(1000));
- expect(wrapper.find('.mask-editor').exists()).toBe(true);
+ renderEditor(props);
+ const maskedEditor = document.querySelector('.mask-editor');
+
+ expect(maskedEditor).toBeInTheDocument();
});
it('textarea disappears if readOnly', async () => {
+ const getTextAreasHidden = () => document.querySelectorAll('textarea.hidden')
const props = {
...editorOptions,
...didMountStubs(),
selectedView: 'input',
+ readOnly: false,
};
- const wrapper = mount();
- await act(async () => jest.advanceTimersByTime(1000));
- expect(wrapper.find('textarea.hidden').exists()).toBe(true);
- wrapper.setProps({ readOnly: true });
- expect(wrapper.find('textarea.hidden').exists()).toBe(false);
+ const { rerender } = renderEditor(props);
+
+ expect(getTextAreasHidden().length).toBe(1);
+
+ const newProps = {
+ ...props,
+ readOnly: true,
+ };
+ rerender();
+
+ expect(getTextAreasHidden().length).toBe(0);
});
});
diff --git a/webpack/assets/javascripts/react_app/components/Editor/__tests__/__snapshots__/Editor.test.js.snap b/webpack/assets/javascripts/react_app/components/Editor/__tests__/__snapshots__/Editor.test.js.snap
deleted file mode 100644
index 0aeefe79f77..00000000000
--- a/webpack/assets/javascripts/react_app/components/Editor/__tests__/__snapshots__/Editor.test.js.snap
+++ /dev/null
@@ -1,176 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Editor rendering renders editor 1`] = `
-
-
- }
- className=""
- id="preview_error_toast"
- ouiaId="preview_error_toast"
- title=""
- variant="danger"
- />
-
-
-
-
-
-
-
-
-
-`;
diff --git a/webpack/assets/javascripts/react_app/components/Editor/__tests__/__snapshots__/integration.test.js.snap b/webpack/assets/javascripts/react_app/components/Editor/__tests__/__snapshots__/integration.test.js.snap
deleted file mode 100644
index 0dde8253abe..00000000000
--- a/webpack/assets/javascripts/react_app/components/Editor/__tests__/__snapshots__/integration.test.js.snap
+++ /dev/null
@@ -1,130 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Editor integration test should flow: entered fullscreen 1`] = `
-Object {
- "action": Array [
- Array [
- Object {
- "type": "EDITOR_MODAL_TOGGLE",
- },
- ],
- ],
- "state": Object {
- "editor": Object {
- "autocompletion": true,
- "diffViewType": "split",
- "editorName": "editor",
- "errorText": "",
- "filteredHosts": Array [],
- "hosts": Array [],
- "isFetchingHosts": false,
- "isLoading": true,
- "isMasked": false,
- "isMaximized": true,
- "isRendering": true,
- "isSearchingHosts": false,
- "isSelectOpen": false,
- "keyBinding": "Default",
- "kind": "",
- "liveAutocompletion": false,
- "mode": "Ruby",
- "previewResult": "",
- "readOnly": false,
- "renderedEditorValue": "",
- "searchQuery": "",
- "selectedHost": Object {
- "id": "",
- "name": "",
- },
- "selectedView": "preview",
- "showError": false,
- "templateClass": undefined,
- "theme": "Monokai",
- "value": " />",
- },
- },
-}
-`;
-
-exports[`Editor integration test should flow: initial state 1`] = `
-Object {
- "editor": Object {
- "autocompletion": true,
- "diffViewType": "split",
- "editorName": "editor",
- "errorText": "",
- "filteredHosts": Array [],
- "hosts": Array [],
- "isFetchingHosts": false,
- "isLoading": false,
- "isMasked": false,
- "isMaximized": false,
- "isRendering": false,
- "isSearchingHosts": false,
- "isSelectOpen": false,
- "keyBinding": "Default",
- "kind": "",
- "liveAutocompletion": false,
- "mode": "Ruby",
- "previewResult": "",
- "readOnly": false,
- "renderedEditorValue": "",
- "searchQuery": "",
- "selectedHost": Object {
- "id": "",
- "name": "",
- },
- "selectedView": "input",
- "showError": false,
- "templateClass": undefined,
- "theme": "Monokai",
- "value": " />",
- },
-}
-`;
-
-exports[`Editor integration test should flow: switched to preview view 1`] = `
-Object {
- "action": Array [
- Array [
- Object {
- "type": "EDITOR_SHOW_LOADING",
- },
- ],
- ],
- "state": Object {
- "editor": Object {
- "autocompletion": true,
- "diffViewType": "split",
- "editorName": "editor",
- "errorText": "",
- "filteredHosts": Array [],
- "hosts": Array [],
- "isFetchingHosts": false,
- "isLoading": true,
- "isMasked": false,
- "isMaximized": false,
- "isRendering": true,
- "isSearchingHosts": false,
- "isSelectOpen": false,
- "keyBinding": "Default",
- "kind": "",
- "liveAutocompletion": false,
- "mode": "Ruby",
- "previewResult": "",
- "readOnly": false,
- "renderedEditorValue": "",
- "searchQuery": "",
- "selectedHost": Object {
- "id": "",
- "name": "",
- },
- "selectedView": "preview",
- "showError": false,
- "templateClass": undefined,
- "theme": "Monokai",
- "value": " />",
- },
- },
-}
-`;
diff --git a/webpack/assets/javascripts/react_app/components/Editor/__tests__/integration.test.js b/webpack/assets/javascripts/react_app/components/Editor/__tests__/integration.test.js
index bc30f74c525..5c7296d3b22 100644
--- a/webpack/assets/javascripts/react_app/components/Editor/__tests__/integration.test.js
+++ b/webpack/assets/javascripts/react_app/components/Editor/__tests__/integration.test.js
@@ -1,46 +1,50 @@
import React from 'react';
-
-import IntegrationTestHelper from '../../../common/IntegrationTestHelper';
+import { act, screen, fireEvent } from '@testing-library/react';
+import { rtlHelpers } from '../../../common/testHelpers';
+import '@testing-library/jest-dom/extend-expect';
import { editorOptions, serverRenderResponse } from '../Editor.fixtures';
import Editor, { reducers } from '../index';
import * as EditorActions from '../EditorActions'
-
-jest.mock('../../../redux/API');
+import { API } from '../../../redux/API';
+
+jest.mock('react-ace', () => {
+ return function MockReactAce(props) {
+ return (
+
- }
- id="editor-modal"
- isOpen={false}
- onClose={[Function]}
- ouiaId="editor-modal-component"
- ouiaSafe={true}
- position="top"
- showClose={true}
- title=""
- titleIconVariant={null}
- titleLabel=""
- variant="primary"
->
-
-
-
-
-`;
-
-exports[`EditorModal should render renders EditorModal editor 1`] = `
-
-
-
-
-
- }
- id="editor-modal"
- isOpen={false}
- onClose={[Function]}
- ouiaId="editor-modal-component"
- ouiaSafe={true}
- position="top"
- showClose={true}
- title=""
- titleIconVariant={null}
- titleLabel=""
- variant="primary"
->
-
-
-`;
diff --git a/webpack/assets/javascripts/react_app/components/Editor/components/__tests__/__snapshots__/EditorNavbar.test.js.snap b/webpack/assets/javascripts/react_app/components/Editor/components/__tests__/__snapshots__/EditorNavbar.test.js.snap
deleted file mode 100644
index 8aecab83ca1..00000000000
--- a/webpack/assets/javascripts/react_app/components/Editor/components/__tests__/__snapshots__/EditorNavbar.test.js.snap
+++ /dev/null
@@ -1,139 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`EditorNavbar rendring renders EditorNavbar 1`] = `
-
-
-
-
-`;
diff --git a/webpack/assets/javascripts/react_app/components/Editor/components/__tests__/__snapshots__/EditorOptions.test.js.snap b/webpack/assets/javascripts/react_app/components/Editor/components/__tests__/__snapshots__/EditorOptions.test.js.snap
deleted file mode 100644
index cefa196adff..00000000000
--- a/webpack/assets/javascripts/react_app/components/Editor/components/__tests__/__snapshots__/EditorOptions.test.js.snap
+++ /dev/null
@@ -1,138 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`EditorOptions EditorOptions renders EditorOptions 1`] = `
-
-
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-`;
diff --git a/webpack/assets/javascripts/react_app/components/Editor/components/__tests__/__snapshots__/EditorRadioButton.test.js.snap b/webpack/assets/javascripts/react_app/components/Editor/components/__tests__/__snapshots__/EditorRadioButton.test.js.snap
deleted file mode 100644
index b308cb378da..00000000000
--- a/webpack/assets/javascripts/react_app/components/Editor/components/__tests__/__snapshots__/EditorRadioButton.test.js.snap
+++ /dev/null
@@ -1,12 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`EditorRadioButton renders EditorRadioButton 1`] = `
-
- Editor
-
-`;
diff --git a/webpack/assets/javascripts/react_app/components/Editor/components/__tests__/__snapshots__/EditorSettings.test.js.snap b/webpack/assets/javascripts/react_app/components/Editor/components/__tests__/__snapshots__/EditorSettings.test.js.snap
deleted file mode 100644
index aa97510bb3d..00000000000
--- a/webpack/assets/javascripts/react_app/components/Editor/components/__tests__/__snapshots__/EditorSettings.test.js.snap
+++ /dev/null
@@ -1,545 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`EditorSettings renders EditorSettings 1`] = `
-
-
-
-
- Syntax
-
-
-
- Ruby
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Keybind
-
-
-
- vim
-
-
-
-
-
-
-
-
-
-
- Theme
-
-
-
- Github
-
-
-
-
-
-
-
-
-
- Autocompletion
-
-
-
-
-
-
-
- Live Autocompletion
-
-
-
-
-
-
- }
- enableFlip={false}
- hasAutoWidth={true}
- headerContent="Settings"
- id="cog-popover"
- position="bottom"
- triggerRef={[Function]}
- />
-
-
-
-
-`;
-
-exports[`EditorSettings renders EditorSettings w/preview 1`] = `
-
-
-
-
- Syntax
-
-
-
- Ruby
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Keybind
-
-
-
- vim
-
-
-
-
-
-
-
-
-
-
- Theme
-
-
-
- Github
-
-
-
-
-
-
-
-
-
- Autocompletion
-
-
-
-
-
-
-
- Live Autocompletion
-
-
-
-
-
-
- }
- enableFlip={false}
- hasAutoWidth={true}
- headerContent="Settings"
- id="cog-popover"
- position="bottom"
- triggerRef={[Function]}
- />
-
-
-
-
-`;
diff --git a/webpack/assets/javascripts/react_app/components/Editor/components/__tests__/__snapshots__/EditorView.test.js.snap b/webpack/assets/javascripts/react_app/components/Editor/components/__tests__/__snapshots__/EditorView.test.js.snap
deleted file mode 100644
index 04efc92b83d..00000000000
--- a/webpack/assets/javascripts/react_app/components/Editor/components/__tests__/__snapshots__/EditorView.test.js.snap
+++ /dev/null
@@ -1,101 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`EditorView EditorView renders EditorView 1`] = `
-
-`;
-
-exports[`EditorView EditorView renders EditorView w/vim&mask 1`] = `
-
-`;
diff --git a/webpack/assets/javascripts/react_app/components/Editor/components/editorsafemodecheckbox.scss b/webpack/assets/javascripts/react_app/components/Editor/components/editorsafemodecheckbox.scss
deleted file mode 100644
index 19a62f09e45..00000000000
--- a/webpack/assets/javascripts/react_app/components/Editor/components/editorsafemodecheckbox.scss
+++ /dev/null
@@ -1,10 +0,0 @@
-label.safemode-rendering-checkbox {
- font-size: 14px;
- font-weight: var(--pf-v5-global--link--FontWeight);
- margin: 5px;
- cursor: pointer;
-}
-
-input#safemode-rendering-checkbox {
- margin: 10px 5px 10px 0;
-}
diff --git a/webpack/assets/javascripts/react_app/components/Editor/editor.scss b/webpack/assets/javascripts/react_app/components/Editor/editor.scss
index 892f873326a..35f49f3ddf4 100644
--- a/webpack/assets/javascripts/react_app/components/Editor/editor.scss
+++ b/webpack/assets/javascripts/react_app/components/Editor/editor.scss
@@ -59,38 +59,39 @@
}
}
-.navbar-editor {
- padding: 2px 2px 0 2px !important;
- margin: 10px 0 0 !important;
- height: 40px;
- min-height: unset !important;
-
- .nav-tabs-pf-secondary {
- float: left;
- background: unset !important;
- border-bottom: unset;
- display: flex;
-
- a {
- background: unset !important;
+.navbar.navbar-editor {
+ margin-bottom: unset;
+
+ .pf-v5-c-tabs__list {
+ width: 100%;
+ align-items: center;
+
+ .middle {
+ margin: 0 auto;
}
- .dropdown-menu > li > a:hover {
- background-color: #08c !important;
+ .divider {
+ margin-left: auto;
+ padding: 0 var(--pf-v5-global--spacer--sm);
}
- #editor-select-container {
- width: 260px;
- margin-top: 4px;
+ .divider::before {
+ content: '';
+ display: block;
+ height: 20px;
+ width: 1px;
+ background: #e1e1e1;
+ }
- .select-container-pf {
- border-radius: 2px;
- }
+ .divider + li {
+ display: flex;
+ align-items: flex-end;
}
#outdated-preview-alert {
display: flex;
align-items: center;
+ min-width: 220px;
.alert {
padding: 0;
@@ -109,89 +110,39 @@
}
}
}
-
- #preview-spinner {
- align-items: center;
- display: flex;
- margin-left: 10px;
- }
- }
-
- .btn-group {
- padding: 4px;
}
-
- .btn[disabled] {
- cursor: unset;
- }
-
- #editor-dropdowns {
- float: right;
-
- #diff-toggle-buttons {
- float: left;
- margin-right: 12px;
-
- button {
- outline: none;
- }
+ .pf-v5-c-check.safemode-rendering-checkbox {
+ label {
+ margin-bottom: unset;
+ padding-left: var(--pf-v5-global--spacer--sm);
+ color: var(--pf-v5-global--danger-color--200);
}
-
- #divider {
- float: left;
- font-size: 18px;
- margin-top: 6px;
- font-weight: 200;
- color: #c5c5c5;
- cursor: default;
- user-select: none;
- }
-
- button:enabled :not(#diff-toggle-buttons) {
- color: #1e1d24;
- }
-
- button:hover:enabled :not(#diff-toggle-buttons) {
- color: rgb(75, 79, 94) !important;
+ input[type="checkbox"]{
+ margin-top: unset;
}
}
+}
- .preview_type_ahead {
- float: right;
- padding: 4px;
-
- input {
- width: 275px;
- }
+.pf-v5-c-form {
+ label.pf-v5-c-check__label {
+ margin-bottom: 0 !important;
+ }
- .rbt-aux {
- right: 0;
+ .pf-v5-c-check {
+ input[type="checkbox"],
+ input[type="radio"] {
+ margin-top: 0;
}
}
}
-#hide-btn {
- width: 40px !important;
- font-size: 15px;
- margin-top: -4px;
-}
-
-#fullscreen-btn {
- width: 40px !important;
- font-size: 14px;
- margin-bottom: 2px;
-}
-
-#cog-btn {
- width: 40px !important;
- font-size: 16px;
- margin-bottom: 2px;
-}
-
+#hide-btn,
+#fullscreen-btn,
+#settings-btn,
#import-btn,
#undo-btn {
- width: 40px !important;
- font-size: 16px;
+ display: flex;
+ font-size: var(--pf-v5-global--icon--FontSize--lg);
}
.ace_editor_form {
@@ -242,45 +193,37 @@
}
}
+#outdated-preview-alert .pf-m-warning {
+ padding: 5px 10px;
+ .pf-v5-c-alert__title {
+ font-size: 12px;
+ button {
+ margin-left: 10px;
+ padding: 0;
+ font-size: 12px;
+ }
+ }
+}
+
#preview_error_toast {
margin-bottom: 0;
}
-#cog-popover {
- .cog-popover-dropdown {
- display: flex;
- align-items: center;
-
- .cog-popover-dropdown-title {
- width: 50px;
- margin-bottom: 5px;
- margin-right: 10px;
- font-weight: 600;
- }
-
- .dropdown {
- margin-left: auto;
-
- .dropdown-menu {
- min-width: 80px;
- }
+.ace_tooltip.ace_doc-tooltip {
+ position: absolute;
+}
- #mode-dropdown,
- #keybindings-dropdown,
- #themes-dropdown {
- width: 80px;
- text-align: left;
- .caret {
- position: absolute;
- right: 2px;
- top: 7px;
- }
- }
- }
- }
+.select-container-pf.open {
+ position: static;
+ overflow: visible;
}
-.ace_tooltip.ace_doc-tooltip {
- position: absolute;
+.select-body-container {
+ position: fixed;
+ width: auto;
+ min-width: 200px;
+ max-width: 400px;
+ transform: none;
+ z-index: var(--pf-v5-global--ZIndex--2xl);
}