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: Added rowGap and colGap as PropsToBeCssPrefixPrepended in Box component #38096

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

albinAppsmith
Copy link
Collaborator

@albinAppsmith albinAppsmith commented Dec 11, 2024

Description

rowGap and colGap was not accepting standard spaces values in Flex and Grid component. This PR fix that issue.

Fixes #38097

Automation

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

🔍 Cypress test results

Tip

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


Wed, 11 Dec 2024 10:01:27 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • New Features
    • Introduced new CSS properties rowGap and columnGap for enhanced grid layout management within the design system.

Copy link
Contributor

coderabbitai bot commented Dec 11, 2024

Walkthrough

The changes in this pull request involve the addition of two new properties, rowGap and columnGap, to the PropsToBeCssPrefixPrepended array in the Box.constants.ts file. These properties are intended to enhance the design system by allowing for better management of gaps in grid layouts, thereby expanding the CSS-related properties available for use.

Changes

File Path Change Summary
app/client/packages/design-system/ads/src/Box/Box.constants.ts Added rowGap and columnGap to PropsToBeCssPrefixPrepended.

Possibly related PRs

  • fix: remove gap between tabs and list #37242: This PR modifies the List component to adjust the positioning and padding, which is related to managing gaps in the layout, similar to the addition of rowGap and columnGap in the main PR.

Suggested labels

Task, IDE Product, ok-to-test

Suggested reviewers

  • hetunandu

🎉 In the land of code where gaps do play,
New properties join to brighten the way.
rowGap and columnGap, a stylish embrace,
Enhancing our grids, they take their place!
With each little change, our design takes flight,
Making layouts lovely, a true delight! 🌈


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. (Experiment)
  • @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 the Bug Something isn't working label Dec 11, 2024
@albinAppsmith albinAppsmith added the ok-to-test Required label for CI label Dec 11, 2024
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

🧹 Outside diff range and nitpick comments (1)
app/client/packages/design-system/ads/src/Box/Box.constants.ts (1)

30-31: Note naming inconsistency with PR description

The PR description uses "colGap" while the implementation uses "columnGap". While the implementation is correct (as it matches the CSS property name), this should be consistent in documentation.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 83db020 and 16b48de.

📒 Files selected for processing (1)
  • app/client/packages/design-system/ads/src/Box/Box.constants.ts (1 hunks)
🔇 Additional comments (2)
app/client/packages/design-system/ads/src/Box/Box.constants.ts (2)

30-31: Verify existing usage patterns

Let's check if these properties are already being used elsewhere in the codebase to ensure consistent implementation.

✅ Verification successful

Let me try a different approach to find any existing usage patterns. The previous command failed because of the file type specification, so let's try a broader search.


Properties are consistently used across the codebase

The rowGap and columnGap properties are already being used in multiple places:

  • Design system components (Flex, Grid)
  • Layout system utilities
  • Mobile responsive tests

The addition of these properties to Box.constants.ts aligns with existing usage patterns and maintains consistency across the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for existing usage of rowGap and columnGap in the codebase
rg -A 2 'rowGap|columnGap' --type typescript

Length of output: 81


Script:

#!/bin/bash
# Search for existing usage of rowGap and columnGap in the codebase
rg -i 'rowgap|columngap' 

# Also search for specific styled-system props usage
rg '"rowGap"|"columnGap"'

Length of output: 4709


30-31: Verify browser compatibility for rowGap and columnGap

The addition of these properties is logical, but let's verify if they need vendor prefixes in modern browsers.

@albinAppsmith albinAppsmith merged commit 61c90ce into release Dec 11, 2024
56 checks passed
@albinAppsmith albinAppsmith deleted the chore/grid-row-col-gap branch December 11, 2024 10:01
github-actions bot pushed a commit to Zeral-Zhang/appsmith that referenced this pull request Dec 12, 2024
…mponent (appsmithorg#38096)

## Description

rowGap and colGap was not accepting standard `spaces` values in Flex and
Grid component. This PR fix that issue.


Fixes appsmithorg#38097

## Automation

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

### 🔍 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/12273259261>
> Commit: 16b48de
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12273259261&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Wed, 11 Dec 2024 10:01:27 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

- **New Features**
- Introduced new CSS properties `rowGap` and `columnGap` for enhanced
grid layout management within the design system.

<!-- 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
Billing & Usage Pod 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.

[Task]: ADS Flex component to accept spaces values
2 participants