-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat: display rules used #5677
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
feat: display rules used #5677
Conversation
✅ Deploy Preview for continuedev canceled.
|
All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
recheck |
941a56e
to
74a4638
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- There is some jank when both rules + context items are used
- The rule peek is rendered first, then the context item is rendered above it, which causes jank. We can fix just by always rendering rules first since context items has lag
- Gap between context item + rules peek is a bit too big imo
- Can we add an affordance to click on the rule somewhere and view the file? Like we do in the notch

- I think we should only give ~1/3vh to the rules peek, right now appears to be closer to 2/3
- In a world where there are tens of rules, each potentially quite long, I lean towards setting a
line-clamp-3
(or maybe a few more lines) for individual rules. Imo the name of the rule is the most important thing, if you want the full text click on it and go to the file - Can we make the "Applies to all files" text color more subtle, like the "Source" text? Feels like it's drawing too much attention since it's quite close to the rule title
- It looks like newlines aren't being preserved
- "Global" is a bit vague to me. I think it's the right term but seeing it next to "Applies to all files" is confusing. Adding an info icon with hover text to explain what "Global" means would solve it imo
> | ||
<div className="flex w-full items-center"> | ||
{isGlobal ? ( | ||
<GlobeAltIcon className="mr-2 h-4 w-4 flex-shrink-0 text-gray-400" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a bit confusing to me when I only had global rules. Given we already have the "Global Rules" header, and the "Applies to all files" text, I lean towards just using the same PencilIcon that we have in the notch for all rules.
Description
display rules used
Checklist
Screenshots
Tests
[ What tests were added or updated to ensure the changes work as expected? ]