Skip to content
Snippets Groups Projects
Unverified Commit 2af39498 authored by Maz Ameli's avatar Maz Ameli Committed by GitHub
Browse files

Add more special field type groupings and reorganize them (#11947)

* add more field types and reorganize them

* update snapshots
parent 68a15a35
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ import { TYPE } from "metabase/lib/types";
import { t } from "ttag";
export const field_special_types = [
/* Overall Row */
{
id: TYPE.PK,
name: t`Entity Key`,
......@@ -20,29 +21,16 @@ export const field_special_types = [
section: t`Overall Row`,
description: t`Points to another table to make a connection.`,
},
{
id: TYPE.AvatarURL,
name: t`Avatar Image URL`,
section: t`Common`,
},
/* Common */
{
id: TYPE.Category,
name: t`Category`,
section: t`Common`,
},
{
id: TYPE.City,
name: t`City`,
section: t`Common`,
},
{
id: TYPE.Country,
name: t`Country`,
section: t`Common`,
},
{
id: TYPE.Currency,
name: t`Currency`,
id: TYPE.Comment,
name: t`Comment`,
section: t`Common`,
},
{
......@@ -51,209 +39,240 @@ export const field_special_types = [
section: t`Common`,
},
{
id: TYPE.Email,
name: t`Email`,
id: TYPE.Number,
name: t`Number`,
section: t`Common`,
},
{
id: TYPE.Enum,
name: t`Enum`,
id: TYPE.Title,
name: t`Title`,
section: t`Common`,
},
/* Location */
{
id: TYPE.ImageURL,
name: t`Image URL`,
section: t`Common`,
id: TYPE.City,
name: t`City`,
section: t`Location`,
},
{
id: TYPE.SerializedJSON,
name: t`Field containing JSON`,
section: t`Common`,
id: TYPE.Country,
name: t`Country`,
section: t`Location`,
},
{
id: TYPE.Latitude,
name: t`Latitude`,
section: t`Common`,
section: t`Location`,
},
{
id: TYPE.Longitude,
name: t`Longitude`,
section: t`Common`,
},
{
id: TYPE.Number,
name: t`Number`,
section: t`Common`,
section: t`Location`,
},
{
id: TYPE.State,
name: t`State`,
section: t`Common`,
section: t`Location`,
},
{
id: TYPE.UNIXTimestampSeconds,
name: t`UNIX Timestamp (Seconds)`,
section: t`Common`,
id: TYPE.ZipCode,
name: t`Zip Code`,
section: t`Location`,
},
/* Financial */
{
id: TYPE.UNIXTimestampMilliseconds,
name: t`UNIX Timestamp (Milliseconds)`,
section: t`Common`,
id: TYPE.Cost,
name: t`Cost`,
section: t`Financial`,
},
{
id: TYPE.URL,
name: t`URL`,
section: t`Common`,
id: TYPE.Currency,
name: t`Currency`,
section: t`Financial`,
},
{
id: TYPE.ZipCode,
name: t`Zip Code`,
section: t`Common`,
id: TYPE.Discount,
name: t`Discount`,
section: t`Financial`,
},
{
id: TYPE.Quantity,
name: t`Quantity`,
section: t`Common`,
id: TYPE.GrossMargin,
name: t`Gross margin`,
section: t`Financial`,
},
{
id: TYPE.Income,
name: t`Income`,
section: t`Common`,
section: t`Financial`,
},
{
id: TYPE.Discount,
name: t`Discount`,
section: t`Common`,
id: TYPE.Price,
name: t`Price`,
section: t`Financial`,
},
/* Numeric */
{
id: TYPE.CreationTimestamp,
name: t`Creation timestamp`,
section: t`Common`,
id: TYPE.Quantity,
name: t`Quantity`,
section: t`Numeric`,
},
{
id: TYPE.CreationTime,
name: t`Creation time`,
section: t`Common`,
id: TYPE.Score,
name: t`Score`,
section: t`Numeric`,
},
{
id: TYPE.CreationDate,
name: t`Creation date`,
section: t`Common`,
id: TYPE.Share,
name: t`Share`,
section: t`Numeric`,
},
/* Profile */
{
id: TYPE.CancelationTimestamp,
name: t`Cancelation timestamp`,
section: t`Common`,
id: TYPE.Birthdate,
name: t`Birthday`,
section: t`Profile`,
},
{
id: TYPE.CancelationTime,
name: t`Cancelation time`,
section: t`Common`,
id: TYPE.Company,
name: t`Company`,
section: t`Profile`,
},
{
id: TYPE.CancelationDate,
name: t`Cancelation date`,
section: t`Common`,
id: TYPE.Email,
name: t`Email`,
section: t`Profile`,
},
{
id: TYPE.DeletionTimestamp,
name: t`Deletion timestamp`,
section: t`Common`,
id: TYPE.Owner,
name: t`Owner`,
section: t`Profile`,
},
{
id: TYPE.DeletionTime,
name: t`Deletion time`,
section: t`Common`,
id: TYPE.Subscription,
name: t`Subscription`,
section: t`Profile`,
},
{
id: TYPE.DeletionDate,
name: t`Deletion date`,
section: t`Common`,
id: TYPE.User,
name: t`User`,
section: t`Profile`,
},
/* Date and Time */
{
id: TYPE.Product,
name: t`Product`,
section: t`Common`,
id: TYPE.CancelationDate,
name: t`Cancelation date`,
section: t`Date and Time`,
},
{
id: TYPE.User,
name: t`User`,
section: t`Common`,
id: TYPE.CancelationTime,
name: t`Cancelation time`,
section: t`Date and Time`,
},
{
id: TYPE.Source,
name: t`Source`,
section: t`Common`,
id: TYPE.CancelationTimestamp,
name: t`Cancelation timestamp`,
section: t`Date and Time`,
},
{
id: TYPE.Price,
name: t`Price`,
section: t`Common`,
id: TYPE.CreationDate,
name: t`Creation date`,
section: t`Date and Time`,
},
{
id: TYPE.JoinTimestamp,
name: t`Join timestamp`,
section: t`Common`,
id: TYPE.CreationTime,
name: t`Creation time`,
section: t`Date and Time`,
},
{
id: TYPE.JoinTime,
name: t`Join time`,
section: t`Common`,
id: TYPE.CreationTimestamp,
name: t`Creation timestamp`,
section: t`Date and Time`,
},
{
id: TYPE.DeletionDate,
name: t`Deletion date`,
section: t`Date and Time`,
},
{
id: TYPE.DeletionTime,
name: t`Deletion time`,
section: t`Date and Time`,
},
{
id: TYPE.DeletionTimestamp,
name: t`Deletion timestamp`,
section: t`Date and Time`,
},
{
id: TYPE.JoinDate,
name: t`Join date`,
section: t`Common`,
section: t`Date and Time`,
},
{
id: TYPE.Share,
name: t`Share`,
section: t`Common`,
id: TYPE.JoinTime,
name: t`Join time`,
section: t`Date and Time`,
},
{
id: TYPE.Owner,
name: t`Owner`,
section: t`Common`,
id: TYPE.JoinTimestamp,
name: t`Join timestamp`,
section: t`Date and Time`,
},
{
id: TYPE.Company,
name: t`Company`,
section: t`Common`,
id: TYPE.UNIXTimestampMilliseconds,
name: t`UNIX Timestamp (Milliseconds)`,
section: t`Date and Time`,
},
{
id: TYPE.Subscription,
name: t`Subscription`,
section: t`Common`,
id: TYPE.UNIXTimestampSeconds,
name: t`UNIX Timestamp (Seconds)`,
section: t`Date and Time`,
},
/* Categorical */
{
id: TYPE.Score,
name: t`Score`,
section: t`Common`,
id: TYPE.Enum,
name: t`Enum`,
section: t`Categorical`,
},
{
id: TYPE.Title,
name: t`Title`,
section: t`Common`,
id: TYPE.Product,
name: t`Product`,
section: t`Categorical`,
},
{
id: TYPE.Comment,
name: t`Comment`,
section: t`Common`,
id: TYPE.Source,
name: t`Source`,
section: t`Categorical`,
},
/* URLs */
{
id: TYPE.Cost,
name: t`Cost`,
section: t`Common`,
id: TYPE.AvatarURL,
name: t`Avatar Image URL`,
section: t`URLs`,
},
{
id: TYPE.GrossMargin,
name: t`Gross margin`,
section: t`Common`,
id: TYPE.ImageURL,
name: t`Image URL`,
section: t`URLs`,
},
{
id: TYPE.Birthdate,
name: t`Birthday`,
section: t`Common`,
id: TYPE.URL,
name: t`URL`,
section: t`URLs`,
},
/* Other */
{
id: TYPE.SerializedJSON,
name: t`Field containing JSON`,
section: t`Other`,
},
];
......
......@@ -1023,7 +1023,7 @@ exports[`Select should render "kitchen_sink" correctly 1`] = `
,
</span>
<span>
Avatar Image URL
Category
</span>
</span>
......@@ -1064,7 +1064,7 @@ exports[`Select should render "multiple" correctly 1`] = `
,
</span>
<span>
Avatar Image URL
Category
</span>
</span>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment