diff --git a/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/BigNumChart.tsx b/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/BigNumChart.tsx
index 56df66377..3f22c9103 100644
--- a/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/BigNumChart.tsx
+++ b/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/BigNumChart.tsx
@@ -16,6 +16,7 @@ function BigNumChart(props: Props) {
label = 'Number of Sessions',
values,
onSeriesFocus,
+ hideLegend,
} = props;
return (
{!isPredefined && isTimeSeries && !isGridView && (
-
+
)}
{showMenu && (
diff --git a/frontend/app/components/shared/Filters/FilterModal/FilterModal.tsx b/frontend/app/components/shared/Filters/FilterModal/FilterModal.tsx
index 83962f3bd..f5274a4bd 100644
--- a/frontend/app/components/shared/Filters/FilterModal/FilterModal.tsx
+++ b/frontend/app/components/shared/Filters/FilterModal/FilterModal.tsx
@@ -112,7 +112,7 @@ export const getMatchingEntries = (
if (lowerCaseQuery.length === 0)
return {
- matchingCategories: ['ALL', ...Object.keys(filters)],
+ matchingCategories: ['All', ...Object.keys(filters)],
matchingFilters: filters,
};
@@ -130,7 +130,7 @@ export const getMatchingEntries = (
}
});
- return { matchingCategories: ['ALL', ...matchingCategories], matchingFilters };
+ return { matchingCategories: ['All', ...matchingCategories], matchingFilters };
};
interface Props {
@@ -171,7 +171,7 @@ function FilterModal(props: Props) {
mode,
} = props;
const [searchQuery, setSearchQuery] = React.useState('');
- const [category, setCategory] = React.useState('ALL');
+ const [category, setCategory] = React.useState('All');
const { searchStore, searchStoreLive, projectsStore } = useStore();
const isMobile = projectsStore.active?.platform === 'ios'; // TODO - should be using mobile once the app is changed
const filters = isLive
@@ -222,12 +222,14 @@ function FilterModal(props: Props) {
Object.keys(matchingFilters).length === 0;
const displayedFilters =
- category === 'ALL'
+ category === 'All'
? Object.entries(matchingFilters).flatMap(([category, filters]) =>
filters.map((f: any) => ({ ...f, category }))
)
: matchingFilters[category];
+
+ console.log(displayedFilters)
return (
setCategory(key)}
className={cn('rounded-xl px-4 py-2 hover:bg-active-blue capitalize cursor-pointer font-medium', key === category ? 'bg-active-blue text-teal' : '')}
>
- {key.toLowerCase()}
+ {key}
))}
@@ -265,7 +267,7 @@ function FilterModal(props: Props) {
onClick={() => parseAndAdd({ ...filter })}
>
{filter.category ?
- {filter.category}
+ {filter.subCategory ? filter.subCategory : filter.category}
: null}
diff --git a/frontend/app/mstore/customFieldStore.ts b/frontend/app/mstore/customFieldStore.ts
index a4d2de3fd..26221f1b5 100644
--- a/frontend/app/mstore/customFieldStore.ts
+++ b/frontend/app/mstore/customFieldStore.ts
@@ -60,27 +60,28 @@ class CustomFieldStore {
});
this.list = response.map((item_1: any) => new CustomField(item_1));
this.fetchedMetadata = true;
- filterService.fetchTopValues('custom', undefined).then((response: []) => {
- response.forEach((item: any) => {
- const calls = [
- addElementToFiltersMap,
- addElementToFlagConditionsMap,
- addElementToConditionalFiltersMap,
- addElementToMobileConditionalFiltersMap,
- ];
- calls.forEach((call) => {
- call(
- FilterCategory.EVENTS,
- '_' + item.value,
- FilterType.MULTIPLE,
- 'is',
- filterOptions.stringOperators,
- 'filters/custom',
- true
- );
- });
- });
- });
+ // custom_event values fetcher; turned off for now; useful for later
+ // filterService.fetchTopValues('custom', undefined).then((response: []) => {
+ // response.forEach((item: any) => {
+ // const calls = [
+ // addElementToFiltersMap,
+ // addElementToFlagConditionsMap,
+ // addElementToConditionalFiltersMap,
+ // addElementToMobileConditionalFiltersMap,
+ // ];
+ // calls.forEach((call) => {
+ // call(
+ // FilterCategory.EVENTS,
+ // '_' + item.value,
+ // FilterType.MULTIPLE,
+ // 'is',
+ // filterOptions.stringOperators,
+ // 'filters/custom',
+ // true
+ // );
+ // });
+ // });
+ // });
} finally {
this.isLoading = false;
}
diff --git a/frontend/app/types/filter/newFilter.js b/frontend/app/types/filter/newFilter.js
index 8c5761b5f..77aa9649e 100644
--- a/frontend/app/types/filter/newFilter.js
+++ b/frontend/app/types/filter/newFilter.js
@@ -11,19 +11,21 @@ const countryOptions = Object.keys(countries).map(i => ({ label: countries[i], v
const containsFilters = [{ key: 'contains', label: 'contains', text: 'contains', value: 'contains' }];
const filterOrder = {
- [FilterCategory.AUTOCAPTURE]: 0,
- [FilterCategory.DEVTOOLS]: 1,
- [FilterCategory.USER]: 2,
- [FilterCategory.SESSION]: 3,
- [FilterCategory.ISSUE]: 4,
- [FilterCategory.METADATA]: 5
+ [FilterCategory.EVENTS]: 0,
+ [FilterCategory.AUTOCAPTURE]: 1,
+ [FilterCategory.DEVTOOLS]: 2,
+ [FilterCategory.USER]: 3,
+ [FilterCategory.SESSION]: 4,
+ [FilterCategory.ISSUE]: 5,
+ [FilterCategory.METADATA]: 6
};
export const mobileFilters = [
{
key: FilterKey.CLICK_MOBILE,
type: FilterType.MULTIPLE,
- category: FilterCategory.AUTOCAPTURE,
+ category: FilterCategory.EVENTS,
+ subCategory: FilterCategory.AUTOCAPTURE,
label: 'Tap',
operator: 'on',
operatorOptions: filterOptions.targetOperators,
@@ -33,7 +35,8 @@ export const mobileFilters = [
{
key: FilterKey.INPUT_MOBILE,
type: FilterType.MULTIPLE,
- category: FilterCategory.AUTOCAPTURE,
+ category: FilterCategory.EVENTS,
+ subCategory: FilterCategory.AUTOCAPTURE,
label: 'Text Input',
placeholder: 'Enter input label name',
operator: 'is',
@@ -44,7 +47,8 @@ export const mobileFilters = [
{
key: FilterKey.VIEW_MOBILE,
type: FilterType.MULTIPLE,
- category: FilterCategory.AUTOCAPTURE,
+ category: FilterCategory.EVENTS,
+ subCategory: FilterCategory.AUTOCAPTURE,
label: 'Screen',
placeholder: 'Enter screen name',
operator: 'is',
@@ -55,7 +59,7 @@ export const mobileFilters = [
{
key: FilterKey.CUSTOM_MOBILE,
type: FilterType.MULTIPLE,
- category: FilterCategory.AUTOCAPTURE,
+ category: FilterCategory.EVENTS,
label: 'Custom Events',
placeholder: 'Enter event key',
operator: 'is',
@@ -77,7 +81,8 @@ export const mobileFilters = [
{
key: FilterKey.SWIPE_MOBILE,
type: FilterType.MULTIPLE,
- category: FilterCategory.AUTOCAPTURE,
+ category: FilterCategory.EVENTS,
+ subCategory: FilterCategory.AUTOCAPTURE,
label: 'Swipe',
operator: 'on',
operatorOptions: filterOptions.targetOperators,
@@ -103,7 +108,8 @@ export const filters = [
{
key: FilterKey.CLICK,
type: FilterType.MULTIPLE,
- category: FilterCategory.AUTOCAPTURE,
+ category: FilterCategory.EVENTS,
+ subCategory: FilterCategory.AUTOCAPTURE,
label: 'Click',
operator: 'on',
operatorOptions: filterOptions.targetOperators.concat(clickSelectorOperators),
@@ -113,7 +119,8 @@ export const filters = [
{
key: FilterKey.INPUT,
type: FilterType.MULTIPLE,
- category: FilterCategory.AUTOCAPTURE,
+ category: FilterCategory.EVENTS,
+ subCategory: FilterCategory.AUTOCAPTURE,
label: 'Text Input',
placeholder: 'Enter input label name',
operator: 'is',
@@ -124,7 +131,8 @@ export const filters = [
{
key: FilterKey.LOCATION,
type: FilterType.MULTIPLE,
- category: FilterCategory.AUTOCAPTURE,
+ category: FilterCategory.EVENTS,
+ subCategory: FilterCategory.AUTOCAPTURE,
label: 'Visited URL',
placeholder: 'Enter path',
operator: 'is',
@@ -132,6 +140,18 @@ export const filters = [
icon: 'filters/location',
isEvent: true
},
+ {
+ key: FilterKey.TAGGED_ELEMENT,
+ type: FilterType.MULTIPLE_DROPDOWN,
+ category: FilterCategory.EVENTS,
+ subCategory: FilterCategory.AUTOCAPTURE,
+ label: 'Tagged Element',
+ operator: 'is',
+ isEvent: true,
+ icon: 'filters/tag-element',
+ operatorOptions: filterOptions.tagElementOperators,
+ options: []
+ },
{
key: FilterKey.CUSTOM,
type: FilterType.MULTIPLE,
@@ -306,17 +326,6 @@ export const filters = [
operatorOptions: filterOptions.getOperatorsByKeys(['is']),
icon: 'filters/duration'
},
- {
- key: FilterKey.TAGGED_ELEMENT,
- type: FilterType.MULTIPLE_DROPDOWN,
- category: FilterCategory.AUTOCAPTURE,
- label: 'Tagged Element',
- operator: 'is',
- isEvent: true,
- icon: 'filters/tag-element',
- operatorOptions: filterOptions.tagElementOperators,
- options: []
- },
{
key: FilterKey.UTM_SOURCE,
type: FilterType.MULTIPLE,
@@ -587,7 +596,8 @@ export const conditionalFilters = [
{
key: FilterKey.CLICK,
type: FilterType.MULTIPLE,
- category: FilterCategory.AUTOCAPTURE,
+ category: FilterCategory.EVENTS,
+ subCategory: FilterCategory.AUTOCAPTURE,
label: 'Click',
operator: 'on',
operatorOptions: filterOptions.targetConditional,
@@ -597,7 +607,8 @@ export const conditionalFilters = [
{
key: FilterKey.LOCATION,
type: FilterType.MULTIPLE,
- category: FilterCategory.AUTOCAPTURE,
+ category: FilterCategory.EVENTS,
+ subCategory: FilterCategory.AUTOCAPTURE,
label: 'Visited URL',
placeholder: 'Enter path',
operator: 'is',
@@ -817,7 +828,8 @@ export const mobileConditionalFilters = [
{
key: 'viewComponent',
type: FilterType.STRING,
- category: FilterCategory.AUTOCAPTURE,
+ category: FilterCategory.EVENTS,
+ subCategory: FilterCategory.AUTOCAPTURE,
label: 'View on screen',
placeholder: 'View Name',
operator: 'is',
@@ -857,7 +869,8 @@ export const mobileConditionalFilters = [
{
key: 'clickEvent',
type: FilterType.STRING,
- category: FilterCategory.AUTOCAPTURE,
+ category: FilterCategory.EVENTS,
+ subCategory: FilterCategory.AUTOCAPTURE,
label: 'Tap on view',
placeholder: 'View Name',
operator: 'is',
@@ -887,7 +900,8 @@ export const nonConditionalFlagFilters = filters.filter(i => {
export const clickmapFilter = {
key: FilterKey.LOCATION,
type: FilterType.MULTIPLE,
- category: FilterCategory.AUTOCAPTURE,
+ category: FilterCategory.EVENTS,
+ subCategory: FilterCategory.AUTOCAPTURE,
label: 'Visited URL', placeholder: 'Enter URL or path',
operator: filterOptions.pageUrlOperators[0].value,
operatorOptions: filterOptions.pageUrlOperators,
@@ -910,7 +924,7 @@ const mapLiveFilters = (list) => {
const obj = {};
list.forEach(filter => {
if (
- filter.category !== FilterCategory.AUTOCAPTURE &&
+ filter.category !== FilterCategory.EVENTS &&
filter.category !== FilterCategory.DEVTOOLS &&
filter.key !== FilterKey.DURATION &&
filter.key !== FilterKey.REFERRER &&