Skip to content

Commit

Permalink
Fix: Add comments as part of the snippets for consistency (#2735)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElinorW authored Aug 15, 2023
1 parent 17aceb6 commit fdc4792
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/app/views/common/monaco/Monaco.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function Monaco(props: IMonaco) {
}, [monaco]);

return (
<FocusZone disabled={props.extraInfoElement ? false : true}>
<FocusZone disabled= {props.extraInfoElement ? false : true}>
<div className='monaco-editor'>
{props.extraInfoElement}
<ThemeContext.Consumer>
Expand Down
4 changes: 2 additions & 2 deletions src/app/views/query-response/snippets/Snippets.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export const getSnippetStyles = (theme: ITheme) => {
snippetComments: {
color: theme.palette.green,
marginLeft: '28px',
fontFamily: 'Consolas, monospace',
font: '9px',
fontFamily: 'Consolas,"Courier new", monospace',
fontSize: '14px',
lineHeight: '1.5'
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/views/query-response/snippets/snippets-helper.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getTheme, ITheme, Label, Link, PivotItem } from '@fluentui/react';
import { ITheme, Label, Link, PivotItem, getTheme } from '@fluentui/react';
import { useEffect, useState } from 'react';
import { useDispatch } from 'react-redux';

Expand Down Expand Up @@ -88,7 +88,7 @@ function Snippet(props: ISnippetProps) {
}, [sampleQuery.sampleUrl]);

const setCommentSymbol = (): string => {
return language.trim() === 'powershell' ? '#' : '//';
return (language.trim() === 'powershell' || language.trim() === 'python') ? '#' : '//';
}

const trackLinkClickedEvent = (link: string, e:any) => {
Expand Down

0 comments on commit fdc4792

Please sign in to comment.