Skip to content

Conversation

@javier-tarazaga
Copy link
Contributor

@javier-tarazaga javier-tarazaga commented Mar 25, 2019

Description of the Change

  • Added a new Event Log panel. In order to put messages into the panel, you simply need to call the eventLog.actions/addEventLogRow with a LogLevel and a message and will render in the panel.
  • Included a button to delete all the current items logged in the panel
  • Added a bunch of styling fixes related to the panels and a few style small modifications to them.
  • Removed icons from the panel header.

Benefits

Now we have a panel in which we can display messages to the user related to things the IDE is doing or whatever we consider relevant adding to it (per example when/if introducing plugins)

Verification Process

  • Run the applications and open the event logger panel at the bottom right corner of the IDE.

# Conflicts:
#	src/components/projecteditor/ProjectEditor.tsx

{ this.isPanelOpen(Panels.Transactions) &&
<Panel icon={ <IconTransactions /> } name='Transactions History' onClose={() => closePanel(Panels.Transactions)} dragging={sidePanelDragging}>
<Panel name='Transactions History' onClose={() => closePanel(Panels.Transactions)} dragging={sidePanelDragging}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question here - is it as intended to remove icons from panels?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeap, it is intended.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added it to the PR description

border-color: transparent;
padding: 5px;
transition: all .15s ease;
border-radius: 0px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this one intended? Buttons in panels now have border-radius again after removing this style

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually not! Let me remove that one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove it from the btnNoBg global style instead.

user-select: none;
display: block;
color: #fff;
line-height: 28px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explorer feels too much compact on non-retina display. I would consider to have line-height at least 24-25px.

Copy link
Contributor Author

@javier-tarazaga javier-tarazaga Mar 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. In fact, I was just trying to see sort of emulate how VS Code line-height was. Let me check with 24

Copy link
Contributor

@Spejbl Spejbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not an issue because of this PR, but when you try to deploy contract on a browser which doesn't have Metamask installed you get this error:

Capture

Variable row is containing this
image

We are probably using some functions from web3 which are not injected without Metamask.

@filippsen
Copy link
Contributor

@Spejbl the previous deployer version contained a runtime check-and-swap action that would choose between the internal web3 object and the externally provided one.

Now, when the account is set to external (or 'metamask' ?), the new deployer is probably assuming window.web3 is always valid.
See also:

./src/services/deployer/deployRunner.ts:37: this.currWeb3 = account.type === 'metamask' ? window.web3 : getWeb3(this.environment.endpoint);

@javier-tarazaga
Copy link
Contributor Author

Thanks @Spejbl for raising that flag but as you said, in fact, I haven't changed that in this PR. Let's add a new issue to the TODO list to make sure this is covered (this will be impacted by @ostap1010 work anyway), but we can set it up as self-reminder to make sure it works as expected.

@javier-tarazaga javier-tarazaga changed the base branch from superblocks-2.0 to 2.0 May 24, 2019 11:59
# Conflicts:
#	src/components/app/App.tsx
#	src/components/app/index.ts
#	src/components/projecteditor/ProjectEditor.tsx
#	src/components/projecteditor/style.less
#	src/models/index.ts
#	src/reducers/index.ts
@javier-tarazaga javier-tarazaga merged commit 14ee50d into SuperblocksHQ:2.0 Aug 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants