Skip to content
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

[DataGrid] Prefix all public API to fit into the global Material-UI namespace #1069

Merged
merged 4 commits into from
Feb 19, 2021

Conversation

DanailH
Copy link
Member

@DanailH DanailH commented Feb 17, 2021

Breaking changes

  • [DataGrid] Prefix all the exported modules so they can live in the global namespace of Material-UI without conflicting with other imports. This change gets us one step closer to a stable release.

Fixes #169

I apologize for the size of the PR 🤐 but I did update all of the public APIs.

v4.0.0-alpha.20 v4.0.0-alpha.21
AddIcon: (...) ApiContext: (...) ArrowDownwardIcon: (...) ArrowUpwardIcon: (...) AutoSizer: (...) CELL_CLICK: (...) CELL_CSS_CLASS: (...) CELL_HOVER: (...) CLICK: (...) COLUMNS_UPDATED: (...) COLUMN_FILTER_BUTTON_CLICK: (...) COLUMN_HEADER_CLICK: (...) COLUMN_HEADER_HOVER: (...) COLUMN_MENU_BUTTON_CLICK: (...) COL_REORDER_DRAG_ENTER: (...) COL_REORDER_DRAG_OVER: (...) COL_REORDER_DRAG_OVER_HEADER: (...) COL_REORDER_START: (...) COL_REORDER_STOP: (...) COL_RESIZE_START: (...) COL_RESIZE_STOP: (...) COMPONENT_ERROR: (...) Cell: (...) CellCheckboxRenderer: (...) CheckCircleIcon: (...) CloseIcon: (...) ColumnHeaderItem: (...) ColumnHeaderSeparator: (...) ColumnHeaderSortIcon: (...) ColumnHeaderTitle: (...) ColumnHeadersItemCollection: (...) ColumnIcon: (...) ColumnsHeader: (...) ColumnsMenuItem: (...) ColumnsPanel: (...) ColumnsToolbarButton: (...) DATA_CONTAINER_CSS_CLASS: (...) DATETIME_COLUMN_TYPE: (...) DATETIME_COL_DEF: (...) DATE_COLUMN_TYPE: (...) DATE_COL_DEF: (...) DEFAULT_COL_TYPE_KEY: (...) DEFAULT_GRID_OPTIONS: (...) DEFAULT_LOCALE_TEXT: (...) DEFAULT_SLOTS_COMPONENTS: (...) DEFAULT_SLOTS_ICONS: (...) DRAGEND: (...) DensitySelector: (...) DensityTypes: (...) DragIcon: (...) EXPERIMENTAL_ENABLED: (...) FILTER_MODEL_CHANGE: (...) FOCUS_OUT: (...) FeatureModeConstant: (...) FilterAltIcon: (...) FilterForm: (...) FilterInputValue: (...) FilterListIcon: (...) FilterMenuItem: (...) FilterPanel: (...) FilterToolbarButton: (...) GRID_FOCUS_OUT: (...) GridColumnHeaderMenu: (...) GridColumnMenu: (...) GridColumnsContainer: (...) GridComponent: (...) GridDataContainer: (...) GridFooter: (...) GridFooterContainer: (...) GridHeader: (...) GridMenu: (...) GridOverlay: (...) GridRoot: (...) GridToolbar: (...) GridToolbarContainer: (...) GridWindow: (...) HEADER_CELL_CSS_CLASS: (...) HEADER_CELL_DRAGGING_CSS_CLASS: (...) HEADER_CELL_DROP_ZONE_CSS_CLASS: (...) HEADER_CELL_SEPARATOR_RESIZABLE_CSS_CLASS: (...) HEADER_CELL_TITLE_CSS_CLASS: (...) HeaderCheckbox: (...) HideColMenuItem: (...) INITIAL_PAGINATION_STATE: (...) KEYDOWN: (...) KEYUP: (...) LeftEmptyCell: (...) LicenseInfo: (...) LinkOperator: (...) LoadIcon: (...) LoadingOverlay: (...) MOUSE_HOVER: (...) MULTIPLE_KEY_PRESS_CHANGED: (...) MULTIPLE_SELECTION_KEYS: (...) MenuIcon: (...) NUMBER_COLUMN_TYPE: (...) NUMERIC_COL_DEF: (...) NoRowsOverlay: (...) PAGESIZE_CHANGED: (...) PAGE_CHANGED: (...) Pagination: (...) Panel: (...) PanelContent: (...) PanelFooter: (...) PanelHeader: (...) PanelWrapper: (...) PreferencePanelsValue: (...) PreferencesPanel: (...) RESIZE: (...) ROWS_CLEARED: (...) ROWS_SET: (...) ROWS_UPDATED: (...) ROW_CLICK: (...) ROW_CSS_CLASS: (...) ROW_HOVER: (...) ROW_SELECTED: (...) RenderingZone: (...) RightEmptyCell: (...) Row: (...) RowCells: (...) RowCount: (...) SCROLL: (...) SCROLLING: (...) SCROLLING_START: (...) SCROLLING_STOP: (...) SELECTION_CHANGED: (...) SORT_MODEL_CHANGE: (...) STATE_CHANGE: (...) STRING_COLUMN_TYPE: (...) STRING_COL_DEF: (...) ScrollArea: (...) SearchIcon: (...) SelectedRowCount: (...) SeparatorIcon: (...) SortMenuItems: (...) StickyContainer: (...) TableRowsIcon: (...) TripleDotsVerticalIcon: (...) UNMOUNT: (...) ViewHeadlineIcon: (...) ViewStreamIcon: (...) Viewport: (...) Watermark: (...) XGrid: (...) activeFilterItemsSelector: (...) addRowId: (...) allColumnsFieldsSelector: (...) allColumnsSelector: (...) bgBG: (...) buildCellParams: (...) buildRowParams: (...) checkRowHasId: (...) checkboxSelectionColDef: (...) classnames: (...) columnLookupSelector: (...) columnMenuStateSelector: (...) columnReorderDragColSelector: (...) columnReorderSelector: (...) columnsMetaSelector: (...) columnsSelector: (...) columnsTotalWidthSelector: (...) containerSizesSelector: (...) convertRowsPropToState: (...) dateComparer: (...) dateFormatter: (...) dateTimeFormatter: (...) filterColumnLookupSelector: (...) filterItemsCounterSelector: (...) filterStateSelector: (...) filterableColumnsIdsSelector: (...) filterableColumnsSelector: (...) findCellElementsFromCol: (...) findDataContainerFromCurrent: (...) findGridRootFromCurrent: (...) findHeaderElementFromField: (...) findParentElementFromClassName: (...) getCellElementFromIndexes: (...) getColDef: (...) getDateOperators: (...) getDefaultColumnTypes: (...) getFieldFromHeaderElem: (...) getIdFromRowElem: (...) getInitialColumnReorderState: (...) getInitialColumnsState: (...) getInitialFilterState: (...) getInitialRenderingState: (...) getInitialRowState: (...) getInitialSortingState: (...) getInitialState: (...) getInitialVisibleRowsState: (...) getLocalization: (...) getNumericColumnOperators: (...) getPageCount: (...) getStringOperators: (...) getThemePaletteMode: (...) isArray: (...) isArrowKeys: (...) isCell: (...) isCellRoot: (...) isDate: (...) isDeepEqual: (...) isDesc: (...) isFunction: (...) isHeaderTitleContainer: (...) isHomeOrEndKeys: (...) isMuiV5: (...) isMultipleKey: (...) isNavigationKey: (...) isNumber: (...) isObject: (...) isOverflown: (...) isPageKeys: (...) isSpaceKey: (...) isString: (...) isTabKey: (...) keyboardCellSelector: (...) keyboardMultipleKeySelector: (...) keyboardStateSelector: (...) localStorageAvailable: (...) mergeColTypes: (...) mergeOptions: (...) muiStyleAlpha: (...) nextSortDirection: (...) nillComparer: (...) numberComparer: (...) paginationReducer: (...) paginationSelector: (...) preferencePanelStateSelector: (...) removeUndefinedProps: (...) rowCountSelector: (...) rowsLookupSelector: (...) rowsStateSelector: (...) scrollBarSizeSelector: (...) scrollbarStateSelector: (...) selectedRowsCountSelector: (...) selectionStateSelector: (...) setPageActionCreator: (...) setPageSizeActionCreator: (...) setPageSizeStateUpdate: (...) setPageStateUpdate: (...) setPaginationModeActionCreator: (...) setRowCountActionCreator: (...) setRowCountStateUpdate: (...) sortColumnLookupSelector: (...) sortModelSelector: (...) sortedRowIdsSelector: (...) sortedRowsSelector: (...) stringNumberComparer: (...) unorderedRowModelsSelector: (...) useApi: (...) useApiEventHandler: (...) useApiMethod: (...) useApiRef: (...) useBaseComponentProps: (...) useColumnMenu: (...) useColumnReorder: (...) useColumnResize: (...) useColumns: (...) useComponents: (...) useContainerProps: (...) useEnhancedEffect: (...) useEventCallback: (...) useFilter: (...) useGridApi: (...) useGridReducer: (...) useGridSelector: (...) useGridState: (...) useKeyboard: (...) useLogger: (...) useLoggerFactory: (...) useNativeEventListener: (...) usePagination: (...) usePreferencesPanel: (...) useRows: (...) useScrollFn: (...) useSelection: (...) useSorting: (...) useThemeProps: (...) useVirtualColumns: (...) useVirtualRows: (...) viewportSizeStateSelector: (...) viewportSizesSelector: (...) visibleColumnsLengthSelector: (...) visibleColumnsSelector: (...) visibleRowCountSelector: (...) visibleRowsStateSelector: (...) visibleSortedRowsSelector: (...) DEFAULT_GRID_COL_TYPE_KEY: (...) DEFAULT_GRID_OPTIONS: (...) DEFAULT_GRID_SLOTS_COMPONENTS: (...) DEFAULT_GRID_SLOTS_ICONS: (...) GRID_CELL_CSS_CLASS: (...) GRID_CLICK: (...) GRID_DATA_CONTAINER_CSS_CLASS: (...) GRID_DATETIME_COLUMN_TYPE: (...) GRID_DATETIME_COL_DEF: (...) GRID_DATE_COLUMN_TYPE: (...) GRID_DATE_COL_DEF: (...) GRID_DEFAULT_LOCALE_TEXT: (...) GRID_DRAGEND: (...) GRID_EXPERIMENTAL_ENABLED: (...) GRID_FOCUS_OUT: (...) GRID_HEADER_CELL_CSS_CLASS: (...) GRID_HEADER_CELL_DRAGGING_CSS_CLASS: (...) GRID_HEADER_CELL_DROP_ZONE_CSS_CLASS: (...) GRID_HEADER_CELL_SEPARATOR_RESIZABLE_CSS_CLASS: (...) GRID_HEADER_CELL_TITLE_CSS_CLASS: (...) GRID_INITIAL_PAGINATION_STATE: (...) GRID_KEYDOWN: (...) GRID_KEYUP: (...) GRID_MOUSE_HOVER: (...) GRID_MULTIPLE_SELECTION_KEYS: (...) GRID_NUMBER_COLUMN_TYPE: (...) GRID_NUMERIC_COL_DEF: (...) GRID_RESIZE: (...) GRID_ROW_CSS_CLASS: (...) GRID_SCROLL: (...) GRID_STRING_COLUMN_TYPE: (...) GRID_STRING_COL_DEF: (...) GridAddIcon: (...) GridApiContext: (...) GridArrowDownwardIcon: (...) GridArrowUpwardIcon: (...) GridAutoSizer: (...) GridCell: (...) GridCellCheckboxRenderer: (...) GridCheckCircleIcon: (...) GridCloseIcon: (...) GridColumnHeaderItem: (...) GridColumnHeaderMenu: (...) GridColumnHeaderSeparator: (...) GridColumnHeaderSortIcon: (...) GridColumnHeaderTitle: (...) GridColumnHeadersItemCollection: (...) GridColumnIcon: (...) GridColumnMenu: (...) GridColumnsContainer: (...) GridColumnsHeader: (...) GridColumnsMenuItem: (...) GridColumnsPanel: (...) GridColumnsToolbarButton: (...) GridComponent: (...) GridDataContainer: (...) GridDensitySelector: (...) GridDensityTypes: (...) GridDragIcon: (...) GridFeatureModeConstant: (...) GridFilterAltIcon: (...) GridFilterForm: (...) GridFilterInputValue: (...) GridFilterListIcon: (...) GridFilterMenuItem: (...) GridFilterPanel: (...) GridFilterToolbarButton: (...) GridFooter: (...) GridFooterContainer: (...) GridHeader: (...) GridHeaderCheckbox: (...) GridLeftEmptyCell: (...) GridLinkOperator: (...) GridLoadIcon: (...) GridLoadingOverlay: (...) GridMenu: (...) GridMenuIcon: (...) GridNoRowsOverlay: (...) GridOverlay: (...) GridPagination: (...) GridPanel: (...) GridPanelContent: (...) GridPanelFooter: (...) GridPanelHeader: (...) GridPanelWrapper: (...) GridPreferencePanelsValue: (...) GridPreferencesPanel: (...) GridRenderingZone: (...) GridRightEmptyCell: (...) GridRoot: (...) GridRow: (...) GridRowCells: (...) GridRowCount: (...) GridScrollArea: (...) GridSearchIcon: (...) GridSelectedRowCount: (...) GridSeparatorIcon: (...) GridStickyContainer: (...) GridTableRowsIcon: (...) GridToolbar: (...) GridToolbarContainer: (...) GridTripleDotsVerticalIcon: (...) GridViewHeadlineIcon: (...) GridViewStreamIcon: (...) GridViewport: (...) GridWindow: (...) HideGridColMenuItem: (...) LicenseInfo: (...) SortGridMenuItems: (...) Watermark: (...) GRID_CELL_CLICK: (...) GRID_CELL_HOVER: (...) GRID_COLUMNS_UPDATED: (...) GRID_COLUMN_FILTER_BUTTON_CLICK: (...) GRID_COLUMN_HEADER_CLICK: (...) GRID_COLUMN_HEADER_HOVER: (...) GRID_COLUMN_MENU_BUTTON_CLICK: (...) GRID_COL_REORDER_DRAG_ENTER: (...) GRID_COL_REORDER_DRAG_OVER: (...) GRID_COL_REORDER_DRAG_OVER_HEADER: (...) GRID_COL_REORDER_START: (...) GRID_COL_REORDER_STOP: (...) GRID_COL_RESIZE_START: (...) GRID_COL_RESIZE_STOP: (...) GRID_COMPONENT_ERROR: (...) GRID_FILTER_MODEL_CHANGE: (...) GRID_FOCUS_OUT: (...) GRID_MULTIPLE_KEY_PRESS_CHANGED: (...) GRID_PAGESIZE_CHANGED: (...) GRID_PAGE_CHANGED: (...) GRID_ROWS_CLEARED: (...) GRID_ROWS_SET: (...) GRID_ROWS_UPDATED: (...) GRID_ROW_CLICK: (...) GRID_ROW_HOVER: (...) GRID_ROW_SELECTED: (...) GRID_SCROLLING: (...) GRID_SCROLLING_START: (...) GRID_SCROLLING_STOP: (...) GRID_SELECTION_CHANGED: (...) GRID_SORT_MODEL_CHANGE: (...) GRID_STATE_CHANGE: (...) GRID_UNMOUNT: (...) XGrid: (...) activeGridFilterItemsSelector: (...) addGridRowId: (...) allGridColumnsFieldsSelector: (...) allGridColumnsSelector: (...) bgBG: (...) buildGridCellParams: (...) buildGridRowParams: (...) checkGridRowHasId: (...) classnames: (...) convertGridRowsPropToState: (...) filterGridColumnLookupSelector: (...) filterGridItemsCounterSelector: (...) filterGridStateSelector: (...) filterableGridColumnsIdsSelector: (...) filterableGridColumnsSelector: (...) findGridCellElementsFromCol: (...) findGridDataContainerFromCurrent: (...) findGridRootFromCurrent: (...) findHeaderElementFromField: (...) findParentElementFromClassName: (...) getFieldFromHeaderElem: (...) getGridCellElementFromIndexes: (...) getGridColDef: (...) getGridDateOperators: (...) getGridDefaultColumnTypes: (...) getGridLocalization: (...) getGridNumericColumnOperators: (...) getGridPageCount: (...) getGridStringOperators: (...) getIdFromRowElem: (...) getInitialGridColumnReorderState: (...) getInitialGridColumnsState: (...) getInitialGridFilterState: (...) getInitialGridRenderingState: (...) getInitialGridRowState: (...) getInitialGridSortingState: (...) getInitialGridState: (...) getInitialVisibleGridRowsState: (...) getThemePaletteMode: (...) gridCheckboxSelectionColDef: (...) gridColumnLookupSelector: (...) gridColumnMenuStateSelector: (...) gridColumnReorderDragColSelector: (...) gridColumnReorderSelector: (...) gridColumnsMetaSelector: (...) gridColumnsSelector: (...) gridColumnsTotalWidthSelector: (...) gridContainerSizesSelector: (...) gridDateComparer: (...) gridDateFormatter: (...) gridDateTimeFormatter: (...) gridKeyboardCellSelector: (...) gridKeyboardMultipleKeySelector: (...) gridKeyboardStateSelector: (...) gridNillComparer: (...) gridNumberComparer: (...) gridPaginationReducer: (...) gridPaginationSelector: (...) gridPreferencePanelStateSelector: (...) gridRowCountSelector: (...) gridRowsLookupSelector: (...) gridRowsStateSelector: (...) gridScrollBarSizeSelector: (...) gridScrollbarStateSelector: (...) gridSelectionStateSelector: (...) gridSortColumnLookupSelector: (...) gridSortModelSelector: (...) gridStringNumberComparer: (...) gridViewportSizeStateSelector: (...) gridViewportSizesSelector: (...) isArray: (...) isArrowKeys: (...) isDate: (...) isDeepEqual: (...) isDesc: (...) isFunction: (...) isGridCell: (...) isGridCellRoot: (...) isGridHeaderTitleContainer: (...) isHomeOrEndKeys: (...) isMuiV5: (...) isMultipleKey: (...) isNavigationKey: (...) isNumber: (...) isObject: (...) isOverflown: (...) isPageKeys: (...) isSpaceKey: (...) isString: (...) isTabKey: (...) localStorageAvailable: (...) mergeGridColTypes: (...) mergeGridOptions: (...) muiStyleAlpha: (...) nextGridSortDirection: (...) removeUndefinedProps: (...) selectedGridRowsCountSelector: (...) setGridPageActionCreator: (...) setGridPageSizeActionCreator: (...) setGridPageSizeStateUpdate: (...) setGridPageStateUpdate: (...) setGridPaginationModeActionCreator: (...) setGridRowCountActionCreator: (...) setGridRowCountStateUpdate: (...) sortedGridRowIdsSelector: (...) sortedGridRowsSelector: (...) unorderedGridRowModelsSelector: (...) useApi: (...) useEnhancedEffect: (...) useEventCallback: (...) useGridApi: (...) useGridApiEventHandler: (...) useGridApiMethod: (...) useGridApiRef: (...) useGridBaseComponentProps: (...) useGridColumnMenu: (...) useGridColumnReorder: (...) useGridColumnResize: (...) useGridColumns: (...) useGridComponents: (...) useGridContainerProps: (...) useGridFilter: (...) useGridKeyboard: (...) useGridPagination: (...) useGridPreferencesPanel: (...) useGridReducer: (...) useGridRows: (...) useGridScrollFn: (...) useGridSelection: (...) useGridSelector: (...) useGridSorting: (...) useGridState: (...) useGridVirtualColumns: (...) useGridVirtualRows: (...) useLogger: (...) useLoggerFactory: (...) useNativeEventListener: (...) useThemeProps: (...) visibleGridColumnsLengthSelector: (...) visibleGridColumnsSelector: (...) visibleGridRowCountSelector: (...) visibleGridRowsStateSelector: (...) visibleSortedGridRowsSelector: (...)

@DanailH DanailH added core Infrastructure work going on behind the scenes breaking change component: data grid This is the name of the generic UI component, not the React module! labels Feb 17, 2021
@DanailH DanailH self-assigned this Feb 17, 2021
@oliviertassinari
Copy link
Member

Actually, I might have approved too quickly. Did you update the markdown in the documentation? Sometimes we mention the exported types.

@DanailH
Copy link
Member Author

DanailH commented Feb 17, 2021

Actually, I might have approved too quickly. Did you update the markdown in the documentation? Sometimes we mention the exported types.

I did my best to try and change the names everywhere but there is a possibility that I missed updating somewhere. I checked the docs and it seem correct but if you can click through them as well that would be great.

@oliviertassinari
Copy link
Member

@DanailH
Copy link
Member Author

DanailH commented Feb 18, 2021

@DanailH Here is an example: https://deploy-preview-1069--material-ui-x.netlify.app/components/data-grid/getting-started/#define-rows. RowsProp should be GridRowsProp

Ok, I'll go page by page to check what I missed and update it.

@DanailH
Copy link
Member Author

DanailH commented Feb 18, 2021

Ok, apparently I missed the definitions and interfaces so I renamed them as well. In the process I also checked the docs - seem to be updated as well. Please give them a quick as well.

@dtassone
Copy link
Member

Ok, apparently I missed the definitions and interfaces so I renamed them as well. In the process I also checked the docs - seem to be updated as well. Please give them a quick as well.

the code should just not compiled if you missed anything. This is why we use typescript
I think the type checking is broken now

@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 18, 2021

the code should just not compiled if you missed anything

@dtassone From what I understand RowsProp was no updated in the markdown, in the TypeScript demos, and in the source.

@dtassone
Copy link
Member

@dtassone From what I understand RowsProp was no updated in the markdown, in the TypeScript demos, and in the source.

Not sure what you mean. If you forgot to rename RowsProp totally, yes then it won't break :)

@DanailH
Copy link
Member Author

DanailH commented Feb 19, 2021

Ok, I'm merging this. If something was missed I'll create follow-up PRs to fix it.

@DanailH DanailH merged commit c179435 into mui:master Feb 19, 2021
@oliviertassinari oliviertassinari changed the title [DataGrid] Rename all public API [DataGrid] Prefix all public API to fit into the global Material-UI namespace Feb 27, 2021
@oliviertassinari
Copy link
Member

I have updated the migration table with:

  • XGRID_ -> GRID_ to match a review.
  • Replace the old/new wording with the actual versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change component: data grid This is the name of the generic UI component, not the React module! core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exported types should live in a global namespace
3 participants