Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update demo to connect with MPI #267

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

isaacguerreir
Copy link
Contributor

No description provided.

Copy link
Collaborator

@guzmanvig guzmanvig left a comment

Choose a reason for hiding this comment

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

Doug said we shouldn't merge this. But reviewed anyway

@@ -17,6 +17,9 @@ const Header = ({ selection, showSelectionMeta, toggleShowSelectionMeta, toggleS
showSelectionMeta={showSelectionMeta}
toggleShowSelectionMeta={toggleShowSelectionMeta}
/>
<ExportToMPI
sendToMPI={sendToMPI}
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: why passing this as a prop instead of just declaring the function here?

@@ -441,3 +483,25 @@ const SidebarFooter = () => (
</p>
</div>
);

const Alert = ({ visible, positive }) => {
if (visible) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

If not visible doesn't return anything? If so, maybe we can remove the prop and do:

this.state.message.visible && <Alert positive={this.state.message.positive} />

if (visible) {
if (positive) {
return (
<Message id="alert-message" positive>
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: a version that uses less code could be something like:

      <Message id="alert-message" positive={positive} negative={!positive}>
        <p>
          { positive ? "Sequence successfully exported to MPI." : "Error exporting sequence to MPI. Try again later".
        </p>
      </Message>

Copy link

@chris-krenz chris-krenz left a comment

Choose a reason for hiding this comment

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

Thanks for chance to review. Looks good to me. Guzman's suggestions seem reasonable.

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.

3 participants