Skip to content

Commit

Permalink
Clean ref in OUI Docs Table
Browse files Browse the repository at this point in the history
Replace https://github.com/ to
oui.opensearch.org/latest/.

Signed-off-by: Anan Zhuang <[email protected]>
  • Loading branch information
ananzh committed Feb 21, 2023
1 parent bb31d6f commit cc2380b
Show file tree
Hide file tree
Showing 13 changed files with 104 additions and 106 deletions.
2 changes: 1 addition & 1 deletion src-docs/src/views/tables/actions/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export const Table = () => {
field: 'github',
name: 'Github',
render: (username) => (
<OuiLink href={`https://github.com/${username}`} target="_blank">
<OuiLink href="https://oui.opensearch.org/latest/" target="_blank">
{username}
</OuiLink>
),
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/tables/footer/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export const Table = () => {
<span>{uniqBy(items, 'github').length} users</span>
),
render: (username) => (
<OuiLink href={`https://github.com/${username}`} target="_blank">
<OuiLink href="https://oui.opensearch.org/latest/" target="_blank">
{username}
</OuiLink>
),
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/tables/in_memory/in_memory.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const Table = () => {
field: 'github',
name: 'Github',
render: (username) => (
<OuiLink href={`https://github.com/${username}`} target="_blank">
<OuiLink href="https://oui.opensearch.org/latest/" target="_blank">
{username}
</OuiLink>
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const Table = () => {
field: 'github',
name: 'Github',
render: (username) => (
<OuiLink href={`https://github.com/${username}`} target="_blank">
<OuiLink href="https://oui.opensearch.org/latest/" target="_blank">
{username}
</OuiLink>
),
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/tables/in_memory/in_memory_search.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const Table = () => {
field: 'github',
name: 'Github',
render: (username) => (
<OuiLink href={`https://github.com/${username}`} target="_blank">
<OuiLink href="https://oui.opensearch.org/latest/" target="_blank">
{username}
</OuiLink>
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const Table = () => {
field: 'github',
name: 'Github',
render: (username) => (
<OuiLink href={`https://github.com/${username}`} target="_blank">
<OuiLink href="https://oui.opensearch.org/latest/" target="_blank">
{username}
</OuiLink>
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const Table = () => {
field: 'github',
name: 'Github',
render: (username) => (
<OuiLink href={`https://github.com/${username}`} target="_blank">
<OuiLink href="https://oui.opensearch.org/latest/" target="_blank">
{username}
</OuiLink>
),
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/tables/in_memory/in_memory_selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export const Table = () => {
field: 'github',
name: 'Github',
render: (username) => (
<OuiLink href={`https://github.com/${username}`} target="_blank">
<OuiLink href="https://oui.opensearch.org/latest/" target="_blank">
{username}
</OuiLink>
),
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/tables/mobile/mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export const Table = () => {
field: 'github',
name: 'Github',
render: (username) => (
<OuiLink href={`https://github.com/${username}`} target="_blank">
<OuiLink href="https://oui.opensearch.org/latest/" target="_blank">
{username}
</OuiLink>
),
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/tables/paginated/paginated.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const Table = () => {
field: 'github',
name: 'Github',
render: (username) => (
<OuiLink href={`https://github.com/${username}`} target="_blank">
<OuiLink href="https://oui.opensearch.org/latest/" target="_blank">
{username}
</OuiLink>
),
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/tables/selection/selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export const Table = () => {
field: 'github',
name: 'Github',
render: (username) => (
<OuiLink href={`https://github.com/${username}`} target="_blank">
<OuiLink href="https://oui.opensearch.org/latest/" target="_blank">
{username}
</OuiLink>
),
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/tables/sorting/sorting.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const Table = () => {
</OuiToolTip>
),
render: (username) => (
<OuiLink href={`https://github.com/${username}`} target="_blank">
<OuiLink href="https://oui.opensearch.org/latest/" target="_blank">
{username}
</OuiLink>
),
Expand Down
186 changes: 92 additions & 94 deletions src/components/datagrid/data_grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1072,110 +1072,108 @@ export const OuiDataGrid: FunctionComponent<OuiDataGridProps> = (props) => {
<DataGridSortingContext.Provider value={sorting}>
<OuiFocusTrap
disabled={!isFullScreen}
className="ouiDataGrid__focusWrap"
>
className="ouiDataGrid__focusWrap">
<div
className={classes}
onKeyDown={handleGridKeyDown}
style={isFullScreen ? undefined : { width, height }}
ref={setResizeRef}
{...rest}>
<>
{showToolbar ? (
<div
ref={setToolbarRef}
className="ouiDataGrid__controls"
data-test-sub="dataGridControls">
{hasRoomForGridControls ? gridControls : null}
{checkOrDefaultToolBarDiplayOptions(
toolbarVisibility,
'showFullScreenSelector'
)
? fullScreenSelector
: null}
</div>
) : null}
<>
{showToolbar ? (
<div
onKeyDown={createKeyDownHandler(
props,
contentRef,
orderedVisibleColumns,
leadingControlColumns,
trailingControlColumns,
focusedCell,
headerIsInteractive,
setFocusedCell
)}
className="ouiDataGrid__verticalScroll">
<div className="ouiDataGrid__overflow">
{inMemory ? (
<OuiDataGridInMemoryRenderer
inMemory={inMemory}
renderCellValue={renderCellValue}
columns={columns}
rowCount={
inMemory.level === 'enhancements'
? // if `inMemory.level === enhancements` then we can only be sure the pagination's pageSize is available in memory
pagination?.pageSize || rowCount
: // otherwise, all of the data is present and usable
rowCount
}
onCellRender={onCellRender}
/>
) : null}
<div
ref={setContentRef}
data-test-subj="dataGridWrapper"
className="ouiDataGrid__content"
role="grid"
id={gridId}
{...wrappingDivFocusProps}
{...gridAriaProps}>
<OuiDataGridBody
isFullScreen={isFullScreen}
columns={orderedVisibleColumns}
columnWidths={columnWidths}
defaultColumnWidth={defaultColumnWidth}
toolbarHeight={toolbarDemensions.height}
leadingControlColumns={leadingControlColumns}
schema={mergedSchema}
trailingControlColumns={trailingControlColumns}
setVisibleColumns={setVisibleColumns}
switchColumnPos={switchColumnPos}
setColumnWidth={setColumnWidth}
headerIsInteractive={headerIsInteractive}
handleHeaderMutation={handleHeaderMutation}
inMemoryValues={inMemoryValues}
inMemory={inMemory}
schemaDetectors={allSchemaDetectors}
popoverContents={popoverContents}
pagination={pagination}
renderCellValue={renderCellValue}
renderFooterCellValue={renderFooterCellValue}
rowCount={rowCount}
interactiveCellId={interactiveCellId}
rowHeightsOptions={rowHeightsOptions}
rowHeightUtils={rowHeightUtils}
gridStyles={gridStyles}
/>
</div>
</div>
ref={setToolbarRef}
className="ouiDataGrid__controls"
data-test-sub="dataGridControls">
{hasRoomForGridControls ? gridControls : null}
{checkOrDefaultToolBarDiplayOptions(
toolbarVisibility,
'showFullScreenSelector'
)
? fullScreenSelector
: null}
</div>
{props.pagination && props['aria-labelledby'] && (
<p id={ariaLabelledBy} hidden>
{ariaLabelledBy}
</p>
) : null}
<div
onKeyDown={createKeyDownHandler(
props,
contentRef,
orderedVisibleColumns,
leadingControlColumns,
trailingControlColumns,
focusedCell,
headerIsInteractive,
setFocusedCell
)}
{renderPagination(props, gridId)}
<p id={interactiveCellId} hidden>
<OuiI18n
token="ouiDataGrid.screenReaderNotice"
default="Cell contains interactive content."
/>
{/* TODO: if no keyboard shortcuts panel gets built, add keyboard shortcut info here */}
className="ouiDataGrid__verticalScroll">
<div className="ouiDataGrid__overflow">
{inMemory ? (
<OuiDataGridInMemoryRenderer
inMemory={inMemory}
renderCellValue={renderCellValue}
columns={columns}
rowCount={
inMemory.level === 'enhancements'
? // if `inMemory.level === enhancements` then we can only be sure the pagination's pageSize is available in memory
pagination?.pageSize || rowCount
: // otherwise, all of the data is present and usable
rowCount
}
onCellRender={onCellRender}
/>
) : null}
<div
ref={setContentRef}
data-test-subj="dataGridWrapper"
className="ouiDataGrid__content"
role="grid"
id={gridId}
{...wrappingDivFocusProps}
{...gridAriaProps}>
<OuiDataGridBody
isFullScreen={isFullScreen}
columns={orderedVisibleColumns}
columnWidths={columnWidths}
defaultColumnWidth={defaultColumnWidth}
toolbarHeight={toolbarDemensions.height}
leadingControlColumns={leadingControlColumns}
schema={mergedSchema}
trailingControlColumns={trailingControlColumns}
setVisibleColumns={setVisibleColumns}
switchColumnPos={switchColumnPos}
setColumnWidth={setColumnWidth}
headerIsInteractive={headerIsInteractive}
handleHeaderMutation={handleHeaderMutation}
inMemoryValues={inMemoryValues}
inMemory={inMemory}
schemaDetectors={allSchemaDetectors}
popoverContents={popoverContents}
pagination={pagination}
renderCellValue={renderCellValue}
renderFooterCellValue={renderFooterCellValue}
rowCount={rowCount}
interactiveCellId={interactiveCellId}
rowHeightsOptions={rowHeightsOptions}
rowHeightUtils={rowHeightUtils}
gridStyles={gridStyles}
/>
</div>
</div>
</div>
{props.pagination && props['aria-labelledby'] && (
<p id={ariaLabelledBy} hidden>
{ariaLabelledBy}
</p>
</>

)}
{renderPagination(props, gridId)}
<p id={interactiveCellId} hidden>
<OuiI18n
token="ouiDataGrid.screenReaderNotice"
default="Cell contains interactive content."
/>
{/* TODO: if no keyboard shortcuts panel gets built, add keyboard shortcut info here */}
</p>
</>
</div>
</OuiFocusTrap>
</DataGridSortingContext.Provider>
Expand Down

0 comments on commit cc2380b

Please sign in to comment.