Skip to content

Added Text Transforms in Styles Panel #1689

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
Mar 29, 2025

Conversation

Rupak182
Copy link
Contributor

@Rupak182 Rupak182 commented Mar 29, 2025

Description

This PR adds the text transform feature to styles panel and provides the following options:

  • Capitalize
  • Uppercase
  • Lowercase
  • None

Related Issues

Related to #1530

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Release
  • Refactor
  • Other (please describe):

Testing

No Tests Added

Screenshots (if applicable)

demo.mp4

Additional Notes


Important

Adds textTransform feature to TextGroup in group.ts with options for text capitalization.

  • Feature Addition:
    • Adds textTransform option to TextGroup in group.ts with options: none, capitalize, uppercase, lowercase.

This description was created by Ellipsis for b74fe8b. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to b74fe8b in 1 minute and 57 seconds

More details
  • Looked at 15 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 drafted comments based on config settings.
1. apps/studio/src/lib/editor/styles/group.ts:245
  • Draft comment:
    Consider adding unit tests for the new textTransform feature.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
    This is a simple configuration addition that defines a style option using the existing SingleStyleImpl class. The implementation is using a standard pattern already used throughout the file. Unit testing a configuration value like this would be overkill since it's just data definition, not logic. The SingleStyleImpl class itself should already be tested elsewhere.
    Perhaps there could be integration tests needed to verify the text transform functionality works end-to-end? Maybe there are edge cases with text transformation that should be tested?
    The textTransform property is a standard CSS property with well-defined behavior. The code change is just configuration using an existing tested framework. Any integration testing would be part of the broader system, not specific to this simple addition.
    This comment should be deleted as it suggests unnecessary testing for what is essentially just configuration data using an existing pattern.
2. apps/studio/src/lib/editor/styles/group.ts:245
  • Draft comment:
    Consider renaming the label from 'Transform' to 'Text Transform' for clarity.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50%
    The current label 'Transform' appears within the TextGroup context, so its meaning is already clear from context. Other labels in this group like 'Color', 'Size', 'Weight' are similarly concise. The suggestion would break the consistent pattern of short labels used throughout the file. The property's purpose is already clear from its context and options.
    The current label could potentially be ambiguous since 'transform' can refer to other types of transformations in CSS. The longer name would be more explicit.
    The context of being in TextGroup and having text-specific options makes the meaning clear enough. Breaking the established pattern of concise labels would reduce consistency.
    The comment should be deleted as it suggests breaking the established naming pattern without providing sufficient benefit to clarity.
3. apps/studio/src/lib/editor/styles/group.ts:245
  • Draft comment:
    Consider renaming label from 'Transform' to 'Text Transform' for clarity.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50%
    None
4. apps/studio/src/lib/editor/styles/group.ts:247
  • Draft comment:
    Add tests for the new textTransform feature for better coverage.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
    While adding tests is generally good practice, this is a very simple style property definition that follows the exact same pattern as all other style properties in the file. The implementation is straightforward - it's just defining available options for a standard CSS property. Testing this would be overkill given its simplicity and similarity to existing patterns.
    Maybe there are complex interactions with other text styles that need testing? Maybe there's some custom handling of textTransform that isn't visible in this file?
    The implementation is extremely simple and follows an established pattern used throughout the file. There's no evidence of any complex behavior that would warrant special testing.
    The comment should be deleted as it suggests unnecessary testing for a very simple, standard style property definition.

Workflow ID: wflow_G79LPVGEgL38iiPc


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@Rupak182 Rupak182 changed the title Added Text Tranforms in Styles Panel Added Text Transforms in Styles Panel Mar 29, 2025
@Kitenite Kitenite merged commit 0ef9be3 into onlook-dev:main Mar 29, 2025
@Kitenite
Copy link
Contributor

awesome thanks @Rupak182 !

zongkelong pushed a commit to zongkelong/coolook that referenced this pull request Mar 31, 2025
…slation_zh

* 'main' of https://github.com/onlook-dev/onlook:
  Publish version v0.2.23 (onlook-dev#1694)
  Fix edit panel not fully hidden (onlook-dev#1695)
  Update file watcher and remove elide lines (onlook-dev#1693)
  Add sticky position (onlook-dev#1692)
  Publish version v0.2.22 (onlook-dev#1679)
  added text transforms (onlook-dev#1689)
  Update URL when changing project settings URL (onlook-dev#1690)
  fix: error when setting text color (onlook-dev#1688)
  Revert freestyle source (onlook-dev#1686)
ml-delaurier pushed a commit to ml-delaurier/nolook that referenced this pull request Apr 23, 2025
t1c1 pushed a commit to t1c1/onlookbotcodes that referenced this pull request Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants