-
Notifications
You must be signed in to change notification settings - Fork 72
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
feature(frontend): Automate Tab - Deep Link Technique #2791
Conversation
const onSwitchChange = useCallback((name: CliCommandOption, isEnabled: boolean) => { | ||
setEnabledOptions(prev => ({...prev, [name]: isEnabled})); | ||
}, []); | ||
const Controls = ({onChange, test, environmentId}: IProps) => { |
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.
Even if it's bad for the moment, it is better to keep using a standard way of handling forms, we can update this to use a new way in the near future
</S.Description> | ||
</S.SubtitleContainer> | ||
<S.CodeContainer data-cy="file-viewer-code-container"> | ||
<FramedCodeBlock value={example} language="yaml" title="Collector Configuration" /> |
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.
Using new Framed Code Block component
</SyntaxHighlighter> | ||
</S.CodeContainer> | ||
<div data-cy="file-viewer-code-container"> | ||
<FramedCodeBlock title={subtitle} value={data} language={language} /> |
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.
Using new code block component
// eslint-disable-next-line no-restricted-exports | ||
export {default} from './CodeBlock'; | ||
export {FramedCodeBlock}; |
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.
I used this exporting format here, I think we can think of moving to this version, but looking for suggestions
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.
Looks good!
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.
Looks good. Minor comments
// eslint-disable-next-line no-restricted-exports | ||
export {default} from './CodeBlock'; | ||
export {FramedCodeBlock}; |
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.
Looks good!
format: CliCommandFormat.Pretty, | ||
}} | ||
layout="horizontal" | ||
name="DEEP_LINK" |
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.
DEEP_LINK?
export const EntryContainer = styled.div` | ||
// align-items: center; | ||
// display: grid; | ||
// justify-content: center; | ||
// grid-template-columns: 1fr auto; | ||
// margin-bottom: 8px; | ||
`; |
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.
Do we want this?
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.
I found myself almost copying the same input we use for headers, I think we can go back to think if we could have a component library for input management so we don't have to write them from scratch every time 🥴
// import {ReadOutlined} from '@ant-design/icons'; | ||
// import {CLI_RUNNING_TESTS_URL} from 'constants/Common.constants'; |
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.
👀
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.
I believe this will be soon added, but I'm removing this code for the moment
Updates and fixes moved to this PR #2791 |
This PR adds the deep link technique to the automate tab. It also improves parts of the codes and fixes bugs.
Changes
Fixes
Checklist
https://www.loom.com/share/3763538b229e46e88606172beb5ddabb