-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
chore: chat widget polish fixes #37124
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,7 +101,7 @@ | |
); | ||
--icon-offset: calc((var(--input-height) - var(--icon-size)) / 2); | ||
|
||
bottom: var(--icon-offset); | ||
bottom: round(up, var(--icon-offset), 0.5px); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The suffix button was not properly aligned vertically due to rounding of pixel values. with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you take a before/after screenshot? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @KelvinOm It's 0.5 pixel diff. Hard to notice tbh. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jsartisan It seems that there is something wrong with sizes here. Flex should do the alignment for us without additional CSS. Anyway, if it works, let's move on. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Add fallback for browsers that don't support CSS round() function The CSS
bottom: var(--icon-offset);
bottom: round(up, var(--icon-offset), 0.5px); 🔗 Analysis chainVerify browser compatibility for CSS round() function. The use of Let's verify browser support for the CSS round() function: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Check if there's any fallback or @supports rule for browsers that don't support CSS round()
rg -i "(@supports|\bround\b.*\{)" app/client/packages/design-system
# Check package.json for any CSS polyfill dependencies
rg -g "package.json" -i "postcss|autoprefixer"
Length of output: 568 |
||
right: var(--icon-offset); | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { Button, Flex, Text } from "@appsmith/wds"; | ||
import type { ExtraProps } from "react-markdown"; | ||
import { Button, Flex, Text } from "@appsmith/wds"; | ||
import React, { useState, useCallback } from "react"; | ||
import { useThemeContext } from "@appsmith/wds-theming"; | ||
import { | ||
|
@@ -13,7 +13,7 @@ type CodeProps = React.ClassAttributes<HTMLElement> & | |
ExtraProps; | ||
|
||
export const Code = (props: CodeProps) => { | ||
const { children, className, ...rest } = props; | ||
const { children, className } = props; | ||
const match = /language-(\w+)/.exec(className ?? ""); | ||
const theme = useThemeContext(); | ||
const [copied, setCopied] = useState(false); | ||
|
@@ -50,9 +50,7 @@ export const Code = (props: CodeProps) => { | |
</SyntaxHighlighter> | ||
</div> | ||
) : ( | ||
<code {...rest} className={className}> | ||
{children} | ||
</code> | ||
<code className={className}>{children}</code> | ||
); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is done to avoid passing the of whole node object to code dom element. |
||
}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,6 +95,12 @@ | |
overflow: auto; | ||
} | ||
|
||
code:not(pre code) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the styling of inline code. added |
||
padding-inline: var(--inner-spacing-1); | ||
background: var(--color-bg-accent-subtle); | ||
border-radius: var(--border-radius-elevation-3); | ||
} | ||
|
||
pre { | ||
margin-top: var(--inner-spacing-4); | ||
margin-bottom: var(--inner-spacing-4); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,16 @@ import { | |
} from "utils/AppsmithUtils"; | ||
|
||
const StyledSegmentedControl = styled(SegmentedControl)` | ||
&.ads-v2-segmented-control { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
gap: 0; | ||
} | ||
|
||
> .ads-v2-segmented-control__segments-container { | ||
flex: 1 1 0%; | ||
flex: 1 1 auto; | ||
} | ||
|
||
> .ads-v2-segmented-control__segments-container:has(.ads-v2-text) span { | ||
padding: 0; | ||
Comment on lines
+15
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification CSS changes need adjustment to maintain consistency The changes in IconTabControl override base styles in a way that could break consistency with other components. Specifically:
Please update the CSS to:
🔗 Analysis chainLGTM, but please verify visual alignment The CSS changes look good and align with the chat widget polish objectives. The flex and padding adjustments should improve the visual consistency. Let's verify if these changes affect other components using SegmentedControl: Let me search for both the component name and the CSS class to understand its usage across the codebase. The previous command failed because the file type flag wasn't supported, so I've modified the approach to be more inclusive. I need to verify if these CSS changes in IconTabControl are overriding any base styles and how they might affect other components using the same class names. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Find other components using SegmentedControl to verify visual impact
rg -l "SegmentedControl" --type tsx
Length of output: 63 Script: #!/bin/bash
# Find files containing SegmentedControl using ripgrep without file type restriction
rg -l "SegmentedControl"
# Also search for the specific class name used in the CSS
rg -l "ads-v2-segmented-control"
Length of output: 3650 Script: #!/bin/bash
# Let's check the base SegmentedControl component to understand the default styling
cat app/client/packages/design-system/ads/src/SegmentedControl/SegmentedControl.styles.tsx
# Also check other components that might be affected by these changes
cat app/client/src/pages/Editor/MainContainerWidthToggles.tsx
cat app/client/src/pages/Editor/AppSettingsPane/AppSettings/NavigationSettings/ButtonGroupSetting.tsx
Length of output: 7118 |
||
} | ||
`; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done to hide seperator on left of current selected element as well.
cc: @albinAppsmith