Skip to content
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

Onboarding part 3 #6358

Open
wants to merge 23 commits into
base: develop
Choose a base branch
from
Open

Onboarding part 3 #6358

wants to merge 23 commits into from

Conversation

YounixM
Copy link
Member

@YounixM YounixM commented Nov 4, 2024

Summary

Related Issues / PR's

Screenshots

NA

Affected Areas and Manually Tested Areas


Important

Introduce OnboardingV2 component for enhanced onboarding flow with new routes, components, styles, and permissions.

  • Behavior:
    • Introduces OnboardingV2 component in AppRoutes/pageComponents.ts for a new onboarding flow.
    • Adds route for GET_STARTED_V2 in AppRoutes/routes.ts and constants/routes.ts.
    • Updates AppLayout/index.tsx to render full screen for GET_STARTED_V2 path.
  • Components:
    • Adds OnboardingAddDataSource, OnboardingIngestionDetails, and QuestionBlock components in pages/OnboardingPageV2/.
    • Implements data source selection and configuration steps in OnboardingAddDataSource.tsx.
  • Styles:
    • Adds styles in OnboardingPageV2.styles.scss for the new onboarding components.
    • Updates AppLayout.styles.scss to adjust layout for new onboarding flow.
  • Localization:
    • Adds GET_STARTED_V2 title in locales/en/titles.json.
  • Permissions:
    • Updates utils/permission/index.ts to include GET_STARTED_V2 route permissions.

This description was created by Ellipsis for 11bd625. It will automatically update as commits are pushed.

@YounixM YounixM marked this pull request as ready for review November 4, 2024 16:33
Copy link

github-actions bot commented Nov 4, 2024

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Reviewed everything up to 198ba59 in 2 minutes and 23 seconds

More details
  • Looked at 2997 lines of code in 18 files
  • Skipped 55 files when reviewing.
  • Skipped posting 4 drafted comments based on config settings.
1. frontend/src/pages/OnboardingPageV2/OnboardingAddDataSource.tsx:183
  • Draft comment:
    Avoid using any type for the selectedEnvironment parameter. Define a specific type for the environment to ensure type safety.
  • Reason this comment was not posted:
    Marked as duplicate.
2. frontend/src/pages/OnboardingPageV2/OnboardingIngestionDetails.tsx:17
  • Draft comment:
    Ensure to handle cases where ingestionData might be undefined or null to prevent runtime errors.
  • Reason this comment was not posted:
    Comment did not seem useful.
3. frontend/src/pages/OnboardingPageV2/OnboardingIngestionDetails.tsx:64
  • Draft comment:
    Ensure to handle cases where injectionDataPayload might be undefined or null to prevent runtime errors.
  • Reason this comment was not posted:
    Marked as duplicate.
4. frontend/src/pages/OnboardingPageV2/QuestionBlock.tsx:67
  • Draft comment:
    Avoid using inline styles. Instead, use external stylesheets, CSS classes, or styled components.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_99RprrQxUCf7QXIv


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

const [hasMoreQuestions, setHasMoreQuestions] = useState<boolean>(true);

const [docsUrl, setDocsUrl] = useState<string>(
'http://localhost:3000/docs/instrumentation/springboot#send-traces-to-signoz-cloud',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider externalizing the URL used in the useState hook to a configuration file or environment variable to avoid hardcoding.

}
};

const handleSelectFramework = (option: any): void => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using any type for the option parameter. Define a specific type for the options to ensure type safety.

Suggested change
const handleSelectFramework = (option: any): void => {
const handleSelectFramework = (option: Option): void => {

Copy link

github-actions bot commented Nov 4, 2024

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on c8ea8e7 in 44 seconds

More details
  • Looked at 1078 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. frontend/src/container/OnboardingV2Container/AddDataSource/AddDataSource.tsx:97
  • Draft comment:
    Avoid using inline styles in React components. Consider using external stylesheets, CSS classes, or styled components instead. This is also applicable at line 345.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_NxVePD4uA8ahwrMV


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

github-actions bot commented Nov 5, 2024

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Incremental review on 762c36b in 1 minute and 0 seconds

More details
  • Looked at 732 lines of code in 1 files
  • Skipped 5 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. frontend/src/container/OnboardingV2Container/configs/onboarding-config-with-links.json:27
  • Draft comment:
    Unresolved merge conflict markers found. Please resolve the conflicts before merging.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_WIU3jEUHqFQhPozg


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

{
"key": "vm",
"label": "VM",
<<<<<<< Updated upstream:frontend/src/container/OnboardingV2Container/configs/onboarding-config-with-links.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unresolved merge conflict markers (e.g., <<<<<<<, =======, >>>>>>>) are present. These need to be resolved to ensure the JSON is valid. This issue appears multiple times throughout the file.

Copy link

github-actions bot commented Nov 5, 2024

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Incremental review on b33f72f in 1 minute and 7 seconds

More details
  • Looked at 723 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. frontend/src/container/OnboardingV2Container/configs/onboarding-config-with-links.json:24
  • Draft comment:
    Merge conflict markers (e.g., <<<<<<<, =======, >>>>>>>) are present in the JSON file. These need to be resolved to ensure the file is correctly formatted and functional.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.

Workflow ID: wflow_6wQ7CgF1LeGhOigf


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

"key": "vm",
"label": "VM",
"imgUrl": "/Logos/vm.svg",
"link": "http://localhost:3000/docs/instrumentation/opentelemetry-springboot/#send-traces-to-signoz-cloud"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using hardcoded URLs like http://localhost:3000. Replace them with production URLs or use environment variables to manage different environments.

Suggested change
"link": "http://localhost:3000/docs/instrumentation/opentelemetry-springboot/#send-traces-to-signoz-cloud"
"link": "https://signoz.io/docs/instrumentation/opentelemetry-springboot/#send-traces-to-signoz-cloud"

Copy link

github-actions bot commented Nov 6, 2024

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Incremental review on 8752021 in 1 minute and 4 seconds

More details
  • Looked at 723 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_m8KtV8p0AfwOt4SJ


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

"key": "vm",
"label": "VM",
"imgUrl": "/Logos/vm.svg",
"link": "http://localhost:3000/docs/instrumentation/opentelemetry-springboot/#send-traces-to-signoz-cloud"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link is set to a localhost URL, which is likely incorrect for production. Please update it to the correct external URL. This issue is also present in other parts of the file, such as lines 34, 40, 59, 65, 71, 90, 96, 102, 121, 127, 160, 166, 185, 191, 210, 216, 235, 241, 260, 266, 299, 305, 311, 330, 336, 342, 361, 367, 373, 392, 398, 404, 423, 429, 435, 459, 465, 471, 492, 498, 504, 525, 531, 537, 558, 564, 570, 591, 597, 603, 624, 630, 636, 657, 663, 669, 876, 1037, 1044, 1051, 1058.

Suggested change
"link": "http://localhost:3000/docs/instrumentation/opentelemetry-springboot/#send-traces-to-signoz-cloud"
"link": "https://signoz.io/docs/instrumentation/opentelemetry-springboot/#send-traces-to-signoz-cloud"

"type": "select",
"entityID": "environment",
"options": [
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use design tokens or predefined constants for URLs instead of hardcoding them. This applies to all similar instances in this file.

Copy link

github-actions bot commented Nov 7, 2024

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 44ca035 in 1 minute and 12 seconds

More details
  • Looked at 1227 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. frontend/src/container/OnboardingV2Container/AddDataSource/AddDataSource.tsx:160
  • Draft comment:
    Using setTimeout for scrolling can lead to inconsistent behavior. Consider using a callback or event-driven mechanism to ensure the DOM is ready before scrolling.
  • Reason this comment was not posted:
    Comment was on unchanged code.
2. frontend/src/container/OnboardingV2Container/AddDataSource/AddDataSource.tsx:298
  • Draft comment:
    Consider using a mapping object for routing based on selectedDataSource?.module to improve readability and maintainability.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The switch statement for routing based on selectedDataSource?.module is clear, but it could be more concise using a mapping object. This would improve readability and maintainability.
3. frontend/src/container/OnboardingV2Container/configs/onboarding-config-with-links.json:6
  • Draft comment:
    Consider using a base URL and appending paths to reduce redundancy in similar environment links.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The JSON configuration file is well-structured, but there are repeated URLs for similar environments. Consider using a base URL and appending paths to reduce redundancy and potential errors.

Workflow ID: wflow_e4sByCipTUKiRbc6


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

github-actions bot commented Nov 8, 2024

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Incremental review on 3310260 in 1 minute and 3 seconds

More details
  • Looked at 1111 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. frontend/src/container/OnboardingV2Container/configs/onboarding-config-with-links.json:19
  • Draft comment:
    The links have been changed to a new domain (signoz-web-git-feat-onboarding-v2-p3-signoz.vercel.app). Ensure this is intentional and not a temporary change for testing purposes, as it could affect production if not intended. This applies to all similar link changes in this file.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_ScQZSyc2hIUIc8vv


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

"key": "springboot",
"label": "Spring Boot",
"imgUrl": "/Logos/springboot.svg",
"link": "https://signoz-web-git-feat-onboarding-v2-p3-signoz.vercel.app/docs/instrumentation/opentelemetry-springboot/#send-traces-to-signoz-cloud",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid hardcoding URLs directly in the JSON. Consider using a configuration setting or constant to manage these URLs for better maintainability. This applies to all similar instances in this file.

Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Incremental review on 11bd625 in 1 minute and 23 seconds

More details
  • Looked at 560 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 drafted comments based on config settings.
1. frontend/src/container/OnboardingV2Container/AddDataSource/AddDataSource.tsx:187
  • Draft comment:
    Consider using requestAnimationFrame instead of setTimeout for scrolling to ensure the element is in the DOM and to avoid potential timing issues.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The use of setTimeout for scrolling is not ideal as it can lead to inconsistent behavior. Using requestAnimationFrame or ensuring the element is in the DOM before scrolling would be more reliable.
2. frontend/src/container/OnboardingV2Container/AddDataSource/AddDataSource.tsx:650
  • Draft comment:
    Using referrerPolicy="unsafe-url" can expose sensitive information. Consider using a safer policy like no-referrer or strict-origin-when-cross-origin.
  • Reason this comment was not posted:
    Comment was on unchanged code.
3. frontend/src/container/OnboardingV2Container/AddDataSource/AddDataSource.tsx:206
  • Draft comment:
    Consider refactoring handleSelectFramework and handleSelectEnvironment to reduce code duplication and improve maintainability.
  • Reason this comment was not posted:
    Confidence changes required: 40%
    The handleSelectFramework and handleSelectEnvironment functions have similar logic for updating the URL and setting the state. This code can be refactored to reduce duplication and improve maintainability.
4. frontend/src/container/OnboardingV2Container/OnboardingV2.styles.scss:217
  • Draft comment:
    Use design tokens or predefined color constants instead of hardcoding color values like #e0e0e0 and #0b0c0e. This applies to other hardcoded colors in this file as well.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_QRVNIfcA6HsbtjzK


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

<Flex gap="middle" vertical>
<Space align="end">
<Skeleton.Avatar
style={{ width: 40, height: 40 }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using inline styles in React components. Use external stylesheets, CSS classes, or styled components instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants