Skip to content

Commit

Permalink
feat: Add tracking to search resource selector (amundsen-io#1532)
Browse files Browse the repository at this point in the history
* Add tracking to search resource selector

Signed-off-by: Daniel Won <dwon@lyft.com>

* cleanup lint

Signed-off-by: Daniel Won <dwon@lyft.com>

* too me an embarassing amount of time to figuere this out

Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>

* lint fixes

Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>

* betterer

Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>

Co-authored-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
  • Loading branch information
Daniel and allisonsuarez authored Oct 14, 2021
1 parent 19952de commit f523c5a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
15 changes: 7 additions & 8 deletions frontend/amundsen_application/static/.betterer.results
Original file line number Diff line number Diff line change
Expand Up @@ -776,14 +776,13 @@ exports[`eslint`] = {
[97, 6, 29, "Use object destructuring.", "2645724888"],
[104, 6, 19, "\'featureOptionConfig\' is assigned a value but never used.", "2233467640"]
],
"js/pages/SearchPage/ResourceSelector/index.tsx:1032475941": [
[53, 4, 22, "Must use destructuring props assignment", "3282194885"],
[59, 8, 187, "A control must be associated with a text label.", "3436291130"],
[63, 19, 19, "Must use destructuring props assignment", "3960624135"],
[77, 15, 17, "Must use destructuring props assignment", "3767383680"],
[85, 15, 21, "Must use destructuring props assignment", "1352381626"],
[93, 15, 16, "Must use destructuring props assignment", "1927755215"],
[101, 15, 19, "Must use destructuring props assignment", "4761610"]
"js/pages/SearchPage/ResourceSelector/index.tsx:4162192754": [
[54, 4, 22, "Must use destructuring props assignment", "3282194885"],
[65, 19, 19, "Must use destructuring props assignment", "3960624135"],
[85, 15, 17, "Must use destructuring props assignment", "3767383680"],
[93, 15, 21, "Must use destructuring props assignment", "1352381626"],
[101, 15, 16, "Must use destructuring props assignment", "1927755215"],
[109, 15, 19, "Must use destructuring props assignment", "4761610"]
],
"js/pages/SearchPage/SearchFilter/CheckBoxFilter/index.spec.tsx:464014135": [
[57, 6, 25, "Use object destructuring.", "354229464"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
UserSearchResults,
} from 'ducks/search/types';
import { ResourceType } from 'interfaces/Resources';
import { logClick } from 'utils/analytics';
import {
DASHBOARD_RESOURCE_TITLE,
FEATURE_RESOURCE_TITLE,
Expand Down Expand Up @@ -61,7 +62,14 @@ export class ResourceSelector extends React.Component<ResourceSelectorProps> {
type="radio"
name="resource"
value={option.type}
aria-label={option.type}
checked={this.props.resource === option.type}
onClick={(e) =>
logClick(e, {
target_id: 'search_resource_selector',
value: option.type,
})
}
onChange={this.onChange}
/>
<span className="subtitle-2">{option.label}</span>
Expand Down

0 comments on commit f523c5a

Please sign in to comment.