-
Notifications
You must be signed in to change notification settings - Fork 39
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
status bar #432
base: master
Are you sure you want to change the base?
status bar #432
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\index.js":"1","D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\containers\\AppContainer.js":"2","D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\reducers\\index.js":"3","D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\containers\\MainContainer.js":"4","D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\app.js":"5","D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\reducers\\programsReducer.js":"6","D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\Login.js":"7","D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\EditorAndOutput\\EditorAndOutput.js":"8","D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\Sketches\\index.js":"9","D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\Sketches\\containers\\EditSketchModalContainer.js":"10","D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\common\\OpenPanelButton.js":"11","D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\Sketches\\components\\DropdownButton.js":"12","D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\lib\\sketch.js":"13","D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\TextEditor\\components\\StatusBar.js":"14","D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\TextEditor\\components\\TextEditor.js":"15","D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\common\\ProfilePanel.js":"16","D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\reducers\\uiReducer.js":"17","D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\actions\\uiActions.js":"18","D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\common\\containers\\ProfilePanelContainer.js":"19","D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\TextEditor\\containers\\TextEditorContainer.js":"20"},{"size":764,"mtime":1612404807718,"results":"21","hashOfConfig":"22"},{"size":1623,"mtime":1602724010484,"results":"23","hashOfConfig":"22"},{"size":407,"mtime":1602724010893,"results":"24","hashOfConfig":"22"},{"size":2155,"mtime":1612404807696,"results":"25","hashOfConfig":"22"},{"size":6586,"mtime":1612404807625,"results":"26","hashOfConfig":"22"},{"size":1268,"mtime":1602724010900,"results":"27","hashOfConfig":"22"},{"size":4931,"mtime":1602724006777,"results":"28","hashOfConfig":"22"},{"size":3621,"mtime":1602724006775,"results":"29","hashOfConfig":"22"},{"size":5955,"mtime":1612404807589,"results":"30","hashOfConfig":"22"},{"size":801,"mtime":1602724009096,"results":"31","hashOfConfig":"22"},{"size":789,"mtime":1602724010456,"results":"32","hashOfConfig":"22"},{"size":2280,"mtime":1602724008820,"results":"33","hashOfConfig":"22"},{"size":738,"mtime":1602724010785,"results":"34","hashOfConfig":"22"},{"size":482,"mtime":1613086981399,"results":"35","hashOfConfig":"22"},{"size":11539,"mtime":1613087017437,"results":"36","hashOfConfig":"22"},{"size":10474,"mtime":1613088242026,"results":"37","hashOfConfig":"22"},{"size":1003,"mtime":1613086930261,"results":"38","hashOfConfig":"22"},{"size":634,"mtime":1613086901589,"results":"39","hashOfConfig":"22"},{"size":1259,"mtime":1613087549546,"results":"40","hashOfConfig":"22"},{"size":1564,"mtime":1613087652148,"results":"41","hashOfConfig":"22"},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1xdarae",{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"48","messages":"49","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"50","messages":"51","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"52","messages":"53","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"54","messages":"55","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"56","messages":"57","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"58","messages":"59","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"60","messages":"61","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"62","messages":"63","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"64","messages":"65","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"66","messages":"67","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"68","messages":"69","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"70","messages":"71","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"72","messages":"73","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"74","messages":"75","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"76","messages":"77","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"78","messages":"79","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"80","messages":"81","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\index.js",[],"D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\containers\\AppContainer.js",[],"D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\reducers\\index.js",[],"D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\containers\\MainContainer.js",[],"D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\app.js",[],"D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\reducers\\programsReducer.js",[],"D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\Login.js",[],"D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\EditorAndOutput\\EditorAndOutput.js",[],"D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\Sketches\\index.js",[],"D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\Sketches\\containers\\EditSketchModalContainer.js",[],"D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\common\\OpenPanelButton.js",[],"D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\Sketches\\components\\DropdownButton.js",[],"D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\lib\\sketch.js",[],"D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\TextEditor\\components\\StatusBar.js",[],"D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\TextEditor\\components\\TextEditor.js",[],"D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\common\\ProfilePanel.js",[],"D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\reducers\\uiReducer.js",[],"D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\actions\\uiActions.js",[],"D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\common\\containers\\ProfilePanelContainer.js",[],"D:\\Projects\\TeachLA\\TeachLAFrontend\\src\\components\\TextEditor\\containers\\TextEditorContainer.js",[]] | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
import React from "react"; | ||
import React, { useState } from "react"; | ||
|
||
const StatusBar = (props) => { | ||
const edit = props.editing; | ||
const textStyle = { color: "white" }; | ||
if (props.theme === "light") { | ||
textStyle.color = "black"; | ||
} | ||
return ( | ||
<div className="status-bar-container"> | ||
<p className="status-bar-info"> | ||
{props.editing ? "Editing" : "Viewing"} line: {props.line + 1} col: {props.col + 1}{" "} | ||
<p className="status-bar-info" style={textStyle}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I still think that we could integrate this with our built-in styles with something like this instead:
|
||
{edit ? "Editing" : "Viewing"} line: {props.line + 1} col: {props.col + 1}{" "} | ||
</p> | ||
</div> | ||
); | ||
|
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -316,6 +316,19 @@ class ProfilePanel extends React.Component { | |||
</div> | ||||
); | ||||
|
||||
renderShowStatusBar = () => { | ||||
let onToggle = () => { | ||||
console.log(this.props); | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can remove extraneous logging.
Suggested change
|
||||
this.props.setStatusBar(!this.props.statusBar); | ||||
}; | ||||
return ( | ||||
<div className="panel-button"> | ||||
<button className="statusbar-button" onClick={() => onToggle()}> | ||||
<span> Status Bar</span> | ||||
</button> | ||||
</div> | ||||
); | ||||
}; | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||
renderContent = () => ( | ||||
<div className="panel-content"> | ||||
{this.renderPanelImage()} | ||||
|
@@ -324,6 +337,7 @@ class ProfilePanel extends React.Component { | |||
{this.renderErrorMessage(this.state.displayNameMessage)} | ||||
{this.renderButtons()} | ||||
{this.renderThemeSwitch()} | ||||
{this.renderShowStatusBar()} | ||||
</div> | ||||
); | ||||
|
||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -191,6 +191,5 @@ | |
} | ||
|
||
.status-bar-info { | ||
color: red; | ||
font-size: 25px; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file can be safely deleted. I will add it to our
.gitignore
a little later.