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

chore: onboard @carbon/ibmdotcom-react to IBM Telemetry 🚀 #11507

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
Binary file not shown.
9 changes: 9 additions & 0 deletions packages/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,12 @@ Licensed under the
[Apache 2.0 License](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/blob/main/LICENSE).

# dpo-cms-mission

## <picture><source height="20" width="20" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ibm-telemetry/telemetry-js/main/docs/images/ibm-telemetry-dark.svg"><source height="20" width="20" media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/ibm-telemetry/telemetry-js/main/docs/images/ibm-telemetry-light.svg"><img height="20" width="20" alt="IBM Telemetry" src="https://raw.githubusercontent.com/ibm-telemetry/telemetry-js/main/docs/images/ibm-telemetry-light.svg"></picture> IBM Telemetry

This package uses IBM Telemetry to collect metrics data. By installing this
package as a dependency you are agreeing to telemetry collection. To opt out,
see
[Opting out of IBM Telemetry data collection](https://github.com/ibm-telemetry/telemetry-js/tree/main#opting-out-of-ibm-telemetry-data-collection).
For more information on the data being collected, please see the
[IBM Telemetry documentation](https://github.com/ibm-telemetry/telemetry-js/tree/main#ibm-telemetry-collection-basics).
7 changes: 4 additions & 3 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"files": [
"lib/**/*",
"es/**/*",
"umd/**/*"
"umd/**/*",
"telemetry.yml"
],
"keywords": [
"react",
Expand All @@ -34,7 +35,7 @@
"contributors:generate": "all-contributors generate",
"doctoc": "doctoc --title '## Table of Contents' docs",
"preinstall": "echo \"⛔️⛔️⛔️ATTENTION: @carbon/ibmdotcom-react package will be deprecated in Carbon for IBM.com V2. This package will fall into maintaince-mode only; we will make updates only for potential security issues and high severity bugs. Head to https://www.ibm.com/standards/carbon/developing/frameworks/react for more details.⛔️⛔️⛔️\"",
"postinstall": "carbon-telemetry collect --install",
"postinstall": "ibmtelemetry --config=telemetry.yml",
"start": "yarn storybook",
"storybook": "cross-env NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 9000",
"test:e2e:build": "node ./tests/e2e/build/build-examples.js",
Expand Down Expand Up @@ -66,7 +67,7 @@
"@carbon/ibmdotcom-services": "1.54.0",
"@carbon/ibmdotcom-styles": "1.54.0",
"@carbon/ibmdotcom-utilities": "1.54.0",
"@carbon/telemetry": "^0.1.0",
"@ibm/telemetry-js": "^1.2.0",
"autosuggest-highlight": "^3.1.1",
"carbon-components": "10.58.12",
"carbon-components-react": "7.59.17",
Expand Down
307 changes: 307 additions & 0 deletions packages/react/telemetry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,307 @@
# yaml-language-server: $schema=https://unpkg.com/@ibm/telemetry-config-schema@v1/dist/config.schema.json

version: 1
projectId: 15981afa-f735-4515-b4e2-a09b37cb72f6
endpoint: https://collector-prod.1am6wm210aow.us-south.codeengine.appdomain.cloud/v1/metrics
collect:
jsx:
elements:
allowedAttributeNames:
# General
- adjunctLinks
- alt
- aside
- backButtonText
- border
- buttons
- card
- cards
- children
- className
- copy
- cta
- customClassName
- customProfileLogin
- disabled
- disableLocaleButton
- eyebrow
- formatCTAcopy
- heading
- href
- iconPlacement
- image
- initialSearchTerm
- inverse
- isActive
- isSearchActive
- isSideNavExpanded
- items
- labelText
- links
- media
- mediaData
- mediaType
- menuItems
- menuLabel
- navigation
- onBackClick
- onClick
- onClose
- openLightBox
- pictogram
- placeHolderText
- platform
- playingMode
- regionList
- renderLightBox
- searchOpenOnload
- selectedId
- setClearResults
- size
- stickyOffset
- style
- theme
- thumbnail
- title
- type
- videoId
- videoTitle
# BPIDLegalText
- bpidLegalText
# ButtonCTA
- setMediaData
# CalloutQuote
- quote
# Card
- cardStatic
- light
# CardCTA
- disableImage
# CardGroup
- cardsPerRow
# CategoryLink
- highlighted
# Content
- withL1
# ContentSection
- childrenCustomClassName
# CTA
- customVideoTitle
# DotcomShell
- footerProps
- mastheadProps
# ExpressiveModal
- fullwidth
- open
# ExpressiveModalCloseBtn
- btnClassName
- iconClassName
- iconDescription
# Footer
- langCode
- languageCallback
- languageInitialItem
- languageItems
- languageOnly
# FooterNav
- groups
# HorizontalRule
- contrast
- weight
# IbmLogo
- autoid
- logoData
# Image
- classname
- defaultSrc
- icon
- longDescription
- refImage
- sources
# ImageWithCaption
- lightbox
# LanguageSelector
- callback
- initialSelectedItem
# Layout
- marginBottom
- marginTop
- nested
# LeadspaceWithSearch
- searchProps
# LegalNav
- button
# LinkWithIcon
- iconInline
# LocaleButton
- aria
- displayLang
# LocaleModal
- closeFunc
- isOpen
- localeData
- localeDisplay
- setIsOpen
# LocaleModalCountries
- currentRegion
- searchLabel
# LocaleModalRegions
- closeModalLabel
- returnButtonLabel
- setCurrentRegion
- setIsFiltering
# LogoGrid
- ctaCopy
- ctaHref
- hideBorder
- logosGroup
# Masthead
- customTypeaheadApi
- hasProfile
- hasSearch
- mastheadL1Data
- multiSection
- selectedMenuItem
# MastheadL1
- navigationL1
- titleLink
# MastheadProfile
- overflowMenuItemProps
- overflowMenuProps
- profileMenu
# MastheadSearch
- navType
- onChangeSearchActive
- renderValue
# MastheadSearchInput
- componentInputProps
- disableFocus
- dispatch
- searchIconClick
# MastheadSearchSuggestion
- getSuggestionValue
- isHighlighted
- query
- suggestion
# MegaMenu
- data
# Quote
- markType
- source
# RightNavigation
- hasHighlights
- viewAllLinkHref
- viewAllLinkTitle
# ScrollAnimations
- animation
- keepAnimations
- selectorTargets
# SideNavIcon
- small
# SideNavMenu
- defaultExpanded
- isbackbutton
- large
- onToggle
- renderIcon
# SideNavMenuSection
- show
# SideNavMenuWithBackForward
- titleUrl
# TableOfContents
- headingContent
- menuRule
# TOCMobile
- updateState
# VideoImageOverlay
- embedVideo
- videoData
# VideoPlayer
- aspectRatio
- autoPlay
- caption
- showCaption
# React
- key
- ref
allowedAttributeStringValues:
# General - iconPlacement
- left
- right
# General - mediaType
- image
- video
# General - playingMode
- inline
- lightbox
# General - size
- fluid
- large
- medium
- small
- super
- tall
# General - style
- button
- card
- feature
- horizontal
- text
- vertical
- vertical-end
# General - theme
- g10
- g100
- g90
- white
# General - type
- 1-3
- 2-1
- centered
- dashed
- default
- download
- external
- jump
- left
- local
- micro
- short
- solid
- video
# HorizontalRule - contrast
- high-contrast
- low-contrast
- medium-contrast
# HorizontalRule - weight
- thick
- thin
# Layout - marginBottom
- layout-01
- layout-02
- layout-03
- layout-04
- layout-05
- layout-06
- layout-07
# Layout - marginTop
- layout-01
- layout-02
- layout-03
- layout-04
- layout-05
- layout-06
- layout-07
# MastheadSearch - navType
- alt
- default
- eco
# Quote - markType
- cornerBracket
- doubleAngle
- doubleCurved
- lowHighReversedDoubleCurved
- singleAngle
- singleCurved
npm:
dependencies: null
13 changes: 11 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2135,7 +2135,7 @@ __metadata:
"@carbon/icons-react": "npm:10.49.2"
"@carbon/pictograms-react": "npm:11.50.0"
"@carbon/storybook-addon-theme": "npm:1.45.0"
"@carbon/telemetry": "npm:^0.1.0"
"@ibm/telemetry-js": "npm:^1.2.0"
"@percy-io/in-percy": "npm:^0.1.11"
"@percy/cli": "npm:^1.8.1"
"@percy/cypress": "npm:^3.1.1"
Expand Down Expand Up @@ -2662,7 +2662,7 @@ __metadata:
languageName: unknown
linkType: soft

"@carbon/telemetry@npm:0.1.0, @carbon/telemetry@npm:^0.1.0":
"@carbon/telemetry@npm:0.1.0":
version: 0.1.0
resolution: "@carbon/telemetry@npm:0.1.0"
bin:
Expand Down Expand Up @@ -3392,6 +3392,15 @@ __metadata:
languageName: node
linkType: hard

"@ibm/telemetry-js@npm:^1.2.0":
version: 1.2.0
resolution: "@ibm/telemetry-js@npm:1.2.0"
bin:
ibmtelemetry: dist/collect.js
checksum: dd942eaecc6bdf40f91309fc783b2d1b654e9cb73dd0b98ec54eef53816cad027c60ccaf6415cc81dd3ee1f8686159733ac226f6c13288419269a001a7b81b3b
languageName: node
linkType: hard

"@isaacs/cliui@npm:^8.0.2":
version: 8.0.2
resolution: "@isaacs/cliui@npm:8.0.2"
Expand Down
Loading