refactor(flows): update copy to improve usability (#18516)
parent
ea322d8286
commit
42e8a2e06d
|
@ -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">
|
||||
|
|
|
@ -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') {
|
||||
|
|
|
@ -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: [],
|
||||
|
|
|
@ -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}
|
||||
>
|
||||
|
|
|
@ -29,7 +29,7 @@ const initialState: AppState = {
|
|||
showTemplateControlBar: false,
|
||||
timeZone: 'Local',
|
||||
navBarState: 'collapsed',
|
||||
notebookMiniMapState: 'expanded',
|
||||
notebookMiniMapState: 'collapsed',
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue