Skip to content

Conversation

@Pratham-Saini2703
Copy link

@Pratham-Saini2703 Pratham-Saini2703 commented Nov 17, 2025

1.Removed unnecessary span tags from markdownTable.js.
2.Fixed deployment-related rendering issue.
3. Code tested and working locally.

Related issue(s)

Summary by CodeRabbit

  • Style

    • Simplified markdown table rendering by removing HTML tooltip styling from vote indicators and header text.
  • Refactor

    • Streamlined output formatting for vote tracking tables while maintaining all existing functionality and APIs.

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.

@coderabbitai
Copy link

coderabbitai bot commented Nov 17, 2025

Walkthrough

Removed HTML span wrapping and tooltip behavior from two utility functions in the vote tracker markdown table generator. The renderVoteIcon and renderHeaderCell functions now return plain emoji and key values respectively, instead of decorated HTML elements with tooltip styling attributes.

Changes

Cohort / File(s) Change Summary
Markdown Table Utilities
\.github/scripts/vote_tracker/markdownTable\.js
Removed HTML tooltip wrapping from renderVoteIcon (returns emoji directly) and renderHeaderCell (returns key directly); no API signature changes

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Single file with localized formatting changes to two closely-related functions
  • No logic modifications or behavioral alterations to underlying functionality
  • Changes are consistent and straightforward (removing HTML decoration layer)

Possibly related PRs

Suggested reviewers

  • derberg
  • bandantonio
  • thulieblack
  • TRohit20

Poem

🐰 Tooltips fade like morning dew,
HTML wrappers bid adieu,
Emoji shine in clean delight,
No span to clutter up the sight!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly describes the main change: removing styling wrappers from code to fix rendering on the website. It directly relates to the changeset which removes HTML span tags and tooltip behavior.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (5)
.github/scripts/vote_tracker/markdownTable.js (5)

2-13: Update JSDoc to reflect the removal of HTML wrapping.

The documentation still describes the old behavior where the function returns HTML with span elements and tooltips, but the implementation now returns plain emoji or text. The @returns description and @example need to be updated.

Apply this diff to update the JSDoc:

 /**
- * Replaces voting status values with corresponding emoji icons wrapped in a tooltip span.
+ * Replaces voting status values with corresponding emoji icons.
  * This function is used to visually represent vote statuses (e.g., "In favor", "Against") in a Markdown table
- * with user-friendly emojis, enhancing readability. The tooltip preserves the original status text for clarity
- * when users hover over the emoji.
+ * with user-friendly emojis, enhancing readability.
  *
  * @param {string} value - The vote status to render (e.g., "In favor", "Against", "Abstain", "Not participated").
- * @returns {string} - An HTML string containing the emoji icon wrapped in a `<span>` element with a tooltip
- *                     displaying the original status. If no matching emoji is found, the original value is returned
- *                     wrapped in a tooltip span.
+ * @returns {string} - The emoji icon corresponding to the vote status. If no matching emoji is found, 
+ *                     the original value is returned.
  * @example
- * renderVoteIcon("In favor") // Returns '<span style="position: relative; cursor: pointer;" title="In favor">👍</span>'
+ * renderVoteIcon("In favor") // Returns '👍'
  */

25-43: Update JSDoc to reflect the removal of HTML wrapping.

The documentation still describes the old behavior where non-issue headers are wrapped in span elements with tooltips, but the implementation now returns plain text. The @returns description and @example need to be updated.

Apply this diff to update the JSDoc:

 /**
  * Generates a Markdown table header cell, optionally with a tooltip or a GitHub issue link.
  * This function formats column headers in a Markdown table, enhancing them with tooltips for better context
  * or converting headers with issue references (e.g., "Title$$123") into clickable GitHub issue links.
  * It supports user-friendly table rendering in documentation.
  *
  * @param {string} key - The column header key to display (e.g., "name", "Proposal$$123").
- * @param {Object} titles - A mapping of header keys to human-readable descriptions for tooltips.
+ * @param {Object} titles - A mapping of header keys to human-readable descriptions (currently unused).
  * @param {string} orgName - The GitHub organization name (e.g., "my-org") for constructing issue links.
  * @param {string} repoName - The GitHub repository name (e.g., "my-repo") for constructing issue links.
- * @returns {string} - A Markdown or HTML string representing the header cell. If the key includes "$$",
- *                     it returns a Markdown link to a GitHub issue. Otherwise, it returns a `<span>` with
- *                     a tooltip containing the key's description or the key itself.
+ * @returns {string} - A Markdown string representing the header cell. If the key includes "$$",
+ *                     it returns a Markdown link to a GitHub issue. Otherwise, it returns the key itself.
  * @example
  * renderHeaderCell("Proposal$$123", { "Proposal": "Proposal Description" }, "org", "repo")
  * // Returns '[Proposal](https://github.com/org/repo/issues/123)'
  * renderHeaderCell("name", { "name": "GitHub user name" }, "org", "repo")
- * // Returns '<span style="position: relative; cursor: pointer;" title="GitHub user name">name</span>'
+ * // Returns 'name'
  */

66-68: Update example to reflect the removal of HTML wrapping.

The example in the JSDoc still shows the old format with HTML span elements, but the function now returns plain text for non-issue headers.

Apply this diff:

  * @example
  * generateMarkdownHeader(["name", "Proposal$$123"], { name: "GitHub user name" }, "org", "repo")
  * // Returns:
- * // "| <span style=\"position: relative; cursor: pointer;\" title=\"GitHub user name\">name</span> | [Proposal](https://github.com/org/repo/issues/123) |\n| --- | --- |"
+ * // "| name | [Proposal](https://github.com/org/repo/issues/123) |\n| --- | --- |"
  */

86-88: Update example to reflect the removal of HTML wrapping.

The example in the JSDoc still shows the old format with HTML span elements wrapping the vote emoji, but the function now returns plain emojis.

Apply this diff:

  * @example
  * generateMarkdownRows([{ name: "user1", "Proposal$$123": "In favor" }], ["name", "Proposal$$123"])
  * // Returns:
- * // "| [user1](https://github.com/user1) | <span style=\"position: relative; cursor: pointer;\" title=\"In favor\">👍</span> |"
+ * // "| [user1](https://github.com/user1) | 👍 |"
  */

158-162: Update example to reflect the removal of HTML wrapping.

The example in the JSDoc still shows the old format with HTML span elements, but the function now returns plain text for headers and plain emojis for votes.

Apply this diff:

  * // Returns a Promise resolving to:
  * // <!-- This file is generated by a script. Do not manually update it unless there is a visible mistake and point to the script that is responsible for updating the document. -->
- * // | <span style="position: relative; cursor: pointer;" title="GitHub user name">name</span> | [Proposal](https://github.com/org/repo/issues/123) |
+ * // | name | [Proposal](https://github.com/org/repo/issues/123) |
  * // | --- | --- |
- * // | [user1](https://github.com/user1) | <span style="position: relative; cursor: pointer;" title="In favor">👍</span> |
+ * // | [user1](https://github.com/user1) | 👍 |
  */
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9fbcbe2 and c772092.

📒 Files selected for processing (1)
  • .github/scripts/vote_tracker/markdownTable.js (2 hunks)
🔇 Additional comments (1)
.github/scripts/vote_tracker/markdownTable.js (1)

21-22: No issues found — the change is safe and tested.

The removal of HTML wrapping is verified to be safe. The renderVoteIcon function is only consumed by tests in test/markdownTable.test.js, which use .toContain() for loose substring matching—compatible with both HTML-wrapped and plain emoji output. No production code depends on this module, and the tests remain passing with the new implementation that returns plain emoji strings.

Comment on lines 49 to +51
const tooltip = titles[key] || key;
return `<span style="position: relative; cursor: pointer;" title="${tooltip}">${key}</span>`;
return `${key}`;
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Remove unused variable.

The tooltip variable is calculated but never used after removing the HTML span wrapping. Consider removing it or the entire titles parameter if tooltips are no longer needed.

Apply this diff:

- const tooltip = titles[key] || key;
  return `${key}`;

Alternatively, if the titles parameter is no longer needed at all, you could simplify the entire function signature. However, this would require updating all call sites, so removing just the unused variable is safer.

📝 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
const tooltip = titles[key] || key;
return `<span style="position: relative; cursor: pointer;" title="${tooltip}">${key}</span>`;
return `${key}`;
return `${key}`;
🤖 Prompt for AI Agents
.github/scripts/vote_tracker/markdownTable.js around lines 50-51: the variable
`tooltip` is computed but never used; remove the unused `const tooltip =
titles[key] || key;` line (or if you prefer a bigger change, remove the `titles`
parameter from the function and update call sites, but safer here is to simply
delete the unused variable) and run eslint/TypeScript checks to ensure no
unused-variable warnings remain.

@Pratham-Saini2703 Pratham-Saini2703 changed the title Removed span tags from markdownTable.js for deployment fix fix : Removed span tags from markdownTable.js for deployment fix Nov 17, 2025
@Pratham-Saini2703 Pratham-Saini2703 changed the title fix : Removed span tags from markdownTable.js for deployment fix docs : Removed span tags from markdownTable.js for deployment fix Nov 17, 2025
@Pratham-Saini2703 Pratham-Saini2703 changed the title docs : Removed span tags from markdownTable.js for deployment fix feat : Removed span tags from markdownTable.js for deployment fix Nov 17, 2025
@Pratham-Saini2703 Pratham-Saini2703 changed the title feat : Removed span tags from markdownTable.js for deployment fix style : Removed span tags from markdownTable.js for deployment fix Nov 17, 2025
@Pratham-Saini2703 Pratham-Saini2703 changed the title style : Removed span tags from markdownTable.js for deployment fix [📑Docs] : Removed span tags from markdownTable.js for deployment fix Nov 17, 2025
@Pratham-Saini2703 Pratham-Saini2703 changed the title [📑Docs] : Removed span tags from markdownTable.js for deployment fix [📑 Docs]: Remove styling wrappers from TSC_VOTING_OVERVIEW to properly render it on the website 📑 docs Nov 17, 2025
@Pratham-Saini2703 Pratham-Saini2703 changed the title [📑 Docs]: Remove styling wrappers from TSC_VOTING_OVERVIEW to properly render it on the website 📑 docs docs: remove styling wrappers from TSC_VOTING_OVERVIEW to properly render it on the website Nov 17, 2025
@Pratham-Saini2703 Pratham-Saini2703 changed the title docs: remove styling wrappers from TSC_VOTING_OVERVIEW to properly render it on the website docs: fix rendering issue in tsc-voting-overview Nov 18, 2025
@bandantonio
Copy link
Collaborator

@Pratham-Saini2703 thanks.

  1. Code tested and working locally.

How did you test it? Could you please show the results?

@Pratham-Saini2703
Copy link
Author

@bandantonio Hello sir, regarding your query that how did I test it so I opened the affected markdown file in my editor and checked the preview and I carefully inspected the file, ensuring that the previously problematic HTML tags are no longer present in the preview and there are no unwanted tags , raw commands etc. and Im sharing the screenshot as you can see in picture that there is no unwanted tag are present and issue is resolved . So , sir if you like my work then reply me and telll me is your organisation participating in GSOC 2026.
Screenshot 2025-11-22 002847

@Pratham-Saini2703 Pratham-Saini2703 changed the title docs: fix rendering issue in tsc-voting-overview docs: fix https: Remove styling wrappers from TSC_VOTING_OVERVIEW to property render it on the website Nov 21, 2025
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