-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from pioneers/editor-robot-api
Add PiE API autocomplete and tooltips
- Loading branch information
Showing
15 changed files
with
500 additions
and
115 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.ApiLink { | ||
color: blue; | ||
text-decoration: underline; | ||
background-color: transparent; | ||
border: none; | ||
padding: 0; | ||
cursor: pointer; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import './ApiLink.css'; | ||
|
||
/** | ||
* Links to a section of the student API documentation, opening the help window or just jumping to | ||
* the appropriate section if the window is already open. The single text node child of this | ||
* component is used as the link text. | ||
* @param props | ||
* @param props.dest - the section of the docs to jump to. TODO: figure out format | ||
* @param props.code - whether to display the link text in a monospaced font. | ||
*/ | ||
export default function ApiLink({ | ||
dest, | ||
code = false, | ||
children, | ||
}: { | ||
dest: string; | ||
code?: boolean; | ||
children: string; | ||
}) { | ||
const text = `(${children})[${dest}]`; | ||
// Placeholder | ||
return ( | ||
<button type="button" className="ApiLink"> | ||
{code ? <code>{text}</code> : text} | ||
</button> | ||
); | ||
} | ||
/** | ||
* Default props for ApiLink. | ||
*/ | ||
ApiLink.defaultProps = { | ||
/** | ||
* By default, link text is displayed in the inherited font. | ||
*/ | ||
code: false, | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.HighlightedCode-editor .ace_scroller { | ||
width: 100%; | ||
} | ||
.HighlightedCode-editor .ace_cursor { | ||
opacity: 0; | ||
} | ||
.HighlightedCode-editor .ace_marker-layer { | ||
display: none; | ||
} | ||
.HighlightedCode-editor .ace_print-margin { | ||
display: none; | ||
} |
Oops, something went wrong.