Просмотр исходного кода

rename className 'on-edit' to 'editing'

Yuki Takei 3 лет назад
Родитель
Сommit
29bf58064d

+ 2 - 2
packages/app/src/stores/ui.tsx

@@ -76,13 +76,13 @@ const getClassNamesByEditorMode = (editorMode: EditorMode | undefined, isSidebar
   const classNames: string[] = [];
   switch (editorMode) {
     case EditorMode.Editor:
-      classNames.push('on-edit', 'builtin-editor');
+      classNames.push('editing', 'builtin-editor');
       if (isSidebar) {
         classNames.push('editing-sidebar');
       }
       break;
     case EditorMode.HackMD:
-      classNames.push('on-edit', 'hackmd');
+      classNames.push('editing', 'hackmd');
       break;
   }
 

+ 1 - 1
packages/app/src/styles/_old-ios.scss

@@ -1,4 +1,4 @@
-html[old-ios] .layout-root:not(.on-edit) {
+html[old-ios] .layout-root:not(.editing) {
   .grw-navbar {
     position: initial !important;
     top: 0 !important;

+ 2 - 2
packages/app/src/styles/_on-edit.scss

@@ -4,7 +4,7 @@
 @import 'sidebar-wiki';
 
 // global imported
-.layout-root.on-edit {
+.layout-root.editing {
   overflow-y: hidden !important;
 
   .grw-navbar {
@@ -279,7 +279,7 @@
   }
 }
 
-.layout-root.on-edit {
+.layout-root.editing {
   &:not(.growi-layout-fluid) .page-editor-preview-body {
     .wiki {
       max-width: 980px;

+ 1 - 1
packages/app/src/styles/theme/_apply-colors-light.scss

@@ -252,7 +252,7 @@ $dropdown-link-active-bg: $bgcolor-dropdown-link-active;
 }
 
 /*
- * GROWI on-edit
+ * GROWI Editor
  */
 .grw-editor-navbar-bottom {
   background-color: $gray-50;

+ 2 - 2
packages/app/src/styles/theme/_apply-colors.scss

@@ -503,9 +503,9 @@ ul.pagination {
 }
 
 /*
- * GROWI on-edit
+ * GROWI Editor
  */
-.layout-root.on-edit {
+.layout-root.editing {
   .main {
     background-color: darken($bgcolor-global, 2%);
 

+ 2 - 2
packages/app/test/cypress/integration/20-basic-features/use-tools.spec.ts

@@ -54,7 +54,7 @@ context('Modal for page operation', () => {
     });
     cy.getByTestid('page-editor').should('be.visible');
     cy.getByTestid('save-page-btn').click();
-    cy.get('body').should('not.have.class', 'on-edit');
+    cy.get('.layout-root').should('not.have.class', 'editing');
 
     cy.getByTestid('grw-contextual-sub-nav').should('be.visible');
     cy.screenshot(`${ssPrefix}create-today-page`);
@@ -72,7 +72,7 @@ context('Modal for page operation', () => {
     });
     cy.getByTestid('page-editor').should('be.visible');
     cy.getByTestid('save-page-btn').click();
-    cy.get('body').should('not.have.class', 'on-edit');
+    cy.get('layout-root').should('not.have.class', 'editing');
 
     cy.getByTestid('grw-contextual-sub-nav').should('be.visible');
     cy.screenshot(`${ssPrefix}create-page-under-specific-page`);

+ 1 - 1
packages/app/test/cypress/integration/50-sidebar/access-to-side-bar.spec.ts

@@ -60,7 +60,7 @@ context('Access to sidebar', () => {
     cy.get('.CodeMirror textarea').type(content, {force: true});
     cy.screenshot(`${ssPrefix}custom-sidebar-2-custom-sidebar-editor`);
     cy.getByTestid('save-page-btn').click();
-    cy.get('body').should('not.have.class', 'on-edit');
+    cy.get('layout-root').should('not.have.class', 'editing');
 
     // What to do when UserUISettings is not saved in time
     cy.getByTestid('grw-sidebar-nav-primary-custom-sidebar').then(($el) => {