refactor and clean OtherIcons component. small fix to run and deploy

pull/1671/head
Joseph Izang 3 years ago
parent 8052f3aded
commit 2ccff7bacc
  1. 1
      apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts
  2. 15
      libs/remix-ui/vertical-icons-panel/src/lib/components/OtherIcons.tsx
  3. 1
      libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.tsx

@ -40,6 +40,7 @@ module.exports = {
.setValue('*[data-id="modalDialogCustomPromptText"]', 'Remix is cool!')
.assert.elementNotPresent('*[data-id="settingsRemixRunSignMsgHash"]')
.assert.elementNotPresent('*[data-id="settingsRemixRunSignMsgSignature"]')
.pause(2000)
.modalFooterOKClick()
.waitForElementVisible('*[data-id="modalDialogContainer"]', 12000)
.assert.elementPresent('*[data-id="settingsRemixRunSignMsgHash"]')

@ -4,6 +4,13 @@ import { VerticalIcons } from 'libs/remix-ui/vertical-icons-panel/types/vertical
import React from 'react'
import Icon from './Icon'
function customFilter (p: string) {
if (p !== 'settings' && p !== 'pluginManager' &&
p !== 'filePanel' && p !== 'debugger' &&
p !== 'compiler' && p !== 'solidity' &&
p !== 'udapp' && p !== 'testing' && p !== 'solidityStaticAnalysis') return true
return false
}
interface OtherIconsProps {
verticalIconsPlugin: VerticalIcons
itemContextAction: (e: any, name: string, documentation: string) => Promise<void>
@ -11,18 +18,12 @@ interface OtherIconsProps {
removeActive: () => void
}
const profileNames = ['settings', 'pluginManager', 'filePanel', 'debugger', 'compiler', 'solidity', 'udapp', 'testing', 'solidityStaticAnalysis']
function OtherIcons ({ verticalIconsPlugin, itemContextAction, addActive, removeActive }: OtherIconsProps) {
return (
<div id="otherIcons">
{
Object.keys(verticalIconsPlugin.targetProfileForChange)
.filter(function (searchTerm: string) {
for (var key in profileNames) {
if (searchTerm !== key) return true
}
return false
})
.filter(customFilter)
.map(p => (
<Icon
kind={verticalIconsPlugin.targetProfileForChange[p].kind}

@ -87,7 +87,6 @@ export function RemixUiVerticalIconsPanel ({
}, [])
useEffect(() => {
// const found = iconPanelRef.current!.querySelector('#verticalIconsKindudapp')
if (verticalIconsPlugin.targetProfileForChange && verticalIconsPlugin.targetProfileForChange.udapp) {
const doWalkThroughEvent = new Event('doWalkThrough')
document.dispatchEvent(doWalkThroughEvent)

Loading…
Cancel
Save