profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/scottdickerson/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Scott Dickerson scottdickerson @IBM Austin, TX, US React and Vue Front End Developer, React Testing Library and Storybooks advocate

carbon-design-system/carbon-addons-iot-react 69

A collection of React components shared between IBM Watson IoT products.

PathosBill/blink-j5 0

test communication from Johnny-Five to an Arduino Nano

scottdickerson/Austin2040 0

Austin 2040 files

scottdickerson/carbon 0

A design system built by IBM

scottdickerson/carbon-addons-data-viz-react 0

Carbon Data Visualization components built in React

scottdickerson/carbon-charts 0

:bar_chart: :chart_with_upwards_trend: Reusable charts implemented using D3 & typescript

scottdickerson/carbon-components-react 0

React components for the Carbon Design System

scottdickerson/dinner 0

An app that suggests dinner ideas

scottdickerson/flying-higher 0

Flying higher site

issue commentibmdb/python-ibmdb

stmt_error no information returned from executeMany failure

I’m fine with the first exception being reported and the batch failing. I’m just not getting as good as an exception as you are.

scottdickerson

comment created time in 3 days

pull request commenttsayen/dom-to-image

fix(licenses): remove gpl files

does anyone have any ideas about when this might make it in a build? @tsayen This is still showing up in our scans and causing us extra LICENSE remediation work.

scottdickerson

comment created time in 7 days

PR opened carbon-design-system/carbon-addons-iot-react

Simple fix to hotspot content to check for null values

Closes #2823

Summary

  • If values were null, the HotspotContent was throwing a NPE

Change List (commits, features, bugs, etc)

  • Wrote a story and added a null check

Acceptance Test (how to verify the PR)

  • Verify the new story

Regression Test (how to make sure this PR doesn't break old functionality)

  • Verify the other Hotspot Content stories haven't changed

<!-- For reviewers: do not remove -->

Things to look for during review

  • [ ] Make sure all references to iot or bx class prefix is using the prefix variable
  • [ ] (React) All major areas have a data-testid attribute. New test ids should have test written to ensure they are not changed or removed.
  • [ ] UI should be checked in RTL mode to ensure the proper handling of layout and text.
  • [ ] All strings should be translatable.
  • [ ] The code should pass a11y scans (The storybook a11y knob should show no violations). New components should have a11y test written.
  • [ ] Unit test should be written and should have a coverage of 90% or higher in all areas.
  • [ ] All components should be passing visual regression test. For new styles or components either a visual regression test should be written for all permutations or the base image updated.
  • [ ] Changes or new components should either write new or update existing documentation.
  • [ ] PR should link and close out an existing issue
+185 -2

0 comment

4 changed files

pr created time in 14 days

create barnchcarbon-design-system/carbon-addons-iot-react

branch : fix-2823

created branch time in 14 days

issue openedcarbon-design-system/carbon-addons-iot-react

[HotspotContent] If no values are passed it throws an exception

What package is this for?

  • [x] React
  • [ ] Angular

Describe the bug

Bug in the Hotspot Content code where if values is null, it throws a NPE

I made a new story to reproduce and fixed it in my PR

created time in 14 days

issue openedibmdb/python-ibmdb

stmt_error no information returned from executeMany failure

when we get a DB2 error from the executeMany command, we get no details about the error from ibm_db

Here's the code change that should have logged the SQL error when we get it, but nothing comes back:

https://github.com/ibm-watson-iot/functions/pull/428/files

Here are the empty logs

2021-09-09 03:04:59 PM [PID 33239] [DEBUG ] iotfunctions.stages.store_derived_metrics : SQLSTATE =
Error : Logging the exception returns nothing either 2021-09-09 03:05:36 PM [PID 33239] [ERROR ] analytics_service.api._log_exception : The function PersistColumns failed to execute. 2021-09-09 03:05:36 PM [PID 33239] [ERROR ] analytics_service.api._log_exception : Traceback (most recent call last): File "/Users/shraddha.singh@ibm.com/watson_iot/functions/iotfunctions/stages.py", line 215, in store_derived_metrics res = ibm_db.execute_many(stmt, tuple(valueList)) Exception

created time in 14 days

MemberEvent

push eventcarbon-design-system/carbon-addons-iot-react

Bjorn Alm

commit sha 4bb62480fec0017cfaef03d3f5302286559257ea

test(editorutils): improved unit test coverage quote> #2553

view details

Kevin Perrine

commit sha d887edfc20dd98c64bbaecb0fc0876e4ece2fa93

Merge branch 'next' into 2553-editorUtils-improve-unit-test-coverage

view details

Bjorn Alm

commit sha 7d68e4a9f041d8cb2e400a4dcd4440266cf1fb54

test(thresholdsformitem): improved unit test coverage #2564

view details

Bjorn Alm

commit sha 003b90dee45c3b96370ecd631ed53dfa6235f981

Merge branch 'next' into 2564-ThresholdsFormItem-improve-unit-test-coverage

view details

Bjorn Alm

commit sha 9acba5d642361f631136e440ae5af445bac84cbb

test(scrollingcontrols): improved unit test coverage

view details

Bjorn Alm

commit sha 786245cb7ac0742020f125045865b484c93c6461

test(errortable): improved unit test coverage #2585

view details

dependabot[bot]

commit sha d22b172dd34b8ee696a01365ff1a5e1a68ecc583

Bump tar from 4.4.17 to 4.4.19 Bumps [tar](https://github.com/npm/node-tar) from 4.4.17 to 4.4.19. - [Release notes](https://github.com/npm/node-tar/releases) - [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md) - [Commits](https://github.com/npm/node-tar/compare/v4.4.17...v4.4.19) --- updated-dependencies: - dependency-name: tar dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>

view details

Kevin Perrine

commit sha b95d0609ae86a3f6cc34375e01a902f7e723ae98

fix(simple-list): fix list updates when props change

view details

Kevin Perrine

commit sha 0eaccfeefef34af55c2f441eb00b274b230d54e3

test(simple-list): add tests to ensure proper state when props change

view details

Kevin Perrine

commit sha 5d889c9889a91f0c1ffe16e3af709f8ff30abb2d

chore(simple-list): update story to make items configurable

view details

Kevin Perrine

commit sha 5c1a4d3ff41a2f1453a65bcaf797f80bf73aa705

fix(simple-list): add useEffect to update items shown

view details

Kevin Perrine

commit sha 24f8642928d687c62e85df4bcef4344a145e84e9

refactor(hierarchy-list): remove unused i18n.itemsSelected prop

view details

Kevin Perrine

commit sha ff7ce7fdff47db6d1dbef11f34530b40be927c34

fix(hierarchy-list): fix story to not allow switching editingStyle

view details

Kevin Perrine

commit sha 0d5a4ec817b2eb08206542b14a32ab2527d40bad

test(hierarchy-list): update tests to use a more user-centered approach

view details

Kevin Perrine

commit sha c9215d6151619e223ccf14bf21fdd152da276b0c

chore(hierarchy-list): update snapshots

view details

Kevin Perrine

commit sha 90df3815f1fd0b8917bc89e13a40283aa5a8fb53

fix(simple-list): pr review feedback changes

view details

Kevin Perrine

commit sha d7effeef414205312e316ebe978e43016b8d9829

fix(empty-state): node-sass build errors with `max`

view details

kodiakhq[bot]

commit sha 02dcba2e1c6b151256c7d38ae210d7ddfcff5517

Merge pull request #2789 from carbon-design-system/2316-simple-list-state-updates fix(simple-list): update state properly when external props change

view details

carbon-bot

commit sha 4ab23bf7a846fcbc90b1b4fd03026b52f4f82dd4

v2.146.0-next.169

view details

Bjorn Alm

commit sha 4cf4e03f516a8f27d5607387a7bd8e69ccd0927d

Merge branch 'next' into 2585-ErrorTable-improve-unit-test-coverage

view details

push time in 17 days

push eventcarbon-design-system/carbon-addons-iot-react

Bjorn Alm

commit sha 7d06fa1e7385b87688d9608f14c56e9fe8d71acd

test(basetablereducer): improved unit testing coverage

view details

Scott Dickerson

commit sha e0ec22ad539bb2b8d4d93a2b35430af59241822c

Merge pull request #2809 from carbon-design-system/2803-baseTableReducer-improve-unit-test-coverage2 test(basetablereducer): improved unit testing coverage

view details

push time in 17 days

delete branch carbon-design-system/carbon-addons-iot-react

delete branch : 2803-baseTableReducer-improve-unit-test-coverage2

delete time in 17 days

PR merged carbon-design-system/carbon-addons-iot-react

Reviewers
test(basetablereducer): improved unit testing coverage status: one more review 👀

Closes #2803

Summary

Improved testing coverage for baseTableReducer

Change List (commits, features, bugs, etc)

Acceptance Test (how to verify the PR)

  • tests here

Regression Test (how to make sure this PR doesn't break old functionality)

  • tests here

<!-- For reviewers: do not remove -->

Things to look for during review

  • [ ] Make sure all references to iot or bx class prefix is using the prefix variable
  • [ ] (React) All major areas have a data-testid attribute. New test ids should have test written to ensure they are not changed or removed.
  • [ ] UI should be checked in RTL mode to ensure the proper handling of layout and text.
  • [ ] All strings should be translatable.
  • [ ] The code should pass a11y scans (The storybook a11y knob should show no violations). New components should have a11y test written.
  • [ ] Unit test should be written and should have a coverage of 90% or higher in all areas.
  • [ ] All components should be passing visual regression test. For new styles or components either a visual regression test should be written for all permutations or the base image updated.
  • [ ] Changes or new components should either write new or update existing documentation.
  • [ ] PR should link and close out an existing issue
+43 -0

2 comments

2 changed files

bjornalm

pr closed time in 17 days

PullRequestReviewEvent

Pull request review commentcarbon-design-system/carbon-addons-iot-react

feat(dashboardeditor): add new render callbacks to allow custom renders of the edit form (and card render) without forcing the Card JSON to change

 export const CustomCardPreviewRenderer = () => (       <Link href="www.ibm.com">Favorites</Link>,     ]}     renderCardPreview={(-      cardConfig,-      cardProps,+      cardConfig, // eslint-disable-line no-unused-vars+      // the original card config, mostly useless, would remove if I could+      cardProps, // the updated card props with the correct position etc       // These props are not used, but they could be to create your own implementation       onSelectCard, // eslint-disable-line no-unused-vars       onDuplicateCard, // eslint-disable-line no-unused-vars       onRemoveCard, // eslint-disable-line no-unused-vars-      isSelected // eslint-disable-line no-unused-vars+      isSelected, // eslint-disable-line no-unused-vars+      onShowImageGallery, // eslint-disable-line no-unused-vars+      availableDimensions     ) => {-      return cardConfig.type === 'CUSTOM' ? (-        <Card-          key={cardConfig.id}-          id={cardConfig.id}-          size={cardConfig.size}-          title={cardConfig.title}-          isEditable-          {...cardProps}-        >+      return cardProps.type === 'CUSTOM' ? (+        <Card key={cardProps.id} isEditable {...cardProps}>           <div style={{ padding: '1rem' }}>             This content is rendered by the renderCardPreview function. The &quot;value&quot;             property on the card will be rendered here:-            <h3>{cardConfig.value}</h3>+            <h3>{cardProps.value}</h3>           </div>            {             // if you want the resizable handles you need to render the children             cardProps.children           }         </Card>-      ) : undefined;+      ) : (+        // if not a custom card you can use the default card renderer, but you can translate and add your own changes to the card JSON+        <DashboardEditorDefaultCardRenderer+          card={{ ...cardProps, title: `my custom title: ${cardProps.title}` }}

this is just the story, not the real thing

scottdickerson

comment created time in 21 days

PullRequestReviewEvent

Pull request review commentcarbon-design-system/carbon-addons-iot-react

feat(dashboardeditor): add new render callbacks to allow custom renders of the edit form (and card render) without forcing the Card JSON to change

+import React, { useMemo } from 'react';+import omit from 'lodash/omit';+import find from 'lodash/find';+import isEqual from 'lodash/isEqual';++import { CARD_TYPES } from '../../constants/LayoutConstants';+import {+  ValueCard,+  TimeSeriesCard,+  BarChartCard,+  ImageCard,+  TableCard,+  ListCard,+  Card,+} from '../../index';++import { timeRangeToJSON, isCardJsonValid } from './editorUtils';++/**+ * Renders a card and lists the JSON within+ * @param {Object} props+ * @returns {Node}+ */+// eslint-disable-next-line react/prop-types+const renderDefaultCard = ({ id, children, ...others }) => (+  <Card isEditable {...others}>+    <div style={{ padding: '1rem' }}>{JSON.stringify(id, null, 4)}</div>+    {children}+  </Card>+);++/**+ * This component renders our default representation of a card in the editor based on the card type+ */+const DashboardEditorDefaultCardRenderer = ({ card: cardProps, availableDimensions }) => {+  // For time based cards, we need to deduce the correct interval+  const timeRangeJSON = find(timeRangeToJSON, ({ range }) =>+    isEqual(range, cardProps?.dataSource?.range)+  );+  const interval = useMemo(() => timeRangeJSON?.interval || 'day', [timeRangeJSON]);++  // if our card isn't valid render the default+  if (!isCardJsonValid(cardProps)) {+    return renderDefaultCard(cardProps);

sure, sounds good, I'll pop an warning in the console

scottdickerson

comment created time in 21 days

PullRequestReviewEvent

Pull request review commentcarbon-design-system/carbon-addons-iot-react

feat(dashboardeditor): add new render callbacks to allow custom renders of the edit form (and card render) without forcing the Card JSON to change

 export const CardPropTypes = {   resizeHandles: PropTypes.array,   /** Optional callback function that is passed an onChange function and the original cardConfig object.    * This allows additional information to be passed to be used in the Card Editor for this type.-   * You need to return an array of child objects with a header: {title, tooltip: {tooltipText: PropTypes.string}} and content element to render * */+   * You need to return an array of child objects with a header: {title, tooltip: {tooltipText: PropTypes.string}} and content element to render+   * We recommend doing this dynamically with the CardEditor onRenderCardEditForm property rather than hardcoding it in the Card JSON

Yes there are two ways, we basically we preserve the old static prop (for non-breaking changes) but recommend using the dynamic prop, was the intention with the comment. We don't want to deprecate the old prop (because we need it to actually use the dynamic prop) but we would probably want to hide it from downstream consumers in a future release.

scottdickerson

comment created time in 21 days

PullRequestReviewEvent

Pull request review commentcarbon-design-system/carbon-addons-iot-react

feat(dashboardeditor): add new render callbacks to allow custom renders of the edit form (and card render) without forcing the Card JSON to change

 const DashboardEditorCardRenderer = React.memo(         onDuplicate,         onRemove,         isSelected,-        onShowImageGallery+        onShowImageGallery,+        availableDimensions       );     }      // otherwise use our default renderers-    switch (cardProps.type) {-      case CARD_TYPES.VALUE:-        return renderValueCard(cardProps);-      case CARD_TYPES.TIMESERIES:-        return <EditorTimeSeriesCard {...cardProps} />;-      case CARD_TYPES.BAR:-        return (-          <EditorBarChartCard-            {...cardProps}-            dataItems={dataItems}-            availableDimensions={availableDimensions}-          />-        );-      case CARD_TYPES.TABLE:-        return renderTableCard(cardProps);-      case CARD_TYPES.IMAGE:-        return renderImageCard({-          ...cardProps,-          values: {-            ...cardProps.values,-            hotspots: cardProps.values?.hotspots?.concat(dynamicHotspots),-          },-        });-      case CARD_TYPES.LIST:-        return renderListCard(cardProps);-      default:-        // if the user passes an element for a custom card type, render it-        return React.isValidElement(cardProps.content) || typeof cardProps.content === 'function'-          ? renderCustomCard(cardProps)-          : renderDefaultCard(cardProps);-    }+    // If it's an image card we need to update its dynamic hotspots+    const card = useMemo(+      () =>+        cardProps.type !== CARD_TYPES.IMAGE+          ? cardProps+          : {+              ...cardProps,+              values: {+                ...cardProps.values,+                hotspots: cardProps.values?.hotspots?.concat(dynamicHotspots),

here you go

scottdickerson

comment created time in 22 days

PullRequestReviewEvent

Pull request review commentcarbon-design-system/carbon-addons-iot-react

feat(dashboardeditor): add new render callbacks to allow custom renders of the edit form (and card render) without forcing the Card JSON to change

 const DashboardEditorCardRenderer = React.memo(         onDuplicate,         onRemove,         isSelected,-        onShowImageGallery+        onShowImageGallery,+        availableDimensions       );     }      // otherwise use our default renderers-    switch (cardProps.type) {-      case CARD_TYPES.VALUE:-        return renderValueCard(cardProps);-      case CARD_TYPES.TIMESERIES:-        return <EditorTimeSeriesCard {...cardProps} />;-      case CARD_TYPES.BAR:-        return (-          <EditorBarChartCard-            {...cardProps}-            dataItems={dataItems}-            availableDimensions={availableDimensions}-          />-        );-      case CARD_TYPES.TABLE:-        return renderTableCard(cardProps);-      case CARD_TYPES.IMAGE:-        return renderImageCard({-          ...cardProps,-          values: {-            ...cardProps.values,-            hotspots: cardProps.values?.hotspots?.concat(dynamicHotspots),-          },-        });-      case CARD_TYPES.LIST:-        return renderListCard(cardProps);-      default:-        // if the user passes an element for a custom card type, render it-        return React.isValidElement(cardProps.content) || typeof cardProps.content === 'function'-          ? renderCustomCard(cardProps)-          : renderDefaultCard(cardProps);-    }+    // If it's an image card we need to update its dynamic hotspots+    const card = useMemo(+      () =>+        cardProps.type !== CARD_TYPES.IMAGE+          ? cardProps+          : {+              ...cardProps,+              values: {+                ...cardProps.values,+                hotspots: cardProps.values?.hotspots?.concat(dynamicHotspots),

no, this is an error, thanks for catching @kevinsperrine . I'll make sure to filter those again

scottdickerson

comment created time in 22 days

PullRequestReviewEvent

push eventcarbon-design-system/carbon-addons-iot-react

Kevin Perrine

commit sha 5cb1c1e0fc7cc9cc3b3b917c17f09136e03f052e

chore(repo): add retries to config

view details

Kevin Perrine

commit sha 4ae44511a932aaa883be702bb5e17738edf1712e

fix(header): add hidden icon to story

view details

Kevin Perrine

commit sha acc4214ee435610b8f91ed3ea94e512bd67f50bc

fix(header): update snapshots

view details

Kevin Perrine

commit sha ddd66c4bef2400f38bdb62173ad5bd8782c857d8

feat(header): add isActionItemVisible callback to hide icons

view details

Kevin Perrine

commit sha a804c3766ca6a7f5287ed9c4ec9846cf272ceaba

fix(header): only change to close icon when triggered from overflow

view details

Kevin Perrine

commit sha fe4651660154533a33d7d863755ed59870cdd81f

chore(header): increase testing coverage and add e2e tests

view details

Kevin Perrine

commit sha b5301cd409d648078eaba1e8ab6bceb76e220443

chore(suite-header): update stories and docs for hiding icons

view details

Kevin Perrine

commit sha f7df54e2ce54e5087260bf4ddf28a41c2b59a6cb

fix(header): fix typos and minor mistakes

view details

Kevin Perrine

commit sha 7e2fdd07626c8dbb768a7fb4670fff4c68cca2b5

feat(suiteheader): add isActionItemVisible to proptypes and docs

view details

Kevin Perrine

commit sha e604c999561568f3adc4874678b44b0fcf261cf9

chore(suite-header): update snapshots

view details

Kevin Perrine

commit sha 71a6b52ddba1cdcdc2a49509a4ee0ee62c14cc60

Merge branch 'next' into 2739-suite-header-icons

view details

Kevin Perrine

commit sha 723042fd11c8edac3ce4ae2cb4cdfa17efad9367

feat(header): add hidden by class example in Header story

view details

Kevin Perrine

commit sha 0b5dacb437c147c63807f19f761ed219d22244ea

Merge branch '2739-suite-header-icons' of github.com:carbon-design-system/carbon-addons-iot-react into 2739-suite-header-icons

view details

Kevin Perrine

commit sha 2004f99ee20f8dff714917c661397e4541d7490b

fix(header): increase test retries, tun off jest eslint rule for e2e

view details

Kevin Perrine

commit sha 877b0deb69ee01e70fb14a402b4dbad298fc1057

fix(header): reduce e2e test size to make test more consistent

view details

Kevin Perrine

commit sha 5a82dc5ed0c0511549378a1d2e0c18d7e06c4447

fix(rule-builder): fix minor css to prevent container overflowing

view details

Kevin Perrine

commit sha 34550b6eac2181711029b982f512b41ac53c2283

feat(header): pass the whole actionItem to isActionItemVisible function

view details

Sean Stuckless

commit sha d28d3965b39b18f74e0d8b09cb499efc1e1d5206

Merge branch 'next' into 2739-suite-header-icons

view details

Kevin Perrine

commit sha d660b0a065334bf2904ddfa129288631ab61750d

fix(internal): fix fullwidthwrapper to use correct styles

view details

Kevin Perrine

commit sha 5bd6373e5dc7f72a278ac58a4266c6f4f189e404

fix(date-time-picker): show tooltip on focus

view details

push time in 22 days

issue openedcarbon-design-system/carbon-addons-iot-react

[DashboardEditorDefaultCardRenderer] if a function is passed for the content prop it's not being called correctly

What package is this for?

  • [x] React
  • [ ] Angular

Describe the bug

Notice this code here

 default:
      // if the user passes an element for a custom card type, render it
      return React.isValidElement(cardProps.content) || typeof cardProps.content === 'function' ? (
        <Card
          isEditable
          // need to omit the content because its getting passed content to be rendered, which should not
          // get attached to the card wrapper
          {...omit(cardProps, 'content')}
        >
          {cardProps.content}
          {
            cardProps.children // children is the resizable element attached by react-grid-layout which must be rendered to support resizing
          }
        </Card>

The or check allows a React Element as the content parameter OR a function, but when it actually renders the content, it only renders it as a React Element and doesn't call the function

created time in 22 days

Pull request review commentcarbon-design-system/carbon-addons-iot-react

feat(dashboardeditor): add new render callbacks to allow custom renders

 describe('DashboardEditorCardRenderer', () => {     expect(screen.getByText(/defaultCard/)).toBeInTheDocument();   }); -  it('should call getValidDataItems when passed', () => {

DashboardEditorCardRenderer wasn't actually using the dataItems prop (which that was used to determine). I checked all the downstream card components and none of them use dataItems (or have it documented as a prop)

scottdickerson

comment created time in 22 days

PullRequestReviewEvent

Pull request review commentcarbon-design-system/carbon-addons-iot-react

feat(dashboardeditor): add new render callbacks to allow custom renders

 const DashboardEditor = ({                         isResizable={isCardResizable}                         i18n={mergedI18n}                         isSelected={isSelected}-                        getValidDataItems={getValidDataItems}-                        dataItems={dataItems}

hmm, I'll check the external props interface, I didn't think I changed anything there (at least I didn't intend to). The DashboardEditor @kevinsperrine

scottdickerson

comment created time in 22 days

PullRequestReviewEvent