fix(ui) - funnels issues, and saved search with metadata

This commit is contained in:
Shekar Siri 2022-03-10 17:20:37 +01:00
parent 8e601d924c
commit 83bcf97312
4 changed files with 16 additions and 12 deletions

View file

@ -211,9 +211,9 @@ function FunnelGraph(props) {
strokeWidth={0}
interval={0}
tick ={{ fill: '#666', fontSize: 12 }}
xAxisId={0}
xAxisId={0}
/>
<XAxis
{/* <XAxis
stroke={0}
xAxisId={1}
dataKey="value"
@ -222,7 +222,7 @@ function FunnelGraph(props) {
dy={-15} dx={0}
tick ={{ fill: '#666', fontSize: 12 }}
tickFormatter={val => '"' + val + '"'}
/>
/> */}
<YAxis interval={ 0 } strokeWidth={0} tick ={{ fill: '#999999', fontSize: 11 }} tickFormatter={val => Styles.tickFormatter(val)} />
</BarChart>
</div>

View file

@ -60,7 +60,7 @@ function FilterAutoComplete(props: Props) {
.finally(() => setLoading(false));
}
const debouncedRequestValues = React.useCallback(debounce(requestValues, 300), []);
const debouncedRequestValues = React.useCallback(debounce(requestValues, 1000), []);
const onInputChange = ({ target: { value } }) => {
setQuery(value);

View file

@ -6,6 +6,7 @@ import { capitalize } from 'App/utils';
const countryOptions = Object.keys(countries).map(i => ({ text: countries[i], value: i }));
const containsFilters = [{ key: 'contains', text: 'contains', value: 'contains' }]
export const metaFilter = { key: FilterKey.METADATA, type: FilterType.MULTIPLE, category: FilterCategory.METADATA, label: 'Metadata', operator: 'is', operatorOptions: filterOptions.stringOperators, icon: 'filters/metadata', isEvent: true };
export const filtersMap = {
// EVENTS
[FilterKey.CLICK]: { key: FilterKey.CLICK, type: FilterType.MULTIPLE, category: FilterCategory.INTERACTIONS, label: 'Click', operator: 'on', operatorOptions: filterOptions.targetOperators, icon: 'filters/click', isEvent: true },
@ -31,7 +32,6 @@ export const filtersMap = {
[FilterKey.ERROR]: { key: FilterKey.ERROR, type: FilterType.MULTIPLE, category: FilterCategory.JAVASCRIPT, label: 'Error', operator: 'is', operatorOptions: filterOptions.stringOperators, icon: 'filters/error', isEvent: true },
// [FilterKey.METADATA]: { key: FilterKey.METADATA, type: FilterType.MULTIPLE, category: FilterCategory.METADATA, label: 'Metadata', operator: 'is', operatorOptions: filterOptions.stringOperators, icon: 'filters/metadata', isEvent: true },
// FILTERS
[FilterKey.USER_OS]: { key: FilterKey.USER_OS, type: FilterType.MULTIPLE, category: FilterCategory.GEAR, label: 'User OS', operator: 'is', operatorOptions: filterOptions.stringOperators, icon: 'filters/os' },
[FilterKey.USER_BROWSER]: { key: FilterKey.USER_BROWSER, type: FilterType.MULTIPLE, category: FilterCategory.GEAR, label: 'User Browser', operator: 'is', operatorOptions: filterOptions.stringOperators, icon: 'filters/browser' },
@ -133,7 +133,7 @@ export default Record({
})
_filter = subFilterMap[type]
} else {
_filter = filtersMap[type];
_filter = (type === FilterKey.METADATA) ? metaFilter : filtersMap[type];
}
return {
...filter,

View file

@ -51,8 +51,9 @@ export default Record({
}
},
fromJS: ({ stages = [], filter, activeStages = null, ...rest }) => {
let _stages = stages.map(stage => {
stage.label = getRedableName(stage.type, stage.value);
let _stages = stages.map((stage, index) => {
// stage.label = getRedableName(stage.type, stage.value);
stage.label = `Step ${index + 1}`;
return stage;
});
@ -70,16 +71,19 @@ export default Record({
return {
...rest,
stages: _stages.length > 0 ? _stages.map(stage => {
stages: _stages.length > 0 ? _stages.map((stage, index) => {
if (!stage) return;
stage.label = getRedableName(stage);
// stage.label = getRedableName(stage);
stage.label = `Step ${index + 1}`;
return stage;
}) : [],
affectedUsers,
lostConversions,
conversionImpact,
firstStage: firstStage && firstStage.label + ' ' + truncate(firstStage.value || '', 10) || '',
lastStage: lastStage && lastStage.label + ' ' + truncate(lastStage.value || '', 10) || '',
// firstStage: firstStage && firstStage.label + ' ' + truncate(firstStage.value || '', 10) || '',
// lastStage: lastStage && lastStage.label + ' ' + truncate(lastStage.value || '', 10) || '',
firstStage: firstStage && firstStage.label || '',
lastStage: lastStage && lastStage.label || '',
filter: Filter(filter),
sessionsCount: lastStage && lastStage.sessionsCount,
stepsCount: stages ? stages.length : 0,