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

[DONOTMERGE]: Tuning Fixed layout for dense layouts #38376

Open
wants to merge 1 commit into
base: release
Choose a base branch
from

Conversation

riodeuno
Copy link
Contributor

@riodeuno riodeuno commented Dec 26, 2024

  • Change Text Widget's font style to regular by default
  • Change minimum height for auto height feature to 10px.

Description

Tip

Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).

Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.

Fixes #Issue Number
or
Fixes Issue URL

Warning

If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.

Automation

/ok-to-test tags=""

🔍 Cypress test results

Warning

Tests have not run on the HEAD 3798700 yet


Thu, 26 Dec 2024 10:47:22 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Adjusted default text widget settings
    • Modified widget layout and sizing constraints
  • Bug Fixes

    • Updated text widget default font style from bold to regular
    • Reduced minimum widget height and padding

Copy link
Contributor

coderabbitai bot commented Dec 26, 2024

Walkthrough

The pull request introduces modifications to widget layout and sizing constants in the application. Specifically, changes are made to the WidgetConstants.tsx and TextWidget component, adjusting the widget padding to zero and reducing the minimum height of widgets from 4 to 1 rows. These changes appear to be aimed at providing more flexible and compact widget configurations.

Changes

File Change Summary
app/client/src/constants/WidgetConstants.tsx - WIDGET_PADDING changed from GridDefaults.DEFAULT_GRID_ROW_HEIGHT * 0.4 to 0
- WidgetHeightLimits.MIN_HEIGHT_IN_ROWS reduced from 4 to 1
app/client/src/widgets/TextWidget/widget/index.tsx - getDefaults() method updated:
* fontStyle changed from "BOLD" to "REGULAR"
* rows reduced from 4 to 1

Possibly related PRs

Suggested labels

skip-changelog, ok-to-test

Suggested reviewers

  • znamenskii-ilia
  • KelvinOm

Poem

Widgets shrink, padding fades away,
Rows collapse from four to one today,
Minimalist design takes its flight,
Compact and clean, a developer's delight! 🏗️✨


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6905aa9 and 3798700.

📒 Files selected for processing (2)
  • app/client/src/constants/WidgetConstants.tsx (2 hunks)
  • app/client/src/widgets/TextWidget/widget/index.tsx (1 hunks)
🔇 Additional comments (4)
app/client/src/constants/WidgetConstants.tsx (2)

111-111: Confirm zero padding usage
Setting WIDGET_PADDING to 0 might affect spacing or alignment in existing layouts. Verify if any components explicitly rely on non-zero padding.


196-196: Validate smaller widget heights
Reducing MIN_HEIGHT_IN_ROWS from 4 to 1 could cause visual or usability issues if widgets become too small.

app/client/src/widgets/TextWidget/widget/index.tsx (2)

66-66: Font style change
Switching the default fontStyle to "REGULAR" removes emphasis. Ensure this aligns with design requirements.


69-69: Reduced default rows
Changing default rows to 1 matches the updated constant and ensures consistency, but consider potential text overflow.


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.

@riodeuno
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

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

Copy link

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

Copy link

github-actions bot commented Jan 2, 2025

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

@github-actions github-actions bot added the Stale label Jan 2, 2025
@riodeuno riodeuno marked this pull request as ready for review January 3, 2025 04:14
Copy link

This PR has been closed because of inactivity.

@github-actions github-actions bot closed this Jan 10, 2025
@riodeuno riodeuno reopened this Jan 13, 2025
@riodeuno
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

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

Copy link

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

@github-actions github-actions bot removed the Stale label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant