-
Notifications
You must be signed in to change notification settings - Fork 67
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
Feature: sizes customizing - set of new components #2396
Conversation
Generated by: track-bundle-size
new sizes (raw)To set the sizes as a new baseline, you can copy/paste next content to the {
"version": "5.9.1",
"timestamp": "2024-09-11",
"sizes": {
"templateApp": {
"css": 299321,
"js": 481988
},
"@epam/app": {
"css": 1660826,
"js": 5128064
},
"@epam/draft-rte": {
"css": 9784,
"js": 45294
},
"@epam/electric": {
"css": 2275,
"js": 2408
},
"@epam/promo": {
"css": 47645,
"js": 10892
},
"@epam/uui-extra": {
"css": 0,
"js": 213
},
"@epam/loveship": {
"css": 53447,
"js": 42540
},
"@epam/uui-components": {
"css": 22496,
"js": 246769
},
"@epam/uui-core": {
"css": 0,
"js": 343565
},
"@epam/uui-db": {
"css": 0,
"js": 45769
},
"@epam/uui-docs": {
"css": 2448,
"js": 209641
},
"@epam/uui-editor": {
"css": 12499,
"js": 175334
},
"@epam/uui-timeline": {
"css": 2252,
"js": 79163
},
"@epam/uui": {
"css": 277113,
"js": 341924
}
}
} Generated by: generate-components-api Total amount of exported types/props without JSDoc comments
New missing commentsNOTE: It's either a new exported types/props without JSDoc, or it's an existing code from which you deleted the JSDoc comments.
|
…g size theming approach. Button, LinkButton, VerticalTabButton fixed rtl support
# Conflicts: # app/package.json # changelog.md # draft-rte/package.json # epam-assets/package.json # epam-electric/package.json # epam-promo/package.json # extra/package.json # lerna.json # loveship/package.json # templates/uui-cra-template/package.json # test-utils/package.json # uui-build/package.json # uui-components/package.json # uui-core/package.json # uui-db/package.json # uui-docs/package.json # uui-e2e-tests/package.json # uui-editor/package.json # uui-timeline/package.json # uui/package.json
… variables for vanilla theme
# Conflicts: # app/src/common/AppHeader.module.scss # app/src/common/AppHeader.tsx
# Conflicts: # uui-e2e-tests/tests/previewTests/__screenshots__/linux/chromium/RangeDatePicker-Opened-Electric-NotSkin.png # uui-e2e-tests/tests/previewTests/__screenshots__/linux/chromium/RangeDatePicker-Opened-Loveship-NotSkin.png # uui-e2e-tests/tests/previewTests/__screenshots__/linux/chromium/RangeDatePicker-Opened-LoveshipDark-NotSkin.png # uui-e2e-tests/tests/previewTests/__screenshots__/linux/chromium/RangeDatePicker-Opened-Promo-NotSkin.png # uui/components/datePickers/CalendarPresets.module.scss # uui/components/datePickers/DatePickerBody.module.scss # uui/components/datePickers/RangeDatePicker.tsx # uui/components/datePickers/__tests__/__snapshots__/RangeDatePicker.test.tsx.snap # uui/components/tables/__tests__/__snapshots__/DataTableCell.test.tsx.snap # uui/components/tables/__tests__/__snapshots__/DataTableRow.test.tsx.snap # uui/components/widgets/Badge.module.scss # uui/components/widgets/CountIndicator.module.scss # uui/index.tsx
…' into feature/sizes-customizing-update
# Conflicts: # uui/components/pickers/DataPickerCell.tsx
…ach, fixed support 'rtl' for some components & site, updated 'dayjs' package
# Conflicts: # uui/components/tables/DataTableCell.tsx
* Defines text size | ||
* @default '36' | ||
*/ | ||
size?: TextSize; |
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.
why?
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.
to be able to override the size type in the uui package, accordingly, this must be written in the skins
export class DataTableHeaderCell<TItem, TId> extends React.Component<DataTableHeaderCellProps<TItem, TId> & DataTableRenderProps, DataTableHeaderCellState> { | ||
observer: MutationObserver; | ||
|
||
constructor(props: DataTableHeaderCellProps<TItem, TId> & DataTableRenderProps) { |
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.
Remove observer logic, just use window?.document.dir value due to potential performance issues
:global(.uui-pickerInput-body) { | ||
--uui-dt-cell-border-width: 0; | ||
--uui-pickerInput-selected_mark: var(--uui-info-50); | ||
:global(.uui-picker_input-body) { |
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.
?
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.
we didn't use camel case, I brought to the unity of using classes on the project
uui/components/tables/DataTable.tsx
Outdated
@@ -2,25 +2,40 @@ import * as React from 'react'; | |||
import { IconContainer, DataTableSelectionProvider, DataTableFocusManager, DataTableFocusProvider } from '@epam/uui-components'; | |||
import { useColumnsWithFilters } from '../../helpers'; | |||
import { | |||
ColumnsConfig, DataRowProps, useUuiContext, uuiScrollShadows, useColumnsConfig, IEditable, DataTableState, DataTableColumnsConfigOptions, | |||
DataSourceListProps, DataColumnProps, cx, TableFiltersConfig, DataTableRowProps, DataTableSelectedCellData, | |||
ColumnsConfig, |
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.
place in a multiline
* Defines table header size | ||
* @default '36' | ||
* */ | ||
headerSize?: '36' | '48' | '60'; |
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.
?
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.
moved to DataTableMods to be able to override the type
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.
padding: {
modal: '24',
default: '12', -> to dropdown
},
uui/settings.ts
Outdated
utmost: '24', | ||
}, | ||
}, | ||
dataTableRow: { |
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.
dataTableRow: {
defaults: {
columnsGap: '24',
},
},
uui/settings.ts
Outdated
default: '12', | ||
}, | ||
leftPadding: { | ||
default: '12', |
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.
probably replace with gap?
uui/settings.ts
Outdated
60: '48', | ||
}, | ||
leftPadding: { | ||
editable: '0', |
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.
hardcode editable value
uui/settings.ts
Outdated
}, | ||
leftPadding: { | ||
default: '12', | ||
utmost: '24', |
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.
Probably firstColumnPadding and lastColumnPading
[Text]: reworked style calculation
# Conflicts: # uui/components/tables/DataTableHeaderCell.module.scss
@@ -42,10 +42,10 @@ function DataPickerFooterImpl<TItem, TId>(props: PropsWithChildren<DataPickerFoo | |||
const shouldShowFooter = isSinglePicker ? (!isSearching && !props.disableClear) : !isSearching; | |||
|
|||
return shouldShowFooter && ( | |||
<FlexRow size={ props.size } padding={ settings.sizes.dataPickerFooter.flexRowPadding as FlexRowProps['padding'] }> | |||
<FlexRow padding={ settings.sizes.pickerInput.body.dropdown.padding as FlexRowProps['padding'] }> |
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.
Probably we can move this from settings to css variable?
@@ -88,5 +88,6 @@ export function PickerItem<TItem, TId>(props: PickerItemProps<TItem, TId>) { | |||
} | |||
|
|||
function getAvatarSize(size: PickerItemProps<any, any>['size'], isMultiline: boolean): string | number { | |||
return settings.sizes.pickerItem.avatar[isMultiline ? 'multiline' : 'rest'][size]; | |||
console.log('ava', settings.sizes.pickerInput.body.dropdown.row.cell.item.avatar[isMultiline ? 'multiline' : 'rest'][size]); |
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.
Remove console.log
cx={ isMultiline && [css.multiline, css[`vertical-padding-${itemSize}`]] } | ||
columnGap="12" | ||
cx={ [isMultiline && css.multiline, css.columnGap] } | ||
rawProps={ { style: { '--uui-picker_item-vertical-padding': `${settings.sizes.pickerInput.body.dropdown.row.cell.item.verticalPadding[itemSize]}px` } as React.CSSProperties } } |
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.
Probably move to the css-variable based on size class?
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.
Here we need to dive a little deeper into this, collect the components and see how we can generalize
{this.props.column.caption} | ||
<Text | ||
key="text" | ||
lineHeight={ settings.sizes.dataTable.header.row.cell.columnCaption.lineHeight as TextProps['lineHeight'] } |
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.
Probably we can move settings.sizes.dataTable.header.row.cell.columnCaption.lineHeight
from settings to css variable?
Description:
Added a set of new components with support for size customization.
LabledInput - changed right padding for labelPosition prop from 5px to 6px (agreed with the design team)
Paginator - changed width for 3 dots (agreed with the design team)
PickerInputBody - changed left/right padding for search container according design
DatePickerBody - changed top padding for container (agreed with the design team)
TextArea - fixed line-height in 24 size, changed internal paddings according design