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

Change order of filters in the filters section #4095

Closed
Show file tree
Hide file tree
Changes from 4 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
5 changes: 4 additions & 1 deletion mathesar_ui/src/component-library/select/Select.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
} from '@mathesar-component-library-dir/list-box';

import StringOrComponent from '../string-or-component/StringOrComponent.svelte';
import Truncate from '../truncate/Truncate.svelte';

import type { SelectProps } from './SelectTypes';

Expand Down Expand Up @@ -172,7 +173,9 @@
{:else if $$slots.default}
<slot option={value} label={getLabel(value)} />
{:else}
<StringOrComponent arg={getLabel(value)} />
<Truncate>
<StringOrComponent arg={getLabel(value)} />
</Truncate>
{/if}
</svelte:fragment>

Expand Down
8 changes: 4 additions & 4 deletions mathesar_ui/src/stores/abstract-types/operations/filtering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function constructParamMapForAllTypes(
const equalityFiltersResponse: AbstractTypeFilterDefinitionResponse[] = [
{
id: 'equal',
name: 'equals',
name: 'equals (case sensitive)',
aliases: constructAliasMapForTypes(allDateTimeTypes, 'is same as'),
uiTypeParameterMap: constructParamMapForAllTypes((category) => [category]),
hasParams: true,
Expand All @@ -79,20 +79,20 @@ const equalityFiltersResponse: AbstractTypeFilterDefinitionResponse[] = [
// This is the API response expected from the server
// Might be better if we can have this with the types endpoint
const filterResponse: AbstractTypeFilterDefinitionResponse[] = [
...equalityFiltersResponse,
{
id: 'contains_case_insensitive',
name: 'contains',
name: 'contains (case insensitive)',
uiTypeParameterMap: {
[abstractTypeCategory.Text]: [abstractTypeCategory.Text],
[abstractTypeCategory.Email]: [abstractTypeCategory.Text],
[abstractTypeCategory.Uri]: [abstractTypeCategory.Text],
},
hasParams: true,
},
...equalityFiltersResponse,
{
id: 'starts_with_case_insensitive',
name: 'starts with',
name: 'starts with (case insensitive)',
uiTypeParameterMap: {
[abstractTypeCategory.Text]: [abstractTypeCategory.Text],
[abstractTypeCategory.Email]: [abstractTypeCategory.Text],
Expand Down
Loading