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

fix: newsroom section is not ui friendly #3639

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

jayraj175coder
Copy link

@jayraj175coder jayraj175coder commented Feb 2, 2025

Description

This PR addresses the above issue by redesigning the "Latest News" section to improve its layout and enhance user experience:

Left-Aligned Title and Follow Button: Ensures better readability by positioning the section title and Twitter follow button on the left.
Card-Based News Layout: Introduces a vertical stack of cards for news articles, with clean typography and sufficient padding. Each card includes:
A publication date.
A bold headline.
A short description for clarity.
Improved Responsiveness: Ensures the layout scales well across all screen sizes, including desktop and mobile.
image

Related issue(s)
Fixes issue #3587

Summary by CodeRabbit

Summary by CodeRabbit

  • Style

    • Enhanced the Newsroom article display with a modern, responsive layout featuring improved spacing and centered content for a better reading experience.
  • Chores

    • Added new dependencies for project development, including @asyncapi/website and schedule-email, and added prettier-plugin-tailwindcss. Updated the prettier version to improve code formatting.
    • Introduced a new Prettier configuration file to standardize formatting options.

Copy link
Contributor

coderabbitai bot commented Feb 2, 2025

Walkthrough

This pull request updates dependency management and enhances UI styling. Two separate package.json files now include new local file dependencies—one for the Mailchimp workflow (schedule-email) and another for the main project (@asyncapi/website)—with a minor formatting adjustment in the workflow file. Additionally, the Newsroom.tsx component has been restructured to improve responsiveness and visual alignment by updating layout classes, container dimensions, and inner padding.

Changes

File(s) Change Summary
.github/workflows/scripts/mailchimp/package.json, package.json Added new dependency "schedule-email": "file:" in the workflow package file and "@asyncapi/website": "file:" in the root package file; introduced a newline at the end of the workflow file. Updated prettier version from ^3.3.3 to ^3.4.2 and added prettier-plugin-tailwindcss in devDependencies.
components/newsroom/Newsroom.tsx Restructured layout for displaying articles by updating container styling (e.g., bg-white, shadow-lg, rounded-xl), switching from fixed to responsive height (md:h-120 to h-auto), and enhancing inner div padding and alignment.
.github/workflows/.prettierrc Created new Prettier configuration file with settings for tabWidth and useTabs.
.github/workflows/lighthouse-ci.yml Updated Lighthouse CI workflow by changing the uses directive to a version tag (v10.1.0), added a new output variable artifactName, and adjusted indentation for consistency.

Suggested labels

ready-to-merge, bounty

Suggested reviewers

  • derberg
  • magicmatatjahu
  • Mayaleeeee
  • akshatnema
  • devilkiller-ag
  • sambhavgupta0705

Poem

I'm a rabbit, hopping with glee,
Celebrating changes, as bright as can be.
Dependencies added, layouts refined,
New styles awaken the code, redefined.
With each hop and line of code clear,
I cheer the updates, my joy sincere! 🐇🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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.

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

Copy link

netlify bot commented Feb 2, 2025

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 1a2b731
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/67a070b3aa16c400082e2b04
😎 Deploy Preview https://deploy-preview-3639--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
components/newsroom/Newsroom.tsx (1)

71-80: Improve code style and maintainability.

The UI changes look good but need some refinements:

  1. Use predefined height class
  2. Fix quote style
  3. Order Tailwind classes consistently

Apply these changes:

-        <div className="flex flex-col sm:flex-row w-full lg:w-3/4 h-auto md:h-[30rem] bg-white  shadow-lg rounded-xl overflow-hidden">
+        <div className='flex h-auto w-full flex-col overflow-hidden rounded-xl bg-white shadow-lg md:h-120 sm:flex-row lg:w-3/4'>
           {/* Left Content */}
-          <div className="relative flex w-full flex-col p-4 sm:p-6 overflow-y-auto scrollbar-hide">
-            <div className="min-h-0">
-              <div className="relative sm:absolute inset-0 flex items-center justify-center">
+          <div className='relative flex w-full flex-col overflow-y-auto p-4 scrollbar-hide sm:p-6'>
+            <div className='min-h-0'>
+              <div className='relative inset-0 flex items-center justify-center sm:absolute'>
🧰 Tools
🪛 ESLint

[error] 71-71: Replace "flex·flex-col·sm:flex-row·w-full·lg:w-3/4·h-auto·md:h-[30rem]·bg-white··shadow-lg·rounded-xl·overflow-hidden" with 'flex·flex-col·sm:flex-row·w-full·lg:w-3/4·h-auto·md:h-[30rem]·bg-white··shadow-lg·rounded-xl·overflow-hidden'

(prettier/prettier)


[error] 71-71: Unexpected usage of doublequote.

(jsx-quotes)


[error] 73-73: Replace "relative·flex·w-full·flex-col·p-4·sm:p-6·overflow-y-auto·scrollbar-hide" with 'relative·flex·w-full·flex-col·p-4·sm:p-6·overflow-y-auto·scrollbar-hide'

(prettier/prettier)


[error] 73-73: Unexpected usage of doublequote.

(jsx-quotes)


[error] 74-74: Replace "min-h-0" with 'min-h-0'

(prettier/prettier)


[error] 74-74: Unexpected usage of doublequote.

(jsx-quotes)


[error] 75-75: Replace "relative·sm:absolute·inset-0·flex·items-center·justify-center" with 'relative·sm:absolute·inset-0·flex·items-center·justify-center'

(prettier/prettier)


[error] 75-75: Unexpected usage of doublequote.

(jsx-quotes)

🪛 GitHub Actions: PR testing - if Node project

[warning] 71-71: Invalid Tailwind CSS classnames order tailwindcss/classnames-order


[warning] 71-71: The arbitrary class 'md:h-[30rem]' could be replaced by 'md:h-120' tailwindcss/no-unnecessary-arbitrary-value


[error] 71-71: Replace "flex·flex-col·sm:flex-row·w-full·lg:w-3/4·h-auto·md:h-[30rem]·bg-white··shadow-lg·rounded-xl·overflow-hidden" with 'flex·flex-col·sm:flex-row·w-full·lg:w-3/4·h-auto·md:h-[30rem]·bg-white··shadow-lg·rounded-xl·overflow-hidden' prettier/prettier


[error] 71-71: Unexpected usage of doublequote. jsx-quotes


[warning] 73-73: Invalid Tailwind CSS classnames order tailwindcss/classnames-order


[error] 73-73: Replace "relative·flex·w-full·flex-col·p-4·sm:p-6·overflow-y-auto·scrollbar-hide" with 'relative·flex·w-full·flex-col·p-4·sm:p-6·overflow-y-auto·scrollbar-hide' prettier/prettier


[error] 73-73: Unexpected usage of doublequote. jsx-quotes


[error] 74-74: Replace "min-h-0" with 'min-h-0' prettier/prettier


[error] 74-74: Unexpected usage of doublequote. jsx-quotes


[warning] 75-75: Invalid Tailwind CSS classnames order tailwindcss/classnames-order


[error] 75-75: Replace "relative·sm:absolute·inset-0·flex·items-center·justify-center" with 'relative·sm:absolute·inset-0·flex·items-center·justify-center' prettier/prettier


[error] 75-75: Unexpected usage of doublequote. jsx-quotes


[error] 80-80: Delete ⏎⏎ prettier/prettier

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ae25e36 and af0e112.

⛔ Files ignored due to path filters (2)
  • .github/workflows/scripts/mailchimp/package-lock.json is excluded by !**/package-lock.json
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • .github/workflows/scripts/mailchimp/package.json (1 hunks)
  • components/newsroom/Newsroom.tsx (1 hunks)
  • package.json (1 hunks)
🧰 Additional context used
🪛 ESLint
components/newsroom/Newsroom.tsx

[error] 71-71: Replace "flex·flex-col·sm:flex-row·w-full·lg:w-3/4·h-auto·md:h-[30rem]·bg-white··shadow-lg·rounded-xl·overflow-hidden" with 'flex·flex-col·sm:flex-row·w-full·lg:w-3/4·h-auto·md:h-[30rem]·bg-white··shadow-lg·rounded-xl·overflow-hidden'

(prettier/prettier)


[error] 71-71: Unexpected usage of doublequote.

(jsx-quotes)


[error] 73-73: Replace "relative·flex·w-full·flex-col·p-4·sm:p-6·overflow-y-auto·scrollbar-hide" with 'relative·flex·w-full·flex-col·p-4·sm:p-6·overflow-y-auto·scrollbar-hide'

(prettier/prettier)


[error] 73-73: Unexpected usage of doublequote.

(jsx-quotes)


[error] 74-74: Replace "min-h-0" with 'min-h-0'

(prettier/prettier)


[error] 74-74: Unexpected usage of doublequote.

(jsx-quotes)


[error] 75-75: Replace "relative·sm:absolute·inset-0·flex·items-center·justify-center" with 'relative·sm:absolute·inset-0·flex·items-center·justify-center'

(prettier/prettier)


[error] 75-75: Unexpected usage of doublequote.

(jsx-quotes)


[error] 80-82: Delete ⏎⏎

(prettier/prettier)

🪛 GitHub Actions: PR testing - if Node project
components/newsroom/Newsroom.tsx

[warning] 71-71: Invalid Tailwind CSS classnames order tailwindcss/classnames-order


[warning] 71-71: The arbitrary class 'md:h-[30rem]' could be replaced by 'md:h-120' tailwindcss/no-unnecessary-arbitrary-value


[error] 71-71: Replace "flex·flex-col·sm:flex-row·w-full·lg:w-3/4·h-auto·md:h-[30rem]·bg-white··shadow-lg·rounded-xl·overflow-hidden" with 'flex·flex-col·sm:flex-row·w-full·lg:w-3/4·h-auto·md:h-[30rem]·bg-white··shadow-lg·rounded-xl·overflow-hidden' prettier/prettier


[error] 71-71: Unexpected usage of doublequote. jsx-quotes


[warning] 73-73: Invalid Tailwind CSS classnames order tailwindcss/classnames-order


[error] 73-73: Replace "relative·flex·w-full·flex-col·p-4·sm:p-6·overflow-y-auto·scrollbar-hide" with 'relative·flex·w-full·flex-col·p-4·sm:p-6·overflow-y-auto·scrollbar-hide' prettier/prettier


[error] 73-73: Unexpected usage of doublequote. jsx-quotes


[error] 74-74: Replace "min-h-0" with 'min-h-0' prettier/prettier


[error] 74-74: Unexpected usage of doublequote. jsx-quotes


[warning] 75-75: Invalid Tailwind CSS classnames order tailwindcss/classnames-order


[error] 75-75: Replace "relative·sm:absolute·inset-0·flex·items-center·justify-center" with 'relative·sm:absolute·inset-0·flex·items-center·justify-center' prettier/prettier


[error] 75-75: Unexpected usage of doublequote. jsx-quotes


[error] 80-80: Delete ⏎⏎ prettier/prettier


[error] 82-82: More than 1 blank line not allowed. no-multiple-empty-lines

⏰ Context from checks skipped due to timeout of 180000ms (1)
  • GitHub Check: Lighthouse CI
🔇 Additional comments (1)
components/newsroom/Newsroom.tsx (1)

14-108: Well-structured component with good practices!

The component demonstrates:

  • Clear section separation
  • Consistent typography usage
  • Good test coverage
  • Proper accessibility attributes
🧰 Tools
🪛 ESLint

[error] 71-71: Replace "flex·flex-col·sm:flex-row·w-full·lg:w-3/4·h-auto·md:h-[30rem]·bg-white··shadow-lg·rounded-xl·overflow-hidden" with 'flex·flex-col·sm:flex-row·w-full·lg:w-3/4·h-auto·md:h-[30rem]·bg-white··shadow-lg·rounded-xl·overflow-hidden'

(prettier/prettier)


[error] 71-71: Unexpected usage of doublequote.

(jsx-quotes)


[error] 73-73: Replace "relative·flex·w-full·flex-col·p-4·sm:p-6·overflow-y-auto·scrollbar-hide" with 'relative·flex·w-full·flex-col·p-4·sm:p-6·overflow-y-auto·scrollbar-hide'

(prettier/prettier)


[error] 73-73: Unexpected usage of doublequote.

(jsx-quotes)


[error] 74-74: Replace "min-h-0" with 'min-h-0'

(prettier/prettier)


[error] 74-74: Unexpected usage of doublequote.

(jsx-quotes)


[error] 75-75: Replace "relative·sm:absolute·inset-0·flex·items-center·justify-center" with 'relative·sm:absolute·inset-0·flex·items-center·justify-center'

(prettier/prettier)


[error] 75-75: Unexpected usage of doublequote.

(jsx-quotes)


[error] 80-82: Delete ⏎⏎

(prettier/prettier)


[error] 82-83: More than 1 blank line not allowed.

(no-multiple-empty-lines)

🪛 GitHub Actions: PR testing - if Node project

[warning] 71-71: Invalid Tailwind CSS classnames order tailwindcss/classnames-order


[warning] 71-71: The arbitrary class 'md:h-[30rem]' could be replaced by 'md:h-120' tailwindcss/no-unnecessary-arbitrary-value


[error] 71-71: Replace "flex·flex-col·sm:flex-row·w-full·lg:w-3/4·h-auto·md:h-[30rem]·bg-white··shadow-lg·rounded-xl·overflow-hidden" with 'flex·flex-col·sm:flex-row·w-full·lg:w-3/4·h-auto·md:h-[30rem]·bg-white··shadow-lg·rounded-xl·overflow-hidden' prettier/prettier


[error] 71-71: Unexpected usage of doublequote. jsx-quotes


[warning] 73-73: Invalid Tailwind CSS classnames order tailwindcss/classnames-order


[error] 73-73: Replace "relative·flex·w-full·flex-col·p-4·sm:p-6·overflow-y-auto·scrollbar-hide" with 'relative·flex·w-full·flex-col·p-4·sm:p-6·overflow-y-auto·scrollbar-hide' prettier/prettier


[error] 73-73: Unexpected usage of doublequote. jsx-quotes


[error] 74-74: Replace "min-h-0" with 'min-h-0' prettier/prettier


[error] 74-74: Unexpected usage of doublequote. jsx-quotes


[warning] 75-75: Invalid Tailwind CSS classnames order tailwindcss/classnames-order


[error] 75-75: Replace "relative·sm:absolute·inset-0·flex·items-center·justify-center" with 'relative·sm:absolute·inset-0·flex·items-center·justify-center' prettier/prettier


[error] 75-75: Unexpected usage of doublequote. jsx-quotes


[error] 80-80: Delete ⏎⏎ prettier/prettier


[error] 82-82: More than 1 blank line not allowed. no-multiple-empty-lines

@@ -4,6 +4,7 @@
"license": "Apache 2.0",
"dependencies": {
"@actions/core": "1.6.0",
"@mailchimp/mailchimp_marketing": "3.0.74"
"@mailchimp/mailchimp_marketing": "3.0.74",
"schedule-email": "file:"
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Local file dependency configuration issue detected.

The "schedule-email": "file:" entry in the .github/workflows/scripts/mailchimp/package.json file is incomplete because it lacks the local path to the dependency. Additionally, no directory named schedule-email exists in the repository. Please specify the correct local path to the package and ensure the package exists at the expected location.

  • Update the dependency entry to include a valid relative path (e.g., "schedule-email": "file:../schedule-email" if applicable).
  • Verify that the intended local package directory is present in the repository.
🔗 Analysis chain

Verify the local file dependency configuration.

The "schedule-email": "file:" dependency is missing a path to the local package.

Please ensure:

  1. The correct path to the local package is specified
  2. The package exists at the expected location

I'm not seeing the expected details for the local dependency configuration. To gather more information, please run the following scripts to inspect the contents of the Mailchimp workflow package file and check for any local package directories:

Once you’ve verified these outputs, please confirm that:

  • The "schedule-email" dependency in .github/workflows/scripts/mailchimp/package.json includes a valid path (instead of just "file:").
  • The referenced local package exists at the expected location.
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if schedule-email package exists
fd -t f "package.json" | xargs grep -l "schedule-email"

Length of output: 53


Script:

#!/bin/bash
echo "=== Contents of .github/workflows/scripts/mailchimp/package.json ==="
grep -R '"schedule-email":' .github/workflows/scripts/mailchimp/package.json || echo "No 'schedule-email' dependency found in package.json."

echo ""
echo "=== Searching for directories named 'schedule-email' ==="
fd -t d "schedule-email" || echo "No directory named 'schedule-email' found in the repository."

Length of output: 420

@@ -46,6 +46,7 @@
},
"homepage": "https://github.com/asyncapi/website#readme",
"dependencies": {
"@asyncapi/website": "file:",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Remove circular dependency.

The package is referencing itself as a dependency: "@asyncapi/website": "file:". This creates a circular dependency which could cause issues during installation and builds.

Remove this line as it's not needed:

-    "@asyncapi/website": "file:",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"@asyncapi/website": "file:",

@vishvamsinh28
Copy link
Contributor

@jayraj175coder There are some issues with this PR. Please fix the lint errors. You also need to change the title of this PR and provide a description for it. Additionally, there is no issue linked to it. Do we really need this change? If yes, then please address all these points

Copy link

codecov bot commented Feb 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (326082b) to head (1a2b731).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #3639   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           20        20           
  Lines          732       732           
=========================================
  Hits           732       732           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jayraj175coder jayraj175coder deleted the newsSection branch February 2, 2025 16:38
@vishvamsinh28
Copy link
Contributor

@jayraj175coder add a prefix "fix: " in the title and to fix lint errors run "npm run lint:fix"

@jayraj175coder jayraj175coder reopened this Feb 2, 2025
@jayraj175coder jayraj175coder changed the title bug(Make newsroom ui) fix: Newsrrom section is not ui friendly Feb 2, 2025
@jayraj175coder jayraj175coder changed the title fix: Newsrrom section is not ui friendly fix: Newsroom section is not ui friendly Feb 2, 2025
@jayraj175coder jayraj175coder changed the title fix: Newsroom section is not ui friendly fix: newsroom section is not ui friendly Feb 2, 2025
@akshatnema
Copy link
Member

How come the branch has been deleted but PR is still open? 😅

@jayraj175coder
Copy link
Author

Hey @akshatnema what the issue of LightHouse/cli here.. Is the branch deleted is the reason behind this.?

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/lighthouse-ci.yml (1)

97-97: Nitpick: Add Newline at End-of-File and Remove Trailing Spaces

YAMLlint notes that line 97 contains trailing spaces and lacks a newline at the end of the file. Please ensure the file ends with a clean newline with no trailing spaces.

-          message: ${{ steps.lighthouse_score_report.outputs.comment }}
-  
+          message: ${{ steps.lighthouse_score_report.outputs.comment }}
+
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 97-97: no new line character at the end of file

(new-line-at-end-of-file)


[error] 97-97: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2d8e3c5 and dedd2a0.

📒 Files selected for processing (3)
  • .github/workflows/.prettierrc (1 hunks)
  • .github/workflows/lighthouse-ci.yml (2 hunks)
  • components/newsroom/Newsroom.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .github/workflows/.prettierrc
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/newsroom/Newsroom.tsx
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/lighthouse-ci.yml

[error] 48-48: syntax error: expected , but found ''

(syntax)


[error] 57-57: trailing spaces

(trailing-spaces)


[error] 97-97: no new line character at the end of file

(new-line-at-end-of-file)


[error] 97-97: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 180000ms (1)
  • GitHub Check: Test NodeJS PR - windows-latest
🔇 Additional comments (1)
.github/workflows/lighthouse-ci.yml (1)

51-57: Approval: Updated Version Tag and Dynamic Artifact Naming

The update from a specific commit hash to the version tag v10.1.0 for the Lighthouse CI Action is a good improvement for maintainability. In addition, the introduction of the dynamic artifactName output variable (using the GitHub run ID) is well implemented.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 57-57: trailing spaces

(trailing-spaces)

Comment on lines 48 to 61
- if: steps.should_run.outputs.shouldrun == 'true'
name: Lighthouse Audit
id: lighthouse_audit
uses: treosh/lighthouse-ci-action@v10.1.0
with:
urls: |
https://deploy-preview-$PR_NUMBER--asyncapi-website.netlify.app/
configPath: ./.github/workflows/lighthouserc.json
uploadArtifacts: true
artifactName: lhci-results-${{ github.run_id }}
temporaryPublicStorage: true
env:
PR_NUMBER: ${{ github.event.pull_request.number}}
env:
PR_NUMBER: ${{ github.event.pull_request.number}}

Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

⚠️ Potential issue

Critical: Fix YAML Indentation and Trailing Spaces in Lighthouse Audit Step

The Lighthouse Audit step (lines 48–61) exhibits a potential indentation issue that could trigger a YAML syntax error (as flagged by YAMLlint). In addition, the artifactName field on line 57 has trailing spaces. Please adjust the indentation to match the rest of the steps and remove any trailing spaces to ensure proper YAML parsing.

-       - if: steps.should_run.outputs.shouldrun == 'true'
+      - if: steps.should_run.outputs.shouldrun == 'true'
 
-          artifactName: lhci-results-${{ github.run_id }}  
+          artifactName: lhci-results-${{ github.run_id }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- if: steps.should_run.outputs.shouldrun == 'true'
name: Lighthouse Audit
id: lighthouse_audit
uses: treosh/[email protected]
with:
urls: |
https://deploy-preview-$PR_NUMBER--asyncapi-website.netlify.app/
configPath: ./.github/workflows/lighthouserc.json
uploadArtifacts: true
artifactName: lhci-results-${{ github.run_id }}
temporaryPublicStorage: true
env:
PR_NUMBER: ${{ github.event.pull_request.number}}
env:
PR_NUMBER: ${{ github.event.pull_request.number}}
- if: steps.should_run.outputs.shouldrun == 'true'
name: Lighthouse Audit
id: lighthouse_audit
uses: treosh/[email protected]
with:
urls: |
https://deploy-preview-$PR_NUMBER--asyncapi-website.netlify.app/
configPath: ./.github/workflows/lighthouserc.json
uploadArtifacts: true
artifactName: lhci-results-${{ github.run_id }}
temporaryPublicStorage: true
env:
PR_NUMBER: ${{ github.event.pull_request.number}}
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 48-48: syntax error: expected , but found ''

(syntax)


[error] 57-57: trailing spaces

(trailing-spaces)

@jayraj175coder
Copy link
Author

Hey @vishvamsinh28 , I fix lint errors.
But still lighthouse issue will be there.
chk annd tell me what I do:)

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