zhaoyongjie commented on code in PR #26022: URL: https://github.com/apache/superset/pull/26022#discussion_r1399718657
########## superset/config.py: ########## @@ -153,6 +153,11 @@ def _try_json_readsha(filepath: str, length: int) -> str | None: # default time filter in explore # values may be "Last day", "Last week", "<ISO date> : now", etc. DEFAULT_TIME_FILTER = NO_TIME_RANGE +TIME_FILTER_SHORTCUTS = [ + ["Current week", "DATETRUNC(DATETIME('today'), WEEK) : today"], + ["Current month (MTD)", "DATETRUNC(DATETIME('today'), MONTH) : today"], + ["Current year (YTD)", "DATETRUNC(DATETIME('today'), YEAR) : today"], +] Review Comment: Thanks for the review Ville! The reseaon of using an array is to create an ordered list for the 'shortcut', e.g. week before month -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org