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

chore(chart): Save modal select placeholder value #12413

Merged
merged 3 commits into from
Jan 20, 2021
Merged
Changes from 2 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
11 changes: 6 additions & 5 deletions superset-frontend/src/explore/components/SaveModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { connect } from 'react-redux';

// Session storage key for recent dashboard
const SK_DASHBOARD_ID = 'save_chart_recent_dashboard';
const SELECT_PLACEHOLDER = t('**Select** a dashboard OR **create** a new one');
const SELECT_PLACEHOLDER = t('Select dashboard');
Copy link
Member

Choose a reason for hiding this comment

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

Can we keep the original copy as I don't think we've added the functionality to create a dashboard in the dropdown yet.

image

https://projects.invisionapp.com/share/V5VH03AHBER#/screens/399817652

cc @mihir174

For context, #10355 added this copy and there is a discussion on why this is still not optimal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ktmud but the original text is referring to dashboard creation through save modal?

Copy link
Member

@ktmud ktmud Jan 11, 2021

Choose a reason for hiding this comment

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

Yes and I think we decided to allow users to do that since that's what in the original modal. Have we removed that functionality?

Copy link
Contributor

Choose a reason for hiding this comment

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

It is possible to create a dashboard through this modal and I guess text should claim that creation is possible.


type SaveModalProps = {
can_overwrite?: boolean;
Expand Down Expand Up @@ -152,6 +152,8 @@ class SaveModal extends React.Component<SaveModalProps, SaveModalState> {
}

render() {
const dashboardSelectValue =
this.state.newDashboardName || this.state.saveToDashboardId;
return (
<Modal
show
Expand Down Expand Up @@ -247,10 +249,9 @@ class SaveModal extends React.Component<SaveModalProps, SaveModalState> {
creatable
onChange={this.onDashboardSelectChange}
autoSize={false}
value={{
value:
this.state.saveToDashboardId || this.state.newDashboardName,
}}
value={
dashboardSelectValue ? { value: dashboardSelectValue } : null
}
placeholder={
// Using markdown to allow for good i18n
<ReactMarkdown
Expand Down