Conversation
|
081970f to
f5ba758
Compare
b0c1c57 to
314b261
Compare
| interface GoBreadcrumbsProps { | ||
| routeData: RouteData[] | ||
| } |
There was a problem hiding this comment.
| interface GoBreadcrumbsProps { | |
| routeData: RouteData[] | |
| } | |
| interface GoBreadcrumbsProps { | |
| routeData: RouteData[]; | |
| } |
| keySelector={(datum) => datum.to} | ||
| labelSelector={(datum) => datum.label} |
There was a problem hiding this comment.
Let's define function and use them instead.
| const rendererParams = () => ({}); | ||
|
|
| labelSelector, | ||
| rendererParams, | ||
| // eslint-disable-next-line react/jsx-props-no-spreading | ||
| renderer: (props) => <div {...props} />, |
There was a problem hiding this comment.
I am not sure if changing how we use Breadcrums is a good change.
cc: @frozenhelium @samshara
There was a problem hiding this comment.
@tnagorra Can you propose a better alternative. The requirement is that we need to separately style the leaf link.
There was a problem hiding this comment.
Looks like the leaf link is already styled differently in current approach as well.
We can use this new approach if we want more flexibility.
There was a problem hiding this comment.
Was this change required on the storybook audit?
| .table-link{ | ||
| color: var(--go-ui-color-text); | ||
| } | ||
| .table-link:hover { | ||
| color: var(--go-ui-color-primary-red); | ||
| } | ||
| .table-header-row { | ||
| background:var(--go-ui-color-primary-gray-10); | ||
| } |
There was a problem hiding this comment.
These styles should not be added here
| display: flex; | ||
| border-radius: var(--go-ui-border-radius-md); | ||
| box-shadow: var(--go-ui-box-shadow-2xl); | ||
| box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.2); |
There was a problem hiding this comment.
We should create design tokens for these.
cc: @frozenhelium
There was a problem hiding this comment.
I am not sure how the following feature are implemented in this file:
- Remove the header on Alert popup
- Add a "x" button to close the alert
Reference: #1291
|
|
||
| .bar-track { | ||
| border-radius: 0.3rem; | ||
| border-radius: 0 var(--go-ui-border-radius-md) var(--go-ui-border-radius-md) 0; |
There was a problem hiding this comment.
Is --go-ui-border-radius-md equal or close to 0.3rem?
There was a problem hiding this comment.
No, it's not, but the requirement was to remove border from the left side of the bar
| flex-direction: column; | ||
| gap: 0; | ||
| line-height: var(--go-ui-line-height-sm); | ||
| color: var(--go-ui-color-black); |
There was a problem hiding this comment.
We should not hard-code this change here. The suggestion most probably applies to the whole site.
cc: @frozenhelium
There was a problem hiding this comment.
The change is for the whole site
| text-align: center; | ||
| text-transform: var(--text-transform); | ||
| line-height: var(--go-ui-line-height-xs); | ||
| line-height: 21px; |
There was a problem hiding this comment.
Not sure this is the correct way. Also, let's use design tokens.
cc: @frozenhelium
| export const ProcessButtonWithIcon: Story = { | ||
| args: { | ||
| name: 'button', | ||
| variant: 'secondary', | ||
| children: 'Process Button', | ||
| // icons:<LoaderLineIcon/> | ||
| }, | ||
| }; |
There was a problem hiding this comment.
The story for "process" buttion is not correct.
| tertiary: styles.tertiary, | ||
| 'tertiary-on-dark': styles.tertiaryOnDark, | ||
| 'dropdown-item': styles.dropdownItem, | ||
| process: styles.process, |
There was a problem hiding this comment.
Not sure if we have this style already. But, implementing "process buttion" is adding props to indicate loading and completed state in a button.
| .disabled { | ||
| border-color: var(--go-ui-color-gray-40); | ||
| background-color: var(--go-ui-color-gray-40); | ||
| color: var(--go-ui-color-black); | ||
| } |
There was a problem hiding this comment.
This is not correct. The styling should be handled by the Button component itself.
| padding-left:12px; | ||
| height: 24px; |
There was a problem hiding this comment.
@frozenhelium Not sure if this is the way to set fixed height for inputs.
Also we should use design tokens.
There was a problem hiding this comment.
It was requested by the auditor
| background-color: var(--go-ui-color-element-background); | ||
| padding: 0 var(--go-ui-spacing-sm); | ||
|
|
||
| @@ -1,6 +1,5 @@ | |||
| .input-label { | |||
| display: flex; | |||
| padding: 0 var(--go-ui-spacing-2xs); | |||
There was a problem hiding this comment.
Shouldn't we be adding instead of removing the padding? Has this been defined somewhere else now?
There was a problem hiding this comment.
It was removed to maintain label and value spacing as mentioned by the auditor
| {headingDescription} | ||
| </div> | ||
| )} | ||
| {modalHeading && <div className={styles.border} />} |
There was a problem hiding this comment.
We don't need this change. We can just use withHeaderBorder prop
| display: flex; | ||
| flex-direction: column; | ||
|
|
||
| .border { |
There was a problem hiding this comment.
We don't need this change. We can just use withHeaderBorder prop
| level?: HeadingLevel; | ||
| children: ReactNode; | ||
| ellipsize?: boolean; | ||
| modalHeading?: boolean; |
There was a problem hiding this comment.
Instead of adding modalHeading, should use className to override the className
|
|
||
| &.modal-font-weight { | ||
| font-weight: var(--go-ui-font-weight-medium); | ||
| } |
There was a problem hiding this comment.
Instead of adding modalHeading, should use className to override the className
| className?: string; | ||
| contentViewType?: 'grid' | 'vertical' | 'default'; | ||
| ellipsizeHeading?: boolean; | ||
| modalHeading?: boolean; |
There was a problem hiding this comment.
We don't need this change. We can just use withHeaderBorder prop
| {icons && ( | ||
| <div> | ||
| {icons} | ||
| </div> | ||
| )} |
There was a problem hiding this comment.
We already have iconSrc. We don't need icons prop
There was a problem hiding this comment.
iconSrc is for image path, icons prop is the for the icons, types are different
| &.empty-message { | ||
| padding-top: 40px; | ||
| height: 200px; | ||
| } |
There was a problem hiding this comment.
This styling applied for all cases.
Use design tokens.
We need a padding of 40px between the main text and description
| className, | ||
| )} | ||
| icon={<AnalysisIcon />} | ||
| icon={(!empty || filtered || errored) && <AnalysisIcon />} |
There was a problem hiding this comment.
Not sure how this logic works!
| <Container | ||
| // eslint-disable-next-line react/jsx-props-no-spreading | ||
| {...containerProps} | ||
| modalHeading |
There was a problem hiding this comment.
Looks like all headers on modal/popup should have weight 500.
We don't need modalHeading to update the weight. Also, modalHeading in context of Container does not make sense.
| box-shadow: var(--go-ui-box-shadow-2xl); | ||
| background-color: var(--go-ui-color-white); | ||
| width: 100%; | ||
| width: 420px; |
There was a problem hiding this comment.
Let's use design tokens. Also, the width should be set on the modal-container
cc: @frozenhelium ?
| name={name} | ||
| options={realOptions} | ||
| optionsPending={optionsPending} | ||
| selectedOptions={selectedOptions} |
There was a problem hiding this comment.
Why was this line added? Was there previously a bug?
There was a problem hiding this comment.
No, it was already there.
| "buttonTitleClear":"Clear", | ||
| "buttonClearAll":"Clear All", |
There was a problem hiding this comment.
Why do we need 2 labels for "Clear"
| if (!persistentOptionPopup) { | ||
| handleHideDropdown(); | ||
| } |
There was a problem hiding this comment.
Why remove handling of persistentOptionPopup? This should either be removed from the props or not removed at all.
| {!readOnly && onSelectAllButtonClick | ||
| && <div className={styles.clearAllBorder} />} |
| parentRef={inputSectionRef} | ||
| className={_cs(optionsPopupClassName, styles.popup)} | ||
| > | ||
| <div className={styles.clearButtonContainer}> |
There was a problem hiding this comment.
This is not just clearButtionContainer
| const availableOptions = options.filter( | ||
| (option) => !selectedOptions?.some( | ||
| (selectedOption) => optionKeySelector( | ||
| selectedOption, | ||
| 0, | ||
| ) === optionKeySelector(option, 0), | ||
| ), | ||
| ); |
There was a problem hiding this comment.
Let's use a dict to filter these options. Also, add note what available options are.
Also, is this change correct for single select inputs?
| .clear-all-border { | ||
| border: var(--go-ui-width-separator-thin) solid var(--go-ui-color-separator); | ||
| } |
There was a problem hiding this comment.
This is not a border. It's a separator.
| const handleSelectAll = useCallback( | ||
| () => { | ||
| if (isNotDefined(options)) { | ||
| return; | ||
| } | ||
|
|
||
| const allValues = options.map(keySelector); | ||
| onChange(allValues, name); | ||
| }, | ||
| [options, name, onChange, keySelector], | ||
| ); |
There was a problem hiding this comment.
Select All cannot be added to search multi select inputs.
| gap: var(--go-ui-border-radius-lg); | ||
|
|
||
| .legend-item { | ||
| text-transform: uppercase; |
There was a problem hiding this comment.
It's not mentioned as a changed but the example image has uppercase words.
There was a problem hiding this comment.
No, Change for text style has been mentioned
| border-bottom: var(--go-ui-width-separator-thin) solid var(--go-ui-color-separator); | ||
| padding: 0 0 2px 0; |
There was a problem hiding this comment.
Why was this changed? Also use design tokens
There was a problem hiding this comment.
It was changed for the new secondary variant design.
| .segment-list { | ||
| flex-wrap: nowrap; | ||
| border: var(--go-ui-width-separator-thin) solid var(--go-ui-color-separator); | ||
| border:#F7F7F7 solid var(--go-ui-color-separator); |
There was a problem hiding this comment.
Use design tokens. Also, we don't need a border at all.
| .segment { | ||
| border-radius: var(--go-ui-border-radius-full); | ||
| padding: var(--go-ui-spacing-3xs) var(--go-ui-spacing-md); | ||
| padding: var(--go-ui-spacing-3xs) var(--go-ui-spacing-md); |
There was a problem hiding this comment.
| padding: var(--go-ui-spacing-3xs) var(--go-ui-spacing-md); | |
| padding: var(--go-ui-spacing-3xs) var(--go-ui-spacing-md); |
| .row { | ||
| .cell { | ||
| padding: var(--go-ui-spacing-sm); | ||
| padding: 12px; |
There was a problem hiding this comment.
Let's use design tokens.
Also not sure if "top and bottom lines Indents must be at least 12 px." means adding padding
| keySelector, | ||
| caption: 'You can utilize the header column to adjust the width of each column.', | ||
| resizableColumn: true, | ||
| headerRowClassName: 'table-header-row', |
There was a problem hiding this comment.
This is not correct. The header row color should be updated in the Table component itself.
| )} | ||
| <div className={styles.childrenWrapper}> | ||
| {children} | ||
| <div className={styles.activeChildrenBorder} /> |
There was a problem hiding this comment.
- Not sure if this is the right approach.
- This should only be added on certain variants.
There was a problem hiding this comment.
It's only for primary variant. Styles condition are in corresponding styles file
| position: absolute; | ||
| left: 45%; |
| display: flex; | ||
| overflow-x: auto; | ||
|
|
||
| .content { |
There was a problem hiding this comment.
yes, this is not used
|
|
||
| export interface Props { | ||
| export interface Props<N> { | ||
| name: N; |
There was a problem hiding this comment.
We don't need name props for the InfoPopup
Addresses:
Changes
Storybook audit major changes
This PR doesn't introduce:
console.logmeant for debugging