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

feat: change default time range from sql lab to no filter #9439

Closed
wants to merge 1 commit into from
Closed
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ class ExploreResultsButton extends React.PureComponent {
datasource: `${data.table_id}__table`,
metrics: [],
groupby: [],
time_range: 'No filter',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a bit weird that this is just plain text as opposed to null or something. I don't think fixing that is required right now, but i think moving "No filter" to a constant and using that constant it here would be reasonable. It looks like "No filter" is used in a few other places too (tests, other components) so maybe you could replace those your new constant too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree this is not a good practice. There seems to be many other hard-coded time periods, as well. I am not comfortable with refactoring while changing the default or refactoring just the 'No filter'. Maybe that refactoring can happen in a later PR?

viz_type: 'table',
since: '100 years ago',
all_columns: columns.map(c => c.name),
row_limit: 1000,
};
Expand Down