refactor(flows): update copy to improve usability (#18516)

pull/18544/head
alexpaxton 2020-06-16 12:48:00 -07:00 committed by GitHub
parent ea322d8286
commit 42e8a2e06d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 11 deletions

View File

@ -42,7 +42,6 @@ const NotebookPanelHeader: FC<HeaderProps> = ({index, controls}) => {
const {pipes, removePipe, movePipe} = useContext(NotebookContext)
const canBeMovedUp = index > 0
const canBeMovedDown = index < pipes.length - 1
const canBeRemoved = index !== 0
const moveUp = useCallback(
canBeMovedUp ? () => movePipe(index, index - 1) : null,
@ -52,10 +51,7 @@ const NotebookPanelHeader: FC<HeaderProps> = ({index, controls}) => {
canBeMovedDown ? () => movePipe(index, index + 1) : null,
[index, pipes]
)
const remove = useCallback(canBeRemoved ? () => removePipe(index) : null, [
index,
pipes,
])
const remove = useCallback(() => removePipe(index), [index, pipes])
return (
<div className="notebook-panel--header">

View File

@ -80,8 +80,8 @@ export const NotebookProvider: FC = ({children}) => {
pipes.filter(p => p.type === 'query').length
) {
pipe.queries[0].text =
'// tip: use the __PREVIOUS_RESULT__ variable to link your queries\n\n' +
pipe.queries[0].text
pipe.queries[0].text +
'\n\n// tip: use the __PREVIOUS_RESULT__ variable to use results from the previous cell'
}
if (pipes.length && pipe.type !== 'query') {

View File

@ -6,14 +6,14 @@ register({
type: 'query',
priority: 1,
component: View,
button: 'Custom Script',
button: 'Flux Script',
initial: {
panelVisibility: 'visible',
panelHeight: 200,
activeQuery: 0,
queries: [
{
text: '',
text: '// Write Flux script here',
editMode: 'advanced',
builderConfig: {
buckets: [],

View File

@ -118,7 +118,7 @@ const Visualization: FC<PipeProp> = ({
data={data}
onUpdate={onUpdate}
resizingEnabled={!!results.raw}
emptyText="No data to visualize"
emptyText="This cell will visualize results from the previous cell"
emptyIcon={IconFont.BarChart}
toggleVisibilityEnabled={false}
>

View File

@ -29,7 +29,7 @@ const initialState: AppState = {
showTemplateControlBar: false,
timeZone: 'Local',
navBarState: 'collapsed',
notebookMiniMapState: 'expanded',
notebookMiniMapState: 'collapsed',
},
}