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

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

Merged
merged 4 commits into from
Feb 5, 2025

Conversation

albinAppsmith
Copy link
Collaborator

@albinAppsmith albinAppsmith commented Feb 5, 2025

Description

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

Fixes #39002

Automation

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

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/13153839322
Commit: f9140c9
Cypress dashboard.
Tags: @tag.All
Spec:


Wed, 05 Feb 2025 10:57:23 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

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

Copy link
Contributor

coderabbitai bot commented Feb 5, 2025

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • app/client/cypress/snapshots/Regression/ClientSide/VisualTests/JSEditorIndent_spec.js/formattedJSONBodyAfterSave.snap.png is excluded by !**/*.png

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The pull request updates the focus outline styling in the CodeEditor component by changing the outline-offset value from var(--ads-v2-offset-outline) to -1px in multiple selectors. The change affects both the .CodeMirror-focused and &:focus-visible selectors for the .CodeMirror.cm-s-duotone-light class, while keeping the existing border logic in the EditorWrapper constant. No public API or exported entities have been altered.

Changes

File(s) Change Summary
app/client/src/components/editorComponents/CodeEditor/styledComponents.ts Updated outline-offset to -1px in .CodeMirror-focused and &:focus-visible selectors; retained the existing border logic in EditorWrapper.

Assessment against linked issues

Objective Addressed Explanation
Fix focus ring rendering issues (#39002)

Possibly related PRs

Suggested labels

High, Production, QA

Suggested reviewers

  • hetunandu
  • ankitakinger

Poem

In the realm of code so fine,
A tiny tweak makes focus shine.
Outlines shift just one pixel left,
Ensuring views are right and deft.
Cheers to changes clear and neat,
Where style and function smoothly meet!
🎉 Happy coding!


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added Bug Something isn't working IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product Medium Issues that frustrate users due to poor UX Needs Triaging Needs attention from maintainers to triage Release Release Blocker This issue must be resolved before the release labels Feb 5, 2025
@albinAppsmith albinAppsmith added the ok-to-test Required label for CI label Feb 5, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
app/client/src/components/editorComponents/CodeEditor/styledComponents.ts (1)

108-117: Remove commented code block.

The commented code block is no longer needed since the focus ring styling is now handled by the active implementation.

-      /* ${(props) =>
-        props.isFocused &&
-        `outline: ${
-          props?.removeHoverAndFocusStyle
-            ? "none"
-            : "var(--ads-v2-border-width-outline) solid var(--ads-v2-color-outline)"
-        };
-        outline-offset: -1px;
-        clip-path: unset !important;
-        `} */
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1de2408 and ff8329c.

📒 Files selected for processing (1)
  • app/client/src/components/editorComponents/CodeEditor/styledComponents.ts (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-build / client-build
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-prettier / prettier-check
🔇 Additional comments (2)
app/client/src/components/editorComponents/CodeEditor/styledComponents.ts (2)

93-93: LGTM! Fixed focus ring overlapping.

The change from var(--ads-v2-offset-outline) to -1px resolves the focus ring issue.


409-409: LGTM! Consistent focus ring styling.

The outline-offset change maintains consistency with other focus states.

@albinAppsmith
Copy link
Collaborator Author

/build-deploy-preview skip-test=true

Copy link

github-actions bot commented Feb 5, 2025

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/13150896878.
Workflow: On demand build Docker image and deploy preview.
skip-tests: . env: .
PR: 39022.
recreate: .

Copy link

github-actions bot commented Feb 5, 2025

Deploy-Preview-URL: https://ce-39022.dp.appsmith.com

@albinAppsmith
Copy link
Collaborator Author

/build-deploy-preview skip-test=true

Copy link

github-actions bot commented Feb 5, 2025

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/13151173745.
Workflow: On demand build Docker image and deploy preview.
skip-tests: . env: .
PR: 39022.
recreate: .

Copy link

github-actions bot commented Feb 5, 2025

Deploy-Preview-URL: https://ce-39022.dp.appsmith.com

KelvinOm
KelvinOm previously approved these changes Feb 5, 2025
@albinAppsmith albinAppsmith merged commit 108c797 into release Feb 5, 2025
83 checks passed
@albinAppsmith albinAppsmith deleted the release-blocker/focus-ring branch February 5, 2025 11:16
albinAppsmith added a commit that referenced this pull request Feb 5, 2025
## Description

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

Fixes #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: f9140c9
> <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 -->

(cherry picked from commit 108c797)
github-actions bot pushed a commit to Zeral-Zhang/appsmith that referenced this pull request Feb 7, 2025
)

## Description

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

Fixes appsmithorg#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: f9140c9
> <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 -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product Medium Issues that frustrate users due to poor UX Needs Triaging Needs attention from maintainers to triage ok-to-test Required label for CI Release Blocker This issue must be resolved before the release Release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Issues wrt new implementation of focus rings in code editor
2 participants