fix: Release blocker: focus ring issue in code mirror (#39022)

## Description

Fixed focus ring overlapping issue for code mirror is addressed in this
PR.

Fixes https://github.com/appsmithorg/appsmith/issues/39002

## Automation

/ok-to-test tags="@tag.All"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/13153839322>
> Commit: f9140c98a8fc2a1b77ae344a6beac7cf021122fb
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13153839322&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Wed, 05 Feb 2025 10:57:23 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **Style**
- Standardized the focus outline styling in the editor component to
improve visual consistency when the editor is focused.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
albinAppsmith 2025-02-05 16:46:38 +05:30 committed by GitHub
parent 610051534f
commit 108c797714
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -90,7 +90,7 @@ export const EditorWrapper = styled.div<{
.CodeMirror-focused {
outline: var(--ads-v2-border-width-outline) solid
var(--ads-v2-color-outline) !important;
outline-offset: var(--ads-v2-offset-outline) !important;
outline-offset: -1px !important;
z-index: 1 !important;
}
`}
@ -106,13 +106,14 @@ export const EditorWrapper = styled.div<{
.cm-s-duotone-light.CodeMirror {
border-radius: var(--ads-v2-border-radius);
/* ${(props) =>
props.showFocusVisible &&
props.isFocused &&
`outline: ${
props?.removeHoverAndFocusStyle
? "none"
: "var(--ads-v2-border-width-outline) solid var(--ads-v2-color-outline)"
};
outline-offset: var(--ads-v2-offset-outline);
outline-offset: -1px;
clip-path: unset !important;
`} */
${(props) => props.isFocused && `clip-path: unset !important;`}
@ -402,13 +403,17 @@ export const EditorWrapper = styled.div<{
}
}
&:focus-visible {
.CodeMirror.cm-s-duotone-light {
outline: var(--ads-v2-border-width-outline) solid
var(--ads-v2-color-outline);
outline-offset: var(--ads-v2-offset-outline);
${(props) =>
props.showFocusVisible &&
`
&:focus-visible {
.CodeMirror.cm-s-duotone-light {
outline: var(--ads-v2-border-width-outline) solid
var(--ads-v2-color-outline);
outline-offset: -1px;
}
}
}
`}
${(props) =>
props.size === EditorSize.COMPACT ||