-
Notifications
You must be signed in to change notification settings - Fork 227
chore: cursor utilities [CSS-1222] #5505
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
base: main
Are you sure you want to change the base?
Conversation
|
Branch previewReview the following VRT differencesWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
If the changes are expected, update the |
Tachometer resultsCurrently, no packages are changed by this PR... |
cfec722
to
4f1aeea
Compare
22e3fb9
to
679219a
Compare
8d00142
to
c796a9d
Compare
I am experiencing some confusion. Currently, Jira tickets are created by us- so will cursor create the jira tickets after merging this?? |
c796a9d
to
f271758
Compare
@blunteshwar No, there's no access tokens for our Jira instance at this time so it can't make them but it can output the template for you via a prompt. For example, I've attached this instruction guide and described what I'd like to create a ticket for in plain language and it's stubbed out the information appropriately using the template. Then, after some clean-up, I can copy and paste that content into Jira. |
d868b45
to
45f7257
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.
I had a couple of questions for you!
.cursor/README.md
Outdated
|
||
## Rule structure | ||
|
||
Rules are defined in `rules.json` and follow this structure: |
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.
Should this just say "Rules are defined in the rules
directory? Or .cursor/rules
directory? Or config.json
? There's not a rules.json
file, that's all.
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.
Yes! Great call-out. I've clarified this in the README by calling out the rules directory and the config.json
.cursor/config.json
Outdated
}, | ||
"validation": { | ||
"jira_tickets": { | ||
"title": { |
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.
What's the difference with one jira_tickets
object being under validation
, vs the other that's just on its own? They're almost identical, with really small differences (like one has title
, while the other has title_format
).
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.
Oh I don't know, great question. I'm going to remove the validation section in favor of the top-level object.
.cursor/README.md
Outdated
|
||
To modify these rules: | ||
|
||
1. Edit `rules.json` |
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.
Could we say "Edit the desired rule files in the rules
directory" instead, since rules.json
isn't a thing?
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.
Yes, I updated this as you suggested
45f7257
to
d53786b
Compare
.cursor/rules/branch-naming.json
Outdated
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.
What is the reasoning behind this file being .json
and the others being .mdc
? I only saw .mdc
in the docs.
With an extra prompt to use this file, I was able to get Cursor to suggest a branch name that looked more like what we use. The first time it returned feature/flexible-max-width-utility
, but with the reference to use branch-naming.json
, I got marissa/feat-flexible-max-width-utility
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.
Nice call-out! I actually asked Cursor to fix this haha!
2. Rules can be toggled using the `enabled` flag | ||
3. Custom error messages will be shown when rules are violated | ||
4. Exceptions are handled through the `exceptions` field in relevant rules | ||
|
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.
Would we like to say anything about @ mentioning the rules in a chat? I made changes to a file, and then put this into the chat: @text-formatting.mdc double check the changes i made in the new jira ticket file.
so that cursor would basically lint my changes based on the text-formatting rules.
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.
I had to @ mention the jira ticket MDC file as well. This definitely could be something I'm doing in the wrong order or something.
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.
Ok I tried to do some validation for this.
Creating a Jira ticket 👇
[CSS] Add text-wrap:balance to improve text wrapping
Overview
Implement text-wrap:balance
CSS property to improve text wrapping behavior in components like toast bodies and alert headings. This property provides better text balance and readability while maintaining current rendering as a fallback for browsers that don't support it.
Acceptance criteria
- Implement
text-wrap:balance
in the following components:sp-toast
body textsp-alert
headings
- Verify fallback behavior in unsupported browsers
- Test across different text lengths and container widths
- Document browser support and fallback behavior
Estimated internal impact
- Minimal implementation effort (CSS property addition only)
- No JavaScript changes required
- No breaking changes to existing behavior
Estimated external impact
- Improved readability of multi-line text
- Better visual balance in constrained-width components
- No negative impact on browsers that don't support the property
Anticipated reviewing audience
- CSS team
- Component maintainers
- Design team
Proposed solutions
Add text-wrap:balance
to the following components:
sp-toast {
text-wrap: balance;
}
sp-alert {
text-wrap: balance;
}
Supplementary documentation
- Browser support: High (nearly fully interoperable)
- MDN documentation: https://developer.mozilla.org/en-US/docs/Web/CSS/text-wrap
- Current fallback behavior will be maintained for unsupported browsers
Labels
- feature
Check text-formatting 👇

Creating a bug issue 👇
(I prompted it to use the bug-report.yaml
template)
Code of conduct
- I agree to follow this project's code of conduct.
Impacted component(s)
sp-toast, sp-alert
Expected behavior
Text in components with constrained widths should use text-wrap:balance
for improved readability and visual balance. This property is nearly fully interoperable and provides graceful fallback to current rendering behavior.
Actual behavior
Components like sp-toast
and sp-alert
do not use text-wrap:balance
CSS property, resulting in suboptimal text wrapping and poor visual balance in multi-line text content. Text wrapping follows default browser behavior with no specific text balance optimization for multi-line text.
Screenshots
N/A - This is a feature enhancement request rather than a visual bug
What browsers are you seeing the problem in?
- Firefox
- Chrome
- Safari
- Microsoft Edge
How can we reproduce this issue?
- Create a toast or alert with multi-line text content
- Observe the text wrapping behavior in constrained width containers
- Compare with what the layout would look like with
text-wrap:balance
applied - Notice the suboptimal text balance
Sample code or abstract reproduction which illustrates the problem
<sp-toast open>
This is a longer message that will wrap across multiple lines and could benefit from better text balance
</sp-toast>
<sp-alert>
<div slot="heading">This is a longer heading that spans multiple lines</div>
Alert content here
</sp-alert>
Severity
SEV 5
Logs taken while reproducing problem
N/A - No console errors, this is an enhancement request
Would you like to track this issue in Jira?
- Yes, please tell me the ticket number!
d53786b
to
48a6930
Compare
52ffaad
to
28576b6
Compare
28576b6
to
2d1b585
Compare
Description
Added structured rules configuration for Cursor to enforce consistent formatting in documentation and Jira tickets. This includes:
Motivation and context
This change provides automated enforcement of our documentation standards and Jira ticket formatting, ensuring consistency across the project. It helps team members create well-structured tickets and maintain consistent documentation formatting without manual oversight.
Related issue(s)
Author's checklist
Reviewer's checklist
patch
,minor
, ormajor
featuresManual review test cases
Verify Jira ticket formatting rules
Verify template enforcement
Verify label validation