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: improved widgets layout #31471

Merged
merged 3 commits into from Mar 5, 2024
Merged

fix: improved widgets layout #31471

merged 3 commits into from Mar 5, 2024

Conversation

KelvinOm
Copy link
Collaborator

@KelvinOm KelvinOm commented Mar 4, 2024

Description

  • Fixed text input widget width
  • Increased size of the separator for toolbarButtons
  • Fixed widgets label
  • Fixed behaviour for Boolean widgets. Removed Checkbox and Radio labelPosition. Fixed width for these widgets

PR fixes following issue(s)

Fixes # (issue number)
#29088
#31250

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Testing

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration.
Delete anything that is not relevant

  • Manual
  • JUnit
  • Jest
  • Cypress

Checklist:

Dev activity

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • PR is being merged under a feature flag

@KelvinOm KelvinOm requested review from ichik and jsartisan March 4, 2024 15:29
Copy link
Contributor

coderabbitai bot commented Mar 4, 2024

Walkthrough

Walkthrough

This series of changes focuses on enhancing the design system and widgets within a client application. It includes updates to CSS styling for better alignment and presentation, adjustments to widget properties for consistency in label positioning, and removals of unused or redundant configurations. The modifications aim to streamline the user interface and improve the overall user experience by refining visual elements and simplifying widget configurations.

Changes

Files Change Summary
.../design-system/widgets/src/components/ActionGroup/src/styles.module.css
.../design-system/widgets/src/components/Switch/src/styles.module.css
.../design-system/widgets/src/styles/src/field.module.css
.../design-system/widgets/src/styles/src/inline-label.module.css
.../design-system/widgets/src/styles/src/text-input.module.css
Updated CSS styling for various components including new rules and adjustments to sizing, gap, and width properties.
.../design-system/widgets/src/components/CheckboxGroup/src/CheckboxGroup.tsx
.../design-system/widgets/src/components/RadioGroup/src/RadioGroup.tsx
Updated labelClassName property from "body" to "caption" for label styling.
.../layoutSystems/anvil/common/AnvilFlexComponent.tsx Removed a specific CSS class from a div element.
.../widgets/wds/WDSCheckboxGroupWidget/config/defaultsConfig.ts
.../widgets/wds/WDSCheckboxWidget/config/defaultsConfig.ts
.../widgets/wds/WDSRadioGroupWidget/widget/config/defaultsConfig.ts
.../widgets/wds/WDSSwitchGroupWidget/config/defaultsConfig.ts
Adjusted default configurations, including the removal of labelPosition property and changing default label positions.
.../widgets/wds/WDSCheckboxGroupWidget/config/propertyPaneConfig/contentConfig.ts
.../widgets/wds/WDSCheckboxWidget/config/propertyPaneConfig/contentConfig.ts
.../widgets/wds/WDSRadioGroupWidget/widget/config/propertyPaneConfig/contentConfig.ts
Removed configuration for setting the label position in the property pane.
.../widgets/wds/WDSCheckboxGroupWidget/widget/index.tsx
.../widgets/wds/WDSCheckboxWidget/widget/index.tsx
.../widgets/wds/WDSRadioGroupWidget/widget/index.tsx
Removed labelPosition prop affecting label positioning handling within widgets.
.../widgets/wds/WDSCheckboxWidget/widget/types.ts
.../widgets/wds/WDSRadioGroupWidget/widget/types.ts
Removed labelPosition property from widget props interface.
.../widgets/wds/WDSIconButtonWidget/config/metaConfig.ts
.../widgets/wds/WDSMenuButtonWidget/config/metaConfig.ts
Updated widget names for consistency in naming convention.

Related issues

  • appsmithorg/appsmith#22748: The changes made to the group components' layout and styling could potentially address the objectives of improving layouting of group components by aligning them better and adding tests for UI related props. The adjustments to CSS and widget configurations in this PR seem aligned with the issue's goals for enhanced alignment and presentation.
  • appsmithorg/appsmith#30768: Although this issue focuses on implementing a fixed layout for widgets, the enhancements and adjustments made in this PR indirectly support the broader goal of maintaining consistent widget placement and appearance, which could contribute to the objectives outlined in the issue by ensuring better control over widget styling and properties.

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>.
    • Generate unit-tests for this file.
  • 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 tests 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@github-actions github-actions bot added the Bug Something isn't working label Mar 4, 2024
@Nikhil-Nandagopal Nikhil-Nandagopal added Release Low An issue that is neither critical nor breaks a user flow labels Mar 4, 2024
@@ -98,7 +98,7 @@ export const AnvilFlexComponent = forwardRef(
ref={ref}
style={anvilWidgetStyleProps}
>
<div className="h-full w-full">{children}</div>
{children}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

@KelvinOm Removing this is causing issues in the fill widget width in the deploy mode. Let's make sure that issue doesn't re-occur. Then we can safely merge this.
Please call it out if you'd like someone from Anvil to own this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@riodeuno I have checked that everything is working as expected. I'll write a message to Anvil channel anyway after after DP update.

@KelvinOm KelvinOm merged commit 07279c0 into release Mar 5, 2024
49 of 50 checks passed
@KelvinOm KelvinOm deleted the fix/widget-width branch March 5, 2024 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Low An issue that is neither critical nor breaks a user flow Release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants