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

Experimenting on at-mentions popover positioning #6705

Closed
wants to merge 1 commit into from

Conversation

acelaya
Copy link
Contributor

@acelaya acelaya commented Dec 3, 2024

POC on adding a Popover that is displayed when writing @ in the annotations textarea, and is positioned relative to the caret position.

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 14 lines in your changes missing coverage. Please review.

Project coverage is 99.29%. Comparing base (c738173) to head (50c7cd0).

Files with missing lines Patch % Lines
src/sidebar/components/MarkdownEditor.tsx 60.00% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6705      +/-   ##
==========================================
- Coverage   99.43%   99.29%   -0.14%     
==========================================
  Files         271      271              
  Lines       10215    10250      +35     
  Branches     2434     2437       +3     
==========================================
+ Hits        10157    10178      +21     
- Misses         58       72      +14     

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

@acelaya acelaya force-pushed the at-mentions-experiment branch from 3aea670 to 50c7cd0 Compare December 5, 2024 11:25
@acelaya
Copy link
Contributor Author

acelaya commented Dec 10, 2024

This has been a good experiment, but it's currently trying to solve two problems at once: 1) popover positioning based on caret location, and 2) when should the popover open or close.

In order to ease reviwwing, I'm going to close this PR and move the logic to three separate PRs:

  1. Create a popover that anchors to the textarea itself and implement the open/close logic based on what is written.
  2. Move the anchor to a "virtual" element that ensures the popover shows next to the caret location (this has been the main focus of this PR)
  3. Display a list of users who already annotated the document, and allow client-side filtering and arrow-key navigation.

The three of them will be hidden behind a feature flag.

@acelaya acelaya closed this Dec 10, 2024
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.

1 participant