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

Comments Added #49

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

saurabhk9919
Copy link

Added comments as per instructions

Copy link

vercel bot commented Oct 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ngx-stories ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 7, 2024 0:36am

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hey @saurabhk9919, Thanks for contributing and Congrats on opening PR 🎉.

We will try to review as soon as possible and a maintainer will get back to you soon!

@Gauravdarkslayer
Copy link
Owner

Hey @saurabhk9919 ,
Can you please self review your code?
Try running locally.
As few html/js comments are visible in DOM view.
Also please avoid over commenting, as most functions are self explanatory.
For eg. You can remove comments such as file imports and basic things.

Copy link
Owner

@Gauravdarkslayer Gauravdarkslayer left a comment

Choose a reason for hiding this comment

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

Add some useful comments to the library itself.
Projects -> ngx-stories

Comment on lines 3 to 6
<!--
The ngx-stories component displays a series of stories
based on the storyGroups array provided from the AppComponent.
-->
Copy link
Owner

Choose a reason for hiding this comment

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

Can we please avoid this?

@@ -1,14 +1,21 @@
// Import necessary modules from Angular and NgxStories library
Copy link
Owner

Choose a reason for hiding this comment

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

Please remove this comment.

import { Component } from '@angular/core';
import { NgxStoriesComponent, StoryGroup } from '../../projects/ngx-stories/src/public-api';

// Define the AppComponent with metadata like selector, template, and style URL
Copy link
Owner

Choose a reason for hiding this comment

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

Please remove this comment.

imports: [NgxStoriesComponent],
templateUrl: './app.component.html',
styleUrl: './app.component.css',
selector: 'app-root', // The component's HTML tag
Copy link
Owner

Choose a reason for hiding this comment

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

Please remove this comments(present in @component declaration)

src/index.html Outdated
w[l] = w[l] || []; w[l].push({
'gtm.start':
new Date().getTime(), event: 'gtm.js'
w[l] = w[l] || []; w[l].push({ //pushing the data to the dataLayer
Copy link
Owner

Choose a reason for hiding this comment

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

Please remove this comment.

src/index.html Outdated
new Date().getTime(), event: 'gtm.js'
w[l] = w[l] || []; w[l].push({ //pushing the data to the dataLayer
'gtm.start':
new Date().getTime(), event: 'gtm.js' //for the first script element in the document
Copy link
Owner

Choose a reason for hiding this comment

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

Please remove this comment.

src/index.html Outdated
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KDD8ZZFP" height="0" width="0"
style="display:none;visibility:hidden"></iframe></noscript>
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KDD8ZZFP" height="0" width="0"
style="display:none;visibility:hidden"></iframe></noscript> //If the script is not supported by the browser then it will display the message
Copy link
Owner

Choose a reason for hiding this comment

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

Please remove this comment.

src/main.ts Outdated
@@ -2,5 +2,7 @@ import { bootstrapApplication } from '@angular/platform-browser';
import { appConfig } from './app/app.config';
import { AppComponent } from './app/app.component';

// Bootstrapping (initializing) the Angular application with the root component (AppComponent)
Copy link
Owner

Choose a reason for hiding this comment

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

Please remove this comment.

@saurabhk9919
Copy link
Author

saurabhk9919 commented Oct 5, 2024

@Gauravdarkslayer I have made the changes as instructed in the next commit, you can review the changes

currentStoryGroupIndex: number,
currentStoryIndex: number,
onStoryGroupChange: (storyGroupIndex: number) => void): { storyGroupIndex: number, storyIndex: number } {
let stories = storyGroups[currentStoryGroupIndex]?.stories;
if (currentStoryIndex === 0) {
// Move to the previous storyGroup if the current story index is 0
Copy link
Owner

Choose a reason for hiding this comment

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

Please retain existing comments

} else if (direction === 'right') {
this.isSwipingRight = true;
setTimeout(() => {
this.goToPreviousStoryGroup();
this.resetSwipe();
}, 600); // Match the animation duration
Copy link
Owner

Choose a reason for hiding this comment

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

Please keep existing comments

Copy link
Owner

@Gauravdarkslayer Gauravdarkslayer left a comment

Choose a reason for hiding this comment

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

Looks like you've removed the existing code comments, please retain them back

@saurabhk9919
Copy link
Author

@Gauravdarkslayer I have retained back the missed out comments

@Gauravdarkslayer
Copy link
Owner

Can you please check why builds are failing, may be you can try running the project before creating a commit.

@saurabhk9919
Copy link
Author

@Gauravdarkslayer I am unable to solve the build issue but the local run is working properly
image

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.

2 participants