mistercrunch commented on a change in pull request #4981: Make time filter more 
usable
URL: 
https://github.com/apache/incubator-superset/pull/4981#discussion_r189731791
 
 

 ##########
 File path: 
superset/assets/src/explore/components/controls/DateFilterControl.jsx
 ##########
 @@ -1,20 +1,43 @@
 import React from 'react';
 import PropTypes from 'prop-types';
 import {
-  Button, ButtonGroup, FormControl, InputGroup,
-  Label, OverlayTrigger, Popover, Glyphicon,
+  Button,
+  DropdownButton,
+  FormControl,
+  FormGroup,
+  InputGroup,
+  Label,
+  MenuItem,
+  OverlayTrigger,
+  Popover,
+  Radio,
+  Tab,
+  Tabs,
 } from 'react-bootstrap';
-import Select from 'react-select';
-import Datetime from 'react-datetime';
 import 'react-datetime/css/react-datetime.css';
+import DateTimeField from 'react-bootstrap-datetimepicker';
+import 'react-bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css';
 import moment from 'moment';
 
 import ControlHeader from '../ControlHeader';
-import PopoverSection from '../../../components/PopoverSection';
+import InfoTooltipWithTrigger from 
'../../../components/InfoTooltipWithTrigger';
+import { t } from '../../../locales';
 
-const RELATIVE_TIME_OPTIONS = ['ago', 'from now'];
+const TYPES = ['range', 'startend'];
+const COMMON_TIME_FRAMES = ['Yesterday', 'Last week', 'Last month', 'Last 
year'];
+const RELATIVE_TIME_OPTIONS = ['Last', 'Next'];
 const TIME_GRAIN_OPTIONS = ['seconds', 'minutes', 'hours', 'days', 'weeks', 
'months', 'years'];
 
+const MOMENT_FORMAT = 'YYYY-MM-DD[T]HH:mm:ss';
+const DEFAULT_SINCE = moment().startOf('day').subtract(7, 
'days').format(MOMENT_FORMAT);
+const DEFAULT_UNTIL = moment().startOf('day').format(MOMENT_FORMAT);
+const INVALID_DATE_MESSAGE = 'Invalid date';
+const SEPARATOR = ' : ';
+const FREEFORM_TOOLTIP = t(
+  'Superset supports smart date parsing. Strings like `last sunday` or ' +
 
 Review comment:
   Even if we decided we're better off without it, it'd be hard to deprecate 
(would break charts).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to