8000 fix: Type features leak in WDS by ichik · Pull Request #40070 · appsmithorg/appsmith · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: Type features leak in WDS #40070

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

Merged
merged 1 commit into from
Apr 3, 2025
Merged

fix: Type features leak in WDS #40070

merged 1 commit into from
Apr 3, 2025

Conversation

ichik
Copy link
Contributor
@ichik ichik commented Apr 3, 2025

Description

Fixes #39928

Automation

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

🔍 Cypress test results

Tip

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


Thu, 03 Apr 2025 13:18:44 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • Style
    • Refined typography by adjusting font feature settings and letter spacing to ensure consistent text rendering and visual appearance across components.

@ichik ichik requested a review from jsartisan April 3, 2025 12:53
@ichik ichik requested a review from a team as a code owner April 3, 2025 12:53
Copy link
Contributor
coderabbitai bot commented Apr 3, 2025

Walkthrough

This pull request modifies the ThemeProvider component in the theming package. The update adjusts the inline styles on a <div> by spreading the existing style object and adding two new CSS properties: fontFeatureSettings set to "'ss03' 0" and letterSpacing set to "0". A comment has been added to reference an external CSS file for context. No changes were made to the exported or public entities.

Changes

File Change Summary
app/client/.../ThemeProvider.tsx Updated inline style in ThemeProvider to merge existing styles with added properties: fontFeatureSettings: "'ss03' 0" and letterSpacing: "0". Added a comment for context.

Assessment against linked issues

Objective Addressed Explanation
Fix typography issues with OpenType CSS configuration (#39928)

Poem

In the code where styles align,
A tweak unfolds by design,
Fonts reset with artful grace,
Letters dance in their rightful place,
CodeRabbit smiles at each refined line!

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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 AI Agents Issues related to agentic solutions on Appsmith Anvil Pod Issue related to Anvil project Task A simple Todo Bug Something isn't working labels Apr 3, 2025
@ichik ichik added ok-to-test Required label for CI and removed Bug Something isn't working labels Apr 3, 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/packages/design-system/theming/src/theme/src/ThemeProvider.tsx (1)

40-45: Good approach to prevent style leakage.

The implementation correctly resets OpenType features and letter spacing to prevent them from affecting child widgets. The spread operator properly preserves existing styles while overriding specific properties.

Consider adding a more descriptive variable name or constant for these reset styles to improve maintainability:

// Resetting the ADS OpenType features and type settings, so they don't leak into widgets, see https://github.com/appsmithorg/appsmith/blob/release/app/client/packages/design-system/ads/src/__theme__/default/index.css?plain=1#L310
+ const resetTypographyStyles = {
+   fontFeatureSettings: "'ss03' 0",
+   letterSpacing: "0",
+ };

style={{
  ...style,
-  fontFeatureSettings: "'ss03' 0",
-  letterSpacing: "0",
+  ...resetTypographyStyles,
}}
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between c1ea22e and 76d2cf3.

📒 Files selected for processing (1)
  • app/client/packages/design-system/theming/src/theme/src/ThemeProvider.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-build / client-build
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: chromatic-deployment
  • GitHub Check: storybook-tests
  • GitHub Check: chromatic-deployment

@github-actions github-actions bot added the Bug Something isn't working label Apr 3, 2025
@ichik ichik enabled auto-merge (squash) April 3, 2025 13:12
@ichik ichik merged commit ed69c2c into release Apr 3, 2025
54 of 55 checks passed
@ichik ichik deleted the fix/wds-ads-type-leak branch April 3, 2025 13:18
github-actions bot pushed a commit to Zeral-Zhang/appsmith that referenced this pull request Apr 12, 2025
## Description

Fixes appsmithorg#39928 

## Automation

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

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]
> 🟣 🟣 🟣 Your tests are running.
> Tests running at:
<https://github.com/appsmithorg/appsmith/actions/runs/14243470954>
> Commit: 76d2cf3
> Workflow: `PR Automation test suite`
> Tags: `@tag.Anvil`
> Spec: ``
> <hr>Thu, 03 Apr 2025 12:54:05 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **Style**
- Refined typography by adjusting font feature settings and letter
spacing to ensure consistent text rendering and visual appearance across
components.

<!-- 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
AI Agents Issues related to agentic solutions on Appsmith Anvil Pod Issue related to Anvil project Bug Something isn't working ok-to-test Required label for CI Task A simple Todo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: Typography issues in widgets
2 participants
0