-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
refactor(ui/v2): Update icons and search bars on schema tab, glossary search, domain search #12740
base: master
Are you sure you want to change the base?
Conversation
… search, domain search
@@ -43,7 +46,7 @@ const meta = { | |||
}, | |||
color: { | |||
description: 'The color of the Button.', | |||
options: ['violet', 'green', 'red', 'blue', 'gray'], | |||
options: ['violet', 'green', 'red', 'gray'], |
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.
Request from Anna (no blue buttons)
table: { | ||
defaultValue: { summary: buttonDefaults.size }, | ||
}, | ||
control: { | ||
type: 'select', | ||
}, | ||
}, | ||
iconSize: { |
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.
Attached to icon
now. Unfortunately, storybook doesn't have great support for nested fields: storybookjs/storybook#12078
icon: { | ||
description: 'The icon to display in the Button.', | ||
type: 'string', | ||
options: AVAILABLE_ICONS, | ||
mapping: Object.fromEntries([ |
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.
Maps options
to props for Button
component
@@ -167,7 +161,7 @@ type Story = StoryObj<typeof meta>; | |||
// Pass props to this so that it can be customized via the UI props panel | |||
export const sandbox: Story = { | |||
tags: ['dev'], | |||
render: (props) => <Button {...props}>Button</Button>, | |||
render: (props) => <Button {...props} />, |
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.
Properly set children
@@ -81,7 +81,7 @@ const getButtonColorStyles = (variant: ButtonVariant, color: ColorOptions): Colo | |||
|
|||
bgColor: colors.transparent, | |||
borderColor: colors.transparent, | |||
hoverBgColor: colors.transparent, | |||
hoverBgColor: colors.gray[1500], |
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.
Request from Anna: adds light gray on hover of "text" buttons
vertical: 6, | ||
horizontal: 6, |
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.
Not actually used but this seems more appropriate
if (isCircle) return { padding: spacing.xsm }; | ||
if (!hasChildren) return { padding: spacing.xsm }; |
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.
Custom padding for buttons that are just icons
@@ -208,7 +190,7 @@ const getButtonPadding = (size: SizeOptions, variant: ButtonVariant, isCircle: b | |||
|
|||
const selectedStyle = paddingStyles[size]; | |||
const verticalPadding = selectedStyle.vertical; | |||
const horizontalPadding = variant === 'text' ? 0 : selectedStyle.horizontal; |
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.
Adding padding back to text buttons after talking to Anna
import React from 'react'; | ||
import { StyledSearchBar } from './components'; | ||
import { SearchBarProps } from './types'; | ||
|
||
export const searchBarDefaults: SearchBarProps = { | ||
placeholder: 'Search...', | ||
value: '', | ||
width: '272px', | ||
width: '100%', |
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.
Default to 100% instead, I do make the corresponding change in StructuredProperties.tsx
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.
anywhere else this was used that was banking on that?
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.
Just that and SchemaSearchInput
which now passes in width=300px
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.
Ignore me, I just added that too. Only place it was used is StructuredProperties
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
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.
looks good to me!
import React from 'react'; | ||
import { StyledSearchBar } from './components'; | ||
import { SearchBarProps } from './types'; | ||
|
||
export const searchBarDefaults: SearchBarProps = { | ||
placeholder: 'Search...', | ||
value: '', | ||
width: '272px', | ||
width: '100%', |
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.
anywhere else this was used that was banking on that?
Also:
Button
andInput
components to take all IconProps, so they can use phosphor iconsChecklist