Skip to content

Comments

refactor: simplify feedback reactions#518

Open
gajjug004 wants to merge 3 commits intofrappe:developfrom
gajjug004:chore/simplify-feedback-reactions
Open

refactor: simplify feedback reactions#518
gajjug004 wants to merge 3 commits intofrappe:developfrom
gajjug004:chore/simplify-feedback-reactions

Conversation

@gajjug004
Copy link
Collaborator

@gajjug004 gajjug004 commented Feb 14, 2026

What

  • Replaced face emoji icons with thumbs-down and thumbs-up SVG icons in the feedback widget
  • Added a vertical divider between the two thumb buttons
  • Fixed vertical alignment between the two icons

Why

Thumbs up/down is a more universally recognized feedback pattern and cleaner visually than smiley faces.

How

  • Swapped SVG paths from face icons to Lucide thumbs-up/thumbs-down icons

Summary by CodeRabbit

  • Style
    • Redesigned the feedback widget with a unified icon system and improved spacing for better visual consistency.

@gajjug004 gajjug004 marked this pull request as ready for review February 17, 2026 04:40
@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

Walkthrough

This change refactors the feedback widget template to standardize its icon rendering system. The update replaces individual SVG markup for each reaction state (Good, Ok, Bad) with a unified icon-based architecture. Icon definitions now use per-reaction objects containing SVG paths, viewBox, and transform properties, rendered within a single shared SVG container. The markup is simplified by removing legacy mouth-specific code in favor of reusable icon structures. Spacing classes and divider logic are updated accordingly, with conditional dividers appearing between items except the last.

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Merge Conflict Detection ⚠️ Warning ❌ Merge conflicts detected (15 files):

⚔️ frontend/src/components/ContributionBanner.vue (content)
⚔️ frontend/src/pages/SpaceDetails.vue (content)
⚔️ wiki/api/wiki_space.py (content)
⚔️ wiki/frappe_wiki/doctype/wiki_change_request/test_wiki_change_request.py (content)
⚔️ wiki/frappe_wiki/doctype/wiki_change_request/wiki_change_request.py (content)
⚔️ wiki/frappe_wiki/doctype/wiki_document/wiki_document.py (content)
⚔️ wiki/frappe_wiki/doctype/wiki_revision/wiki_revision.json (content)
⚔️ wiki/frappe_wiki/doctype/wiki_revision/wiki_revision.py (content)
⚔️ wiki/hooks.py (content)
⚔️ wiki/patches.txt (content)
⚔️ wiki/templates/wiki/includes/feedback_widget.html (content)
⚔️ wiki/test_api.py (content)
⚔️ wiki/utils.py (content)
⚔️ wiki/wiki/doctype/wiki_page_patch/wiki_page_patch.js (content)
⚔️ wiki/wiki/doctype/wiki_page_patch/wiki_page_patch.py (content)

These conflicts must be resolved before merging into develop.
Resolve conflicts locally and push changes to this branch.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore/simplify feedback reactions' clearly summarizes the main change: refactoring feedback widget to use a simplified icon-based system instead of static mouth SVGs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

🧹 Nitpick comments (1)
wiki/templates/wiki/includes/feedback_widget.html (1)

7-10: Thumbs-down before thumbs-up is unconventional ordering.

Most feedback widgets (YouTube, Google, GitHub, etc.) place the positive action (👍) first/left and the negative action (👎) second/right. Swapping the order would better match user expectations.

Proposed fix
         {% set reactions = [
-            {"type": "Bad", "icon": '<path d="M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22h0a3.13 3.13 0 0 1-3-3.88Z"/>', "transform": "translate(0, 2)", "viewBox": "0 1 24 24"},
-            {"type": "Good", "icon": '<path d="M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2h0a3.13 3.13 0 0 1 3 3.88Z"/>', "transform": "translate(0, -2)", "viewBox": "0 -1 24 24"}
+            {"type": "Good", "icon": '<path d="M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2h0a3.13 3.13 0 0 1 3 3.88Z"/>', "transform": "translate(0, -2)", "viewBox": "0 -1 24 24"},
+            {"type": "Bad", "icon": '<path d="M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22h0a3.13 3.13 0 0 1-3-3.88Z"/>', "transform": "translate(0, 2)", "viewBox": "0 1 24 24"}
         ] %}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@wiki/templates/wiki/includes/feedback_widget.html` around lines 7 - 10, The
reactions array currently lists the negative ("Bad") reaction first and the
positive ("Good") second which is counter to common UX conventions; reorder the
entries in the reactions variable so the object with "type": "Good" comes before
the object with "type": "Bad" (update the reactions list in
wiki/templates/wiki/includes/feedback_widget.html), and ensure any code that
relies on the original index order (e.g., template rendering or event handlers
referencing reactions[0] / reactions[1]) still maps to the correct semantic
action after the swap.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@wiki/templates/wiki/includes/feedback_widget.html`:
- Around line 7-10: The reactions array currently lists the negative ("Bad")
reaction first and the positive ("Good") second which is counter to common UX
conventions; reorder the entries in the reactions variable so the object with
"type": "Good" comes before the object with "type": "Bad" (update the reactions
list in wiki/templates/wiki/includes/feedback_widget.html), and ensure any code
that relies on the original index order (e.g., template rendering or event
handlers referencing reactions[0] / reactions[1]) still maps to the correct
semantic action after the swap.

@NagariaHussain
Copy link
Collaborator

Add a demo/screenshots @gajjug004

@NagariaHussain NagariaHussain changed the title chore/simplify feedback reactions refactor: simplify feedback reactions Feb 17, 2026
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