etr2460 commented on a change in pull request #8455: [Datasource Editor] A few 
small UI changes in modal to prevent accidental edits
URL: 
https://github.com/apache/incubator-superset/pull/8455#discussion_r339325804
 
 

 ##########
 File path: superset/assets/src/datasource/DatasourceEditor.jsx
 ##########
 @@ -565,18 +569,22 @@ export class DatasourceEditor extends 
React.PureComponent {
   }
 
   render() {
-    const datasource = this.state.datasource;
+    const { datasource, activeTabKey } = this.state;
     return (
       <div className="Datasource">
         {this.renderErrors()}
         <Tabs
           id="table-tabs"
           onSelect={this.handleTabSelect}
-          defaultActiveKey={1}
+          defaultActiveKey={activeTabKey}
         >
           <Tab eventKey={1} title={t('Settings')}>
-            {this.state.activeTabKey === 1 &&
+            {activeTabKey === 1 &&
               <div>
+                <div className="change-warning well">
+                  <span>Be careful</span>. Changes to these settings can break 
all charts,
 
 Review comment:
   This should all be a `t()` string. That means we'd lose the bold for part of 
it, but I think it's ok. If you really want `Be careful` to be in bold, then 
you could format it that way as a title string or something like that. Also, 
I'd probably reword/reformat as this (since changes won't always break charts): 
(pseudocode)
   ```jsx
   <div>
     <div className="bold">{t('Warning')}</div>
     <div>{t('Changing these settings will affect all charts using this 
datasource, including charts owned by other people.')}</div>
   </div>
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to