Skip to content
This repository has been archived by the owner on Dec 23, 2021. It is now read-only.

File dropdown on simulator #127

Merged
merged 9 commits into from
Aug 20, 2019
Merged

File dropdown on simulator #127

merged 9 commits into from
Aug 20, 2019

Conversation

LukeSlev
Copy link
Member

Description:

This PR adds a file dropdown on the simulator so users can choose a visible file to run

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Testing:

  • try running different visible files through the drop down

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

const parsedPath = parsePath(props.lastChosen);
const defaultText =
props.lastChosen !== ""
? `Currently running: ${parsedPath[1]}`
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this will be user facing, should we make it a constant and localize it?

@@ -119,6 +142,16 @@ class Simulator extends React.Component<any, IState> {
const image = this.state.play_button ? StopLogo : PlayLogo;
return (
<div className="simulator">
<div className="file-selector">
<Dropdown
label={"hi"}
Copy link
Contributor

@jonathanwangg jonathanwangg Aug 20, 2019

Choose a reason for hiding this comment

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

Forgot to change the placeholder label? Same with styleLabel.

Copy link
Member Author

Choose a reason for hiding this comment

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

true

Copy link
Contributor

@jonathanwangg jonathanwangg left a comment

Choose a reason for hiding this comment

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

Some small suggestions.

@@ -174,6 +210,10 @@ class Simulator extends React.Component<any, IState> {
}
}

protected onSelectBlur(event: React.FocusEvent<HTMLSelectElement>) {
console.log("BLURR", event.currentTarget.value);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should probably be removed

Suggested change
console.log("BLURR", event.currentTarget.value);

});
break;
case "current-file":
console.log("Setting current file", message.state.running_file);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could be removed?

Suggested change
console.log("Setting current file", message.state.running_file);

@LukeSlev LukeSlev merged commit 442569c into dev Aug 20, 2019
@jonathanwangg jonathanwangg deleted the users/t-luslev/file-dropdown branch August 26, 2019 09:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants