Open
Conversation
fileList
- Eliminated the inputWidth setting from the settings form to streamline configuration. - Adjusted TextFieldComponent to rely on fullStyle for width, enhancing layout consistency.
- Changed comment syntax from `//` to `/* */` for consistency in styles.ts. - Removed inline styles from TextAreaWrapper for cleaner component structure. - Updated style handling in RateComponent and SwitchComponent to safely access `allStyles` with optional chaining, enhancing robustness.
…height logic - Updated ConfigurableFormItemLive to simplify width and height calculations, ensuring better layout consistency. - Removed the useValidationHeight hook and related logic to enhance performance and reduce complexity. - Adjusted stylingUtils to eliminate unnecessary parameters, focusing on essential dimension calculations. - Added preserveDimensionsInDesigner property to various components for improved layout handling in design mode.
- Updated styles.ts to improve overflow handling by checking for object types. - Enhanced ConfigurableItemAutocompleteComponent to safely parse JSON expressions with error handling. - Adjusted ProgressWrapper to use nullish coalescing for percent value assignment. - Ensured safe access to dimensionsStyles in RichTextEditorComponent to prevent potential runtime errors.
…idth Thulasizwe/en/form components width
… layout - Added useStyles import to ConfigurableFormItemLive for better styling management. - Updated className assignment to include styles from useStyles, enhancing component appearance. - Simplified styles.ts by removing unused properties and logic, streamlining the styling process.
…idth refactor: integrate styles into ConfigurableFormItemLive
- Removed unused comments in styles.ts to improve code clarity. - Updated dimensionUtils to use a constant for the number of dimensions, enhancing maintainability. - Adjusted setCanvasWidth function to accept both number and string types for better flexibility.
- Updated setCanvasWidth function to ensure width is always a string with 'px' suffix when a number is provided, enhancing type handling and consistency.
…idth Thulasizwe/en/form components width
…styles - Integrated designerConstants for default margin values in ConfigurableFormItemLive. - Updated margin handling to differentiate between designer and live modes, ensuring proper layout. - Removed unused styles and the useStyles import from ConfigurableFormItemLive, streamlining the component. - Adjusted ImageField component to utilize dynamic width and height from styles, improving responsiveness.
…idth refactor: enhance ConfigurableFormItemLive margins
…idth fix: add missing newline at end of image.tsx file
…les and classNames - Eliminated the useStyles import and classNames from ConfigurableFormItemSetting, streamlining the component. - Adjusted tooltip handling to ensure proper display of model descriptions. - Cleaned up the Form.Item component by removing unnecessary className and style properties.
…idth refactor: simplify ConfigurableFormItemSetting by removing unused styles
- Removed explicit width and height styles from DropdownComponent and NumberFieldComponent, allowing for more flexible styling. - Ensured that styles are applied consistently across components, enhancing maintainability and responsiveness.
- Introduced useStyles in ConfigurableFormItemSetting and FormItem for improved styling management. - Updated className assignments to utilize dynamic styles, ensuring consistent margins and layout. - Adjusted tooltip handling in ConfigurableFormItemSetting to allow for undefined values. - Cleaned up styles in various components to enhance maintainability and responsiveness.
- Removed unnecessary imports and whitespace in styles and component files for better readability. - Enhanced the use of dynamic styles in LabelConfigurator and FormItem components to ensure consistent layout. - Streamlined the LabelConfiguratorComponent by adjusting prop formatting for improved clarity.
…idth Thulasizwe/en/form components width
…idth Thulasizwe/en/form components width
Katleho/fix/form configs
- Added width property to border input settings for better alignment. - Cleaned up styles in settings input components to ensure consistent layout and responsiveness. - Adjusted conditional rendering logic in settings input for improved clarity.
…idth Thulasizwe/en/form components width
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Shesha Width Properties Affecting the wrong width #3557
Summary by CodeRabbit
This PR resolves three critical rendering issues in the designer:
When a component's width was set to 50% in the designer, it would incorrectly render at 25% due to cascading style application. The wrapper element received a 50% width allocation, and the component itself also inherited 50% width from allStyles, resulting in a compounded calculation (50% × 50% = 25%).
Form items displayed incorrect total widths because label dimensions were not accounted for in the width calculations.
Viewport width (vw) units were not being converted to canvas-relative values within the designer environment. Consequently, components styled with 100vw would overflow beyond the canvas boundaries, as the calculation did not account for the screen space occupied by side panels.
New Features
Style
Bug Fixes