From 010ce173c464a71209456795481872d172ca794e Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Tue, 12 Oct 2021 12:25:03 +0100 Subject: [PATCH] address review comments from AniketEngg --- apps/remix-ide-e2e/src/tests/gist.test.ts | 1 - apps/remix-ide/src/app/components/vertical-icons.js | 6 ++---- libs/remix-ui/vertical-icons-panel/README.md | 2 +- .../vertical-icons-panel/src/lib/components/Icon.tsx | 1 - .../src/lib/vertical-icons-context-menu.tsx | 1 - .../vertical-icons-panel/types/vertical-icons-panel.d.ts | 3 +-- 6 files changed, 4 insertions(+), 10 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/gist.test.ts b/apps/remix-ide-e2e/src/tests/gist.test.ts index e91045f002..3216ff4b39 100644 --- a/apps/remix-ide-e2e/src/tests/gist.test.ts +++ b/apps/remix-ide-e2e/src/tests/gist.test.ts @@ -72,7 +72,6 @@ module.exports = { browser.clickLaunchIcon('home') .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) .clickLaunchIcon('filePanel') - // .scrollAndClick('*[data-id="landingPageImportFromGistButton"]') .click('div[title="home"]') .waitForElementVisible('button[data-id="landingPageImportFromGistButton"]') .pause(1000) diff --git a/apps/remix-ide/src/app/components/vertical-icons.js b/apps/remix-ide/src/app/components/vertical-icons.js index 8ecd2a50ac..4541832b68 100644 --- a/apps/remix-ide/src/app/components/vertical-icons.js +++ b/apps/remix-ide/src/app/components/vertical-icons.js @@ -9,10 +9,8 @@ var yo = require('yo-yo') var csjs = require('csjs-inject') var helper = require('../../lib/helper') const globalRegistry = require('../../global/registry') -// const contextMenu = require('../ui/contextMenu') const { Plugin } = require('@remixproject/engine') const EventEmitter = require('events') -// let VERTICALMENU_HANDLE const profile = { name: 'menuicons', @@ -123,7 +121,7 @@ export class VerticalIcons extends Plugin { * Remove an icon from the map * @param {ModuleProfile} profile The profile of the module */ - removeIcon ({ kind, name }) { + removeIcon ({ name }) { if (this.targetProfileForChange[name]) delete this.targetProfileForChange[name] this.renderComponent() } @@ -143,7 +141,7 @@ export class VerticalIcons extends Plugin { * @param {string} name Name of profile of the module to activate */ toggle (name) { - // // TODO: Only keep `this.emit` (issue#2210) + // TODO: Only keep `this.emit` (issue#2210) this.emit('toggleContent', name) this.events.emit('toggleContent', name) } diff --git a/libs/remix-ui/vertical-icons-panel/README.md b/libs/remix-ui/vertical-icons-panel/README.md index 3d01813d07..cf9595a10e 100644 --- a/libs/remix-ui/vertical-icons-panel/README.md +++ b/libs/remix-ui/vertical-icons-panel/README.md @@ -1,6 +1,6 @@ # remix-ui-vertical-icons-panel -This library was generated with [Nx](https://nx.dev). +React library for RemixIde vertical icons Panel ## Running unit tests diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx index 5369b60acc..df7cc71033 100644 --- a/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx +++ b/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx @@ -5,7 +5,6 @@ import VerticalIconsContextMenu from '../vertical-icons-context-menu' // eslint-disable-next-line @typescript-eslint/no-unused-vars import React, { Fragment, SyntheticEvent, useRef, useState } from 'react' import { VerticalIcons } from 'libs/remix-ui/vertical-icons-panel/types/vertical-icons-panel' -// import helper from 'apps/remix-ide/src/lib/helper' interface IconProps { verticalIconPlugin: VerticalIcons diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/vertical-icons-context-menu.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/vertical-icons-context-menu.tsx index 4a3ddb075d..e6a9f080c8 100644 --- a/libs/remix-ui/vertical-icons-panel/src/lib/vertical-icons-context-menu.tsx +++ b/libs/remix-ui/vertical-icons-panel/src/lib/vertical-icons-context-menu.tsx @@ -6,7 +6,6 @@ import React, { Fragment, useEffect, useRef } from 'react' import { VerticalIcons } from '../../types/vertical-icons-panel' export interface VerticalIconsContextMenuProps extends React.DetailedHTMLProps, HTMLDivElement> { - // actions: action[] pageX: number pageY: number profileName: string diff --git a/libs/remix-ui/vertical-icons-panel/types/vertical-icons-panel.d.ts b/libs/remix-ui/vertical-icons-panel/types/vertical-icons-panel.d.ts index ad9924677f..8a4e6107b5 100644 --- a/libs/remix-ui/vertical-icons-panel/types/vertical-icons-panel.d.ts +++ b/libs/remix-ui/vertical-icons-panel/types/vertical-icons-panel.d.ts @@ -43,7 +43,6 @@ interface targetProfileIcons { profile: PassedProfile } export class VerticalIcons extends Plugin { - // constructor(appManager: RemixAppManager) events: EventEmitter appManager: RemixAppManager htmlElement: HTMLDivElement @@ -83,7 +82,7 @@ export class VerticalIcons extends Plugin { * Remove an icon from the map * @param {ModuleProfile} profile The profile of the module */ - removeIcon({ kind, name }: any): void + removeIcon({ name }: any): void /** * Remove active for the current activated icons */