From 2956fc36c725190e71003cd86fdb5429ceaf1327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20BARBIER?= Date: Mon, 19 Feb 2018 14:50:48 +0100 Subject: [PATCH] Simplify source tree --- src/sidebar/app/app.js | 2 +- src/sidebar/app/components/{editor => }/Editor.js | 6 +++--- src/sidebar/app/components/{icons => }/FeedbackIcon.js | 0 src/sidebar/app/components/Footer.js | 8 ++++---- src/sidebar/app/components/Panel.js | 2 +- src/sidebar/app/components/{icons => }/SyncIcon.js | 0 .../editor/data/config.js => data/editorConfig.js} | 0 .../app/{components/editor => }/data/initialContent.js | 0 src/sidebar/app/{ => utils}/constants.js | 0 src/sidebar/app/{ => utils}/editor.js | 0 src/sidebar/app/{ => utils}/theme.js | 0 src/sidebar/app/{ => utils}/utils.js | 0 12 files changed, 9 insertions(+), 9 deletions(-) rename src/sidebar/app/components/{editor => }/Editor.js (97%) rename src/sidebar/app/components/{icons => }/FeedbackIcon.js (100%) rename src/sidebar/app/components/{icons => }/SyncIcon.js (100%) rename src/sidebar/app/{components/editor/data/config.js => data/editorConfig.js} (100%) rename src/sidebar/app/{components/editor => }/data/initialContent.js (100%) rename src/sidebar/app/{ => utils}/constants.js (100%) rename src/sidebar/app/{ => utils}/editor.js (100%) rename src/sidebar/app/{ => utils}/theme.js (100%) rename src/sidebar/app/{ => utils}/utils.js (100%) diff --git a/src/sidebar/app/app.js b/src/sidebar/app/app.js index c33430abb..19d400275 100644 --- a/src/sidebar/app/app.js +++ b/src/sidebar/app/app.js @@ -6,6 +6,6 @@ import Panel from './components/Panel'; import '../static/scss/styles.scss'; // Initialize theming -import './theme.js'; +import './utils/theme.js'; ReactDOM.render(, document.getElementById('notes')); diff --git a/src/sidebar/app/components/editor/Editor.js b/src/sidebar/app/components/Editor.js similarity index 97% rename from src/sidebar/app/components/editor/Editor.js rename to src/sidebar/app/components/Editor.js index 8248d096f..a5a135d2b 100644 --- a/src/sidebar/app/components/editor/Editor.js +++ b/src/sidebar/app/components/Editor.js @@ -1,9 +1,9 @@ import React from 'react'; -import { getPadStats, customizeEditor, insertSelectedText } from '../../editor'; +import { getPadStats, customizeEditor, insertSelectedText } from '../utils/editor'; -import INITIAL_CONFIG from './data/config'; -import INITIAL_CONTENT from './data/initialContent'; +import INITIAL_CONFIG from '../data/editorConfig'; +import INITIAL_CONTENT from '../data/initialContent'; class Editor extends React.Component { constructor(props) { diff --git a/src/sidebar/app/components/icons/FeedbackIcon.js b/src/sidebar/app/components/FeedbackIcon.js similarity index 100% rename from src/sidebar/app/components/icons/FeedbackIcon.js rename to src/sidebar/app/components/FeedbackIcon.js diff --git a/src/sidebar/app/components/Footer.js b/src/sidebar/app/components/Footer.js index 776a3b41f..1ad4b5269 100644 --- a/src/sidebar/app/components/Footer.js +++ b/src/sidebar/app/components/Footer.js @@ -1,11 +1,11 @@ import React from 'react'; import classNames from 'classnames'; -import SyncIcon from './icons/SyncIcon'; +import SyncIcon from './SyncIcon'; -import { formatFooterTime } from '../utils'; -import { SURVEY_PATH } from '../constants'; -import INITIAL_CONTENT from './editor/data/initialContent'; +import { formatFooterTime } from '../utils/utils'; +import { SURVEY_PATH } from '../utils/constants'; +import INITIAL_CONTENT from '../data/initialContent'; const STATES = { diff --git a/src/sidebar/app/components/Panel.js b/src/sidebar/app/components/Panel.js index fe2a73349..9ab227dbb 100644 --- a/src/sidebar/app/components/Panel.js +++ b/src/sidebar/app/components/Panel.js @@ -1,7 +1,7 @@ /* eslint-disable react/jsx-key */ import React from 'react'; -import Editor from './editor/Editor'; +import Editor from './Editor'; import Footer from './Footer'; class Panel extends React.Component { diff --git a/src/sidebar/app/components/icons/SyncIcon.js b/src/sidebar/app/components/SyncIcon.js similarity index 100% rename from src/sidebar/app/components/icons/SyncIcon.js rename to src/sidebar/app/components/SyncIcon.js diff --git a/src/sidebar/app/components/editor/data/config.js b/src/sidebar/app/data/editorConfig.js similarity index 100% rename from src/sidebar/app/components/editor/data/config.js rename to src/sidebar/app/data/editorConfig.js diff --git a/src/sidebar/app/components/editor/data/initialContent.js b/src/sidebar/app/data/initialContent.js similarity index 100% rename from src/sidebar/app/components/editor/data/initialContent.js rename to src/sidebar/app/data/initialContent.js diff --git a/src/sidebar/app/constants.js b/src/sidebar/app/utils/constants.js similarity index 100% rename from src/sidebar/app/constants.js rename to src/sidebar/app/utils/constants.js diff --git a/src/sidebar/app/editor.js b/src/sidebar/app/utils/editor.js similarity index 100% rename from src/sidebar/app/editor.js rename to src/sidebar/app/utils/editor.js diff --git a/src/sidebar/app/theme.js b/src/sidebar/app/utils/theme.js similarity index 100% rename from src/sidebar/app/theme.js rename to src/sidebar/app/utils/theme.js diff --git a/src/sidebar/app/utils.js b/src/sidebar/app/utils/utils.js similarity index 100% rename from src/sidebar/app/utils.js rename to src/sidebar/app/utils/utils.js