You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/02/10 09:30:51 UTC

[GitHub] [superset] stephenLYZ opened a new pull request #18658: fix: dataset modal doesn't work in dev mode

stephenLYZ opened a new pull request #18658:
URL: https://github.com/apache/superset/pull/18658


   <!---
   Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   This problem only exists in dev environments. The reason is the react-hot-loader will use "ProxyFacade", which is a wrapper for Functional Component. 
   
   ```
   ProxyFacade = function(props, context) {
         /*
   
           ! THIS IS NOT YOUR COMPONENT !
           !  THIS IS REACT-HOT-LOADER  !
   
           And you are probably looking for a function component of yours
           It's hidden, but there is a way to fix this - just reconfigure your application a bit
           see https://github.com/gaearon/react-hot-loader/issues/1311
   
          */
   
         const result = CurrentComponent(props, context);
   ```
   
   And we use`recurseReactClone` method to create component(see https://github.com/apache/superset/blob/master/superset-frontend/src/CRUD/utils.js), which will pass props to the component. In this case, since the name has been changed, it is not possible to pass onChange props. see screenshot:
   ![image](https://user-images.githubusercontent.com/11830681/153377996-ae70e19a-7e49-4a08-87a3-f09684c995c6.png)
   
   Here we use this solution. https://github.com/gaearon/react-hot-loader/issues/1311
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   ### befre
   https://user-images.githubusercontent.com/33317356/153366245-f733f6b6-c7c1-4322-b16a-91eb1d156b1c.mp4
   ### after
   
   https://user-images.githubusercontent.com/11830681/153376126-886fd66b-9bc1-4d32-bae8-86d1b256e04b.mov
   
   
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: https://github.com/apache/superset/issues/18655
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [superset] zhaoyongjie commented on a change in pull request #18658: fix: dataset modal doesn't work in dev mode

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on a change in pull request #18658:
URL: https://github.com/apache/superset/pull/18658#discussion_r803477049



##########
File path: superset-frontend/webpack.config.js
##########
@@ -344,6 +344,11 @@ const config = {
         ],
         use: [babelLoader],
       },
+      {

Review comment:
       Please add a `todo` comment here and link to this [PR](https://github.com/apache/superset/issues/18655). We should refactor `DatasourceEditor.jsx` and decouple it in future.




-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [superset] villebro merged pull request #18658: fix: dataset modal doesn't work in dev mode

Posted by GitBox <gi...@apache.org>.
villebro merged pull request #18658:
URL: https://github.com/apache/superset/pull/18658


   


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [superset] villebro commented on a change in pull request #18658: fix: dataset modal doesn't work in dev mode

Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #18658:
URL: https://github.com/apache/superset/pull/18658#discussion_r803478631



##########
File path: superset-frontend/webpack.config.js
##########
@@ -344,6 +344,11 @@ const config = {
         ],
         use: [babelLoader],
       },
+      {
+        test: /\.js$/,
+        include: /node_modules\/react-dom/,
+        use: ['react-hot-loader/webpack'],
+      },

Review comment:
       I wonder if we should consider using `@hot-loader/react-dom`, as maybe there are other patches there, too, that we're just unaware of right now?




-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [superset] stephenLYZ commented on a change in pull request #18658: fix: dataset modal doesn't work in dev mode

Posted by GitBox <gi...@apache.org>.
stephenLYZ commented on a change in pull request #18658:
URL: https://github.com/apache/superset/pull/18658#discussion_r803490099



##########
File path: superset-frontend/webpack.config.js
##########
@@ -344,6 +344,11 @@ const config = {
         ],
         use: [babelLoader],
       },
+      {
+        test: /\.js$/,
+        include: /node_modules\/react-dom/,
+        use: ['react-hot-loader/webpack'],
+      },

Review comment:
       FYI. We may use [react-refresh](https://github.com/pmmmwh/react-refresh-webpack-plugin) to replace react-hot-loader in the future, which is more active.




-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [superset] stephenLYZ commented on a change in pull request #18658: fix: dataset modal doesn't work in dev mode

Posted by GitBox <gi...@apache.org>.
stephenLYZ commented on a change in pull request #18658:
URL: https://github.com/apache/superset/pull/18658#discussion_r803481999



##########
File path: superset-frontend/webpack.config.js
##########
@@ -344,6 +344,11 @@ const config = {
         ],
         use: [babelLoader],
       },
+      {
+        test: /\.js$/,
+        include: /node_modules\/react-dom/,
+        use: ['react-hot-loader/webpack'],
+      },

Review comment:
       Good idea. However, this [lib](https://github.com/hot-loader/react-dom) has not been updated for three years. 😂




-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [superset] villebro commented on a change in pull request #18658: fix: dataset modal doesn't work in dev mode

Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #18658:
URL: https://github.com/apache/superset/pull/18658#discussion_r803486763



##########
File path: superset-frontend/webpack.config.js
##########
@@ -344,6 +344,11 @@ const config = {
         ],
         use: [babelLoader],
       },
+      {
+        test: /\.js$/,
+        include: /node_modules\/react-dom/,
+        use: ['react-hot-loader/webpack'],
+      },

Review comment:
       Uhh, good point! 😓 




-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [superset] codecov[bot] commented on pull request #18658: fix: dataset modal doesn't work in dev mode

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #18658:
URL: https://github.com/apache/superset/pull/18658#issuecomment-1034757482


   # [Codecov](https://codecov.io/gh/apache/superset/pull/18658?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#18658](https://codecov.io/gh/apache/superset/pull/18658?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (bdceb5a) into [master](https://codecov.io/gh/apache/superset/commit/00eb6b1f5711e1af0b8dcfc05346ad0dacadddda?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (00eb6b1) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/18658/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/18658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master   #18658   +/-   ##
   =======================================
     Coverage   66.29%   66.29%           
   =======================================
     Files        1603     1603           
     Lines       62744    62744           
     Branches     6320     6320           
   =======================================
     Hits        41593    41593           
     Misses      19499    19499           
     Partials     1652     1652           
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `51.28% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/18658?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/18658?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [00eb6b1...bdceb5a](https://codecov.io/gh/apache/superset/pull/18658?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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