From 8f1c7263d5ad4364342f8284499eb52401f27e9e Mon Sep 17 00:00:00 2001 From: CD Cabrera Date: Fri, 12 Feb 2021 14:54:13 -0500 Subject: [PATCH 1/3] fix(guestsList): column widths for loader (#585) --- .../guestsList/__tests__/__snapshots__/guestsList.test.js.snap | 1 + src/components/guestsList/guestsList.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/components/guestsList/__tests__/__snapshots__/guestsList.test.js.snap b/src/components/guestsList/__tests__/__snapshots__/guestsList.test.js.snap index 78ebad9d7..7ed2040fd 100644 --- a/src/components/guestsList/__tests__/__snapshots__/guestsList.test.js.snap +++ b/src/components/guestsList/__tests__/__snapshots__/guestsList.test.js.snap @@ -99,6 +99,7 @@ exports[`GuestsList Component should handle multiple display states: paged pendi Object { "borders": false, "colCount": 1, + "colWidth": Array [], "rowCount": 0, "variant": "compact", } diff --git a/src/components/guestsList/guestsList.js b/src/components/guestsList/guestsList.js index 40c670393..667bc3439 100644 --- a/src/components/guestsList/guestsList.js +++ b/src/components/guestsList/guestsList.js @@ -93,6 +93,7 @@ class GuestsList extends React.Component { tableProps={{ borders: false, colCount: filterGuestsData?.length || (listData?.[0] && Object.keys(listData[0]).length) || 1, + colWidth: (filterGuestsData?.length && filterGuestsData.map(({ cellWidth }) => cellWidth)) || [], rowCount: 0, variant: TableVariant.compact }} From 2263aeb94ac7790bad5fb82893245855788b28d1 Mon Sep 17 00:00:00 2001 From: CD Cabrera Date: Mon, 15 Feb 2021 22:12:50 -0500 Subject: [PATCH 2/3] fix(table): additional cell content type (#585) --- src/components/table/table.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/table/table.js b/src/components/table/table.js index 9ff3208a5..21aadd465 100644 --- a/src/components/table/table.js +++ b/src/components/table/table.js @@ -184,7 +184,7 @@ class Table extends React.Component { } cells.forEach(cell => { - if (cell.title !== undefined) { + if (cell?.title !== undefined) { const { title, ...settings } = cell; rowObj.cells.push({ title, ...settings }); } else { @@ -196,7 +196,7 @@ class Table extends React.Component { }); columnHeaders.forEach((columnHeader, index) => { - if (columnHeader.title !== undefined) { + if (columnHeader?.title !== undefined) { const { onSort, sortActive, sortDirection, title, ...settings } = columnHeader; const tempColumnHeader = { title, @@ -339,8 +339,9 @@ Table.propTypes = { cells: PropTypes.arrayOf( PropTypes.oneOfType([ PropTypes.node, + PropTypes.instanceOf(Date), PropTypes.shape({ - title: PropTypes.node.isRequired + title: PropTypes.oneOfType([PropTypes.node, PropTypes.instanceOf(Date)]).isRequired }) ]) ), From 8890ef9723192527c74002f1c28750c9d40f7f65 Mon Sep 17 00:00:00 2001 From: CD Cabrera Date: Tue, 16 Feb 2021 13:27:01 -0500 Subject: [PATCH 3/3] chore(build): patch local dev run, without proxy (#585) * build, chrome2 melts if browserslist malformed in package.json --- package.json | 13 ++++++++++++- scripts/dev.chrome.sh | 7 +++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 1639824e6..e0eb8186d 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,18 @@ "insights": { "appname": "subscriptions" }, - "browserslist": [], + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + }, "jest": { "coverageThreshold": { "global": { diff --git a/scripts/dev.chrome.sh b/scripts/dev.chrome.sh index 4e6849169..82ed898ea 100644 --- a/scripts/dev.chrome.sh +++ b/scripts/dev.chrome.sh @@ -91,6 +91,13 @@ buildChrome() printf "\n${GREEN}Build SUCCESS${NOCOLOR}" fi + if [ ! -d $DIR_REPO/build ]; then + printf "\n${YELLOW}Build output failed, confirm recent chroming updates didn't alter the output directory.${NOCOLOR}\n" + exit 0 + else + printf "\n${GREEN}Build SUCCESS${NOCOLOR}" + fi + printf "\n${YELLOW}Setting up local chrome ...${NOCOLOR}" mkdir -p $DIR_PUBLIC