Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/changeset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clean-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout demo branch
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
with:
path: demo
ref: gh-pages
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1

- name: Use Node.js
uses: ./.github/actions/setup-node
Expand All @@ -39,7 +39,7 @@ jobs:
run: yarn test:demo

- name: Checkout demo branch
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
with:
path: demo
ref: gh-pages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1

- name: Use Node.js
uses: ./.github/actions/setup-node
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
working-directory: ./packages/icons
steps:
- name: Checkout sources
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
with:
# Required when using a PAT for opening the PR
persist-credentials: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1

- name: Use Node.js
uses: ./.github/actions/setup-node
Expand All @@ -36,7 +36,7 @@ jobs:
run: yarn test:demo

- name: Checkout demo branch
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
with:
path: demo
ref: gh-pages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1

- name: Use Node.js
uses: ./.github/actions/setup-node
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/visual-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
environment: pull_request_unsafe
if: ( github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'need visual approval') )
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yarn-deduplicate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ function ItemsNumber(props) {
<div className="tc-items-number" id={id}>
{selected
? labelSelected ||
t('LIST_TOOLBAR_NUMBER_OF_SELECTED_ITEMS', {
t('LIST_TOOLBAR_NUMBER_OF_SELECTED_ITEMS', {
defaultValue: '{{count}}/{{total}} item',
defaultValue_other: '{{count}}/{{total}} items',
count: selected,
total: totalItems,
})
})
: label ||
t('LIST_TOOLBAR_TOTAL_NUMBER_OF_ITEMS', {
t('LIST_TOOLBAR_TOTAL_NUMBER_OF_ITEMS', {
defaultValue: '{{count}} item',
defaultValue_other: '{{count}} items',
count: totalItems,
})}
})}
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const RowCheckbox = ({
const describedby = `${id}-${description}`;
return locked ? (
<Fragment>
<SizedIcon name="locker-closed" size="M"/>
<SizedIcon name="locker-closed" size="M" />
<RowLabel label={label} />
</Fragment>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ function ItemsNumber({ id, totalItems, selected, label, labelSelected, t }) {
<div className="tc-items-number" id={id}>
{selected
? labelSelected ||
t('LIST_TOOLBAR_NUMBER_OF_SELECTED_ITEMS', {
t('LIST_TOOLBAR_NUMBER_OF_SELECTED_ITEMS', {
defaultValue: '{{count}}/{{total}} item',
defaultValue_other: '{{count}}/{{total}} items',
count: selected,
total: totalItems,
})
})
: label ||
t('LIST_TOOLBAR_TOTAL_NUMBER_OF_ITEMS', {
t('LIST_TOOLBAR_TOTAL_NUMBER_OF_ITEMS', {
defaultValue: '{{count}} item',
defaultValue_other: '{{count}} items',
count: totalItems,
})}
})}
</div>
);
}
Expand Down
47 changes: 23 additions & 24 deletions packages/components/src/ResourceList/ResourceList.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,31 @@ import ResourceList from './ResourceList.component';
jest.mock(
'../VirtualizedList',
() =>
({ rowHeight, collection, inProgress, type, onRowClick, noRowsRenderer, rowRenderers }) =>
(
<div
data-testid="VirtualizedList"
data-props={JSON.stringify({ rowHeight, collection, inProgress, type })}
>
<div data-testid="rowRenderers">
{rowRenderers.resource({
index: 0,
parent: {
props: {
rowHeight,
collection,
inProgress,
type,
rowGetter: index => collection[index],
},
({ rowHeight, collection, inProgress, type, onRowClick, noRowsRenderer, rowRenderers }) => (
<div
data-testid="VirtualizedList"
data-props={JSON.stringify({ rowHeight, collection, inProgress, type })}
>
<div data-testid="rowRenderers">
{rowRenderers.resource({
index: 0,
parent: {
props: {
rowHeight,
collection,
inProgress,
type,
rowGetter: index => collection[index],
},
})}
</div>
{collection.length === 0 && <div data-testid="noRowsRenderer">{noRowsRenderer()}</div>}
<button type="button" onClick={() => onRowClick()}>
onRowClick
</button>
},
})}
</div>
),
{collection.length === 0 && <div data-testid="noRowsRenderer">{noRowsRenderer()}</div>}
<button type="button" onClick={() => onRowClick()}>
onRowClick
</button>
</div>
),
);

const collection = [
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/VirtualizedList/utils/tablerow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function toColumns({ id, theme, children, columnsWidths, getRowState }) {
...field.props.columnData,
getRowState,
id,
},
},
...createColumnWidthProps(columnWidth),
};
return <Column key={index} {...colProps} />;
Expand Down