Skip to content

Conversation

@jrepp
Copy link
Owner

@jrepp jrepp commented Nov 21, 2025

Summary

  • Replaced fixed-position feedback button with bottom slide-up panel
  • Added selection expansion controls (extend left/right) for easier text adjustment
  • Implemented mobile-responsive design that avoids conflicts with browser UI (dictionary/search popups)

Changes

  • New FeedbackPanel.tsx component with bottom panel UI
  • Enhanced CSS with mobile optimizations and safe area inset support
  • Selection helper buttons for expanding selection word-by-word
  • Updated main Feedback component to use new panel

Test plan

  • Build passes with no TypeScript errors
  • Test on mobile device (iOS/Android)
  • Verify panel slides up from bottom on text selection
  • Test extend left/right buttons expand selection correctly
  • Confirm no conflicts with mobile browser UI elements
  • Verify dark mode styling
  • Test submit feedback flow end-to-end

User request: "I want to work on the auto feedback system in ./docusaurus when I use this on mobile it is often covered up by the browsers built in dictionary/search bubble popup that happens when you select text, we need something that's more of a panel popout from the bottom that shows a simple submission window and then has little selection helper buttons for taking in more text on the right and left of the current selection"

Co-Authored-By: Claude <[email protected]>
Copilot AI review requested due to automatic review settings November 21, 2025 09:50
@mergify mergify bot added documentation Improvements or additions to documentation size/xs labels Nov 21, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR replaces the fixed-position feedback button with a mobile-friendly bottom slide-up panel that appears when users select text. The new implementation includes word-by-word selection expansion controls and uses safe area insets to avoid conflicts with mobile browser UI elements.

Key Changes:

  • Introduced a new FeedbackPanel component that displays as a bottom panel with slide-up animation
  • Added "Extend left/right" buttons that allow users to expand their text selection by word boundaries
  • Implemented mobile-responsive CSS with safe area inset support for iOS devices

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
docusaurus/src/components/Feedback/index.tsx Updated to import and render FeedbackPanel instead of FeedbackButton
docusaurus/src/components/Feedback/FeedbackPanel.tsx New component implementing the bottom panel UI with selection detection and expansion controls
docusaurus/src/components/Feedback/Feedback.module.css Added comprehensive styling for the panel, buttons, and mobile-responsive layout with dark mode support

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

setIsVisible(false);
setSelectedText('');
setSelectionRange(null);
window.getSelection()?.removeAllRanges();
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

Clearing the text selection when closing the panel removes user feedback and may be disorienting. Consider preserving the selection so users can see what text they had selected, especially if they accidentally close the panel or want to make a different selection.

Suggested change
window.getSelection()?.removeAllRanges();
// Do not clear the user's text selection to preserve feedback

Copilot uses AI. Check for mistakes.
let timeoutId: NodeJS.Timeout;
const debouncedHandleSelection = () => {
clearTimeout(timeoutId);
timeoutId = setTimeout(updateSelection, 300);
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

The 300ms debounce delay may feel sluggish on mobile devices where users expect immediate feedback after lifting their finger. Consider reducing this to 100-150ms for better responsiveness, especially since the touchend event already signals the end of a selection gesture.

Suggested change
timeoutId = setTimeout(updateSelection, 300);
timeoutId = setTimeout(updateSelection, 120);

Copilot uses AI. Check for mistakes.
newOffset--;
}

newOffset = Math.max(0, newOffset + 1);
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

When the word starts at index 0, newOffset will be -1 after the while loop (line 71-72), and Math.max(0, newOffset + 1) results in 1, skipping the first character. The calculation should be Math.max(0, newOffset) after incrementing by 1 only when newOffset is not already at a word boundary.

Suggested change
newOffset = Math.max(0, newOffset + 1);
newOffset = newOffset < 0 ? 0 : newOffset + 1;

Copilot uses AI. Check for mistakes.
z-index: 9999;
transform: translateY(100%);
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
max-height: 50vh;
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

A 50vh max-height may be too restrictive on mobile devices in landscape mode where viewport height is very limited. Consider using a larger percentage (e.g., 70vh) or a combination of vh and pixel values to ensure adequate space for content on all orientations.

Suggested change
max-height: 50vh;
max-height: min(70vh, 600px);

Copilot uses AI. Check for mistakes.
User request: "can i change the global color scheme of claude to something in the blues and yellows?"

Co-Authored-By: Claude <[email protected]>
@mergify
Copy link

mergify bot commented Nov 21, 2025

The PR Status Check has failed. Please review the CI logs and fix any issues.

Common issues:

  • Test failures
  • Linting errors
  • Documentation validation failures

You can run checks locally:

task test-parallel-fast  # Run tests
task lint-parallel       # Run linters
uv run tooling/validate_docs.py  # Validate docs

@mergify
Copy link

mergify bot commented Nov 21, 2025

🧪 CI Insights

Here's what we observed from your CI run for 0ca765b.

🟢 All jobs passed!

But CI Insights is watching 👀

@mergify
Copy link

mergify bot commented Nov 25, 2025

The PR Status Check has failed. Please review the CI logs and fix any issues.

Common issues:

  • Test failures
  • Linting errors
  • Documentation validation failures

You can run checks locally:

task test-parallel-fast  # Run tests
task lint-parallel       # Run linters
uv run tooling/validate_docs.py  # Validate docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants