You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@age.apache.org by ak...@apache.org on 2023/01/27 21:27:30 UTC
[age-viewer] branch main updated: include editor placeholder and remove title (#106)
This is an automated email from the ASF dual-hosted git repository.
ako pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/age-viewer.git
The following commit(s) were added to refs/heads/main by this push:
new d1eb27a include editor placeholder and remove title (#106)
d1eb27a is described below
commit d1eb27a0b6bb0e6ae14d93eeca777941aa14cd75
Author: marodins <67...@users.noreply.github.com>
AuthorDate: Fri Jan 27 13:27:24 2023 -0800
include editor placeholder and remove title (#106)
---
frontend/src/components/contents/presentations/Editor.jsx | 15 +--------------
.../src/components/editor/presentations/CodeMirror.scss | 4 ++++
.../components/editor/presentations/CodeMirrorWrapper.jsx | 3 +++
3 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/frontend/src/components/contents/presentations/Editor.jsx b/frontend/src/components/contents/presentations/Editor.jsx
index c3f0b86..93ddfd7 100644
--- a/frontend/src/components/contents/presentations/Editor.jsx
+++ b/frontend/src/components/contents/presentations/Editor.jsx
@@ -144,20 +144,7 @@ const Editor = ({
<div className="editor">
<div className="container-fluid editor-area card-header">
<div className="input-group input-style">
- <div style={{
- height: '60px',
- width: '60px',
- color: '#ffffff',
- textAlign: 'left',
- lineHeight: '30px',
- }}
- >
- <spna>
- Query
- <br />
- Editor
- </spna>
- </div>
+
<div id="codeMirrorEditor" className="form-control col-11 editor-code-wrapper">
<CodeMirror
onClick={onClick}
diff --git a/frontend/src/components/editor/presentations/CodeMirror.scss b/frontend/src/components/editor/presentations/CodeMirror.scss
new file mode 100644
index 0000000..aca92b0
--- /dev/null
+++ b/frontend/src/components/editor/presentations/CodeMirror.scss
@@ -0,0 +1,4 @@
+pre.CodeMirror-placeholder.CodeMirror-line-like{
+ color:grey;
+ opacity: 90%;
+}
\ No newline at end of file
diff --git a/frontend/src/components/editor/presentations/CodeMirrorWrapper.jsx b/frontend/src/components/editor/presentations/CodeMirrorWrapper.jsx
index 38b892f..3dc2995 100644
--- a/frontend/src/components/editor/presentations/CodeMirrorWrapper.jsx
+++ b/frontend/src/components/editor/presentations/CodeMirrorWrapper.jsx
@@ -20,7 +20,9 @@
import React, { useRef, useState } from 'react';
import CodeMirror from '@uiw/react-codemirror';
import 'codemirror/keymap/sublime';
+import 'codemirror/addon/display/placeholder';
import 'codemirror/theme/ambiance-mobile.css';
+import './CodeMirror.scss';
import PropTypes from 'prop-types';
const CodeMirrorWrapper = ({
@@ -37,6 +39,7 @@ const CodeMirrorWrapper = ({
options={{
keyMap: 'sublime',
mode: 'cypher',
+ placeholder: 'Create a query...',
tabSize: 4,
lineNumbers: true,
spellcheck: false,